diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0095947..94bb540e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,8 +58,10 @@ jobs: uses: jaxxstorm/action-install-gh-release@v1.10.0 with: repo: pulumi/pulumictl - - name: Build tfgen & provider binaries - run: make provider + - name: Build tfgen binary + run: make only_tfgen + - name: Build provider binary + run: make only_provider - name: Unit-test provider code run: make test_provider - name: Tar provider binaries diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 237fcb94..590e179b 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -176,8 +176,10 @@ jobs: uses: jaxxstorm/action-install-gh-release@v1.10.0 with: repo: pulumi/schema-tools - - name: Build tfgen & provider binaries - run: make provider + - name: Build tfgen binary + run: make only_tfgen + - name: Build provider binary + run: make only_provider - name: Unit-test provider code run: make test_provider - if: github.event_name == 'pull_request' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee259141..04de5f8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,19 +96,23 @@ This project utilizes the [pulumi-terraform-bridge](https://github.com/pulumi/pu - Generating New Examples - - In the ./examples/ directory, use the .generate.sh script to create a new example for a specific resource. - - Create a subdirectory for the new resource under ./examples/{service}/{resource}. - - Copy the script into the new subdirectory and create a Pulumi.yaml file, following the format of existing examples. - - After generating the examples, create a new subdirectory named yaml to store the Pulumi.yaml file. - - Copy the new example.md file to the docs/resource directory and rename it accordingly. - - Update the internal format by removing the tags `chooser` and `choosable` and enclosing the content within a single block `example`: - - ``` - ## Example Usage - {{% example %}} - add all SDK examples here - {{% /example %}}. - ``` + The bridge plugin has the capability to import Terraform examples, but this functionality is not always reliable. Therefore, we generate examples for all supported languages using the `pulumi convert` command and replace the examples section in the documentation. + + To add or update an example, you need to edit or add a new YAML template at the path `examples/{service-name}/{resource-name}/Pulumi.yaml`. You can use any existing templates as references or consult the [Pulumi YAML Language Reference](https://www.pulumi.com/docs/languages-sdks/yaml/yaml-language-reference/). + + Once you have made your edits, you can use the `make examples` command. This command will: + 1. Generate the example in all supported languages, which can be found in their respective folders: `examples/{service-name}/{resource-name}/{language-name}` (e.g., go, python, typescript, csharp, java). + 2. Update the examples that appear in the documentation with a new markdown file in `docs/resource/{resource-name}`. + + If you are adding an example for a new resource, don't forget to include the `ReplaceExamplesSection: true` option in the resource definition in the ProviderInfo mapping in `provider/resources.go`. + + For multiple examples of the same resource, each example must have its own subfolder (see `examples/metal/port/` for reference) with its own Pulumi.yaml. To ensure all examples are correctly displayed in the documentation, update the `scripts/generate_examples.sh` file by adding a new call to the `merge_examples_files` function at the end of the file. For example: + ```sh + merge_example_files "equinix_metal_port" "equinix_metal_port_hybrid_bonded" "equinix_metal_port_hybrid_unbonded" "equinix_metal_port_layer2_bonded" + ``` + In this command, the first parameter is the resource name, and the subsequent parameters are the normalized names of the examples to be merged. For example, if the name defined within the yaml file is "equinix-metal-port-hybrid-bonded" then its normalized name will be "equinix_metal_port_hybrid_bonded". + + By following these steps, you can ensure that all examples are properly generated and included in the documentation for Pulumi providers. **Note: Failing upgrade-provider Tool** Pulumi provides an [upgrade-provider](https://github.com/pulumi/upgrade-provider) tool that aims to reduce the amount of human intervention necessary for upgrading bridged Pulumi providers. As of March 2024, the upgrade-provider tool may encounter issues (with Equinix provider) due to changes in directory structure during the migration of resources from SDKv2 to Framework. Until this issue is resolved, manual updates are necessary following the outlined steps. diff --git a/Makefile b/Makefile index a476c42e..ce37410b 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,14 @@ development: install_plugins provider lint_provider build_sdks install_sdks clea build: install_plugins provider build_sdks install_sdks only_build: build -tfgen: cleanup install_plugins upstream +only_tfgen: install_plugins upstream build_schema +tfgen: only_tfgen generate_examples + +# Generate examples after the schema is generated +generate_examples: examples + +# Build the tfgen binary and generate the schema +build_schema: (cd provider && go build -o $(WORKING_DIR)/bin/${TFGEN} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION}" ${PROJECT}/${PROVIDER_PATH}/cmd/${TFGEN}) $(WORKING_DIR)/bin/${TFGEN} schema --out provider/cmd/${PROVIDER} (cd provider && VERSION=$(VERSION) go generate cmd/${PROVIDER}/main.go) @@ -39,6 +46,9 @@ bin/pulumi-java-gen: .pulumi-java-gen.version pulumictl download-binary -n pulumi-language-java -v v$(shell cat .pulumi-java-gen.version) -r pulumi/pulumi-java provider: tfgen install_plugins # build the provider binary +provider: only_provider + +only_provider: (cd provider && go build -o $(WORKING_DIR)/bin/${PROVIDER} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION} -X github.com/equinix/terraform-provider-equinix/version.ProviderVersion=${VERSION}" ${PROJECT}/${PROVIDER_PATH}/cmd/${PROVIDER}) build_sdks: clean build_nodejs build_python build_go build_dotnet build_java # build all the sdks @@ -59,8 +69,6 @@ build_nodejs: upstream cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \ sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json - - build_python: PYPI_VERSION := $(shell pulumictl get version --language python) build_python: upstream rm -rf sdk/python/ @@ -148,6 +156,12 @@ help: clean: rm -rf sdk/{dotnet,nodejs,go,python,java} +install_equinix_plugin: only_provider uninstall_equinix_plugin + .pulumi/bin/pulumi plugin install resource equinix $(shell pulumictl get version --language generic) --file $(WORKING_DIR)/bin/$(PROVIDER) + +uninstall_equinix_plugin: + .pulumi/bin/pulumi plugin rm resource equinix -a -y + install_plugins: .pulumi/bin/pulumi .pulumi/bin/pulumi plugin install resource tls 4.11.0 .pulumi/bin/pulumi plugin install resource random 4.14.0 @@ -190,9 +204,12 @@ upstream.rebase: .pulumi/bin/pulumi: .pulumi/version curl -fsSL https://get.pulumi.com | HOME=$(WORKING_DIR) sh -s -- --version $(cat .pulumi/version) +examples: install_equinix_plugin + scripts/generate_examples.sh + # Compute the version of Pulumi to use by inspecting the Go dependencies of the provider. .pulumi/version: @mkdir -p .pulumi @cd provider && go list -f "{{slice .Version 1}}" -m github.com/pulumi/pulumi/pkg/v3 | tee ../$@ -.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen upstream upstream.finalize upstream.rebase test_provider +.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_equinix_plugin uninstall_equinix_plugin install_plugins lint_provider provider test tfgen upstream upstream.finalize upstream.rebase test_provider examples examples_check diff --git a/docs/resource/equinix_fabric_cloud_router.examples.md b/docs/resource/equinix_fabric_cloud_router.examples.md index a0017dbe..fd6256b7 100644 --- a/docs/resource/equinix_fabric_cloud_router.examples.md +++ b/docs/resource/equinix_fabric_cloud_router.examples.md @@ -1,64 +1,65 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const metro = config.get("metro") || "FR"; -const accountNum = config.requireNumber("accountNum"); -const router = new equinix.fabric.CloudRouter("router", { - name: "My-Fabric-Cloud-Router", +const newCloudRouter = new equinix.fabric.CloudRouter("newCloudRouter", { + name: "Router-SV", type: "XF_ROUTER", + notifications: [{ + type: "ALL", + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + order: { + purchaseOrderNumber: "1-323292", + }, location: { - metroCode: metro, + metroCode: "SV", }, "package": { - code: "BASIC", + code: "STANDARD", + }, + project: { + projectId: "776847000642406", }, - notifications: [{ - type: "ALL", - emails: ["example@equinix.com"], - }], account: { - accountNumber: 272010, + accountNumber: 203612, }, - "project": { - "projectId": "995072000433550" - } }); -export const routerId = router.id; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "FR" -account_num = config.require_int("accountNum") -router = equinix.fabric.CloudRouter("router", - name="My-Fabric-Cloud-Router", +new_cloud_router = equinix.fabric.CloudRouter("newCloudRouter", + name="Router-SV", type="XF_ROUTER", + notifications=[equinix.fabric.CloudRouterNotificationArgs( + type="ALL", + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + order=equinix.fabric.CloudRouterOrderArgs( + purchase_order_number="1-323292", + ), location=equinix.fabric.CloudRouterLocationArgs( - metro_code=metro, + metro_code="SV", ), package=equinix.fabric.CloudRouterPackageArgs( - code="BASIC", + code="STANDARD", ), - notifications=[equinix.fabric.CloudRouterNotificationArgs( - type="ALL", - emails=["example@equinix.com"], - )], - account=equinix.fabric.CloudRouterAccountArgs( - account_number=272010, - )) project=equinix.fabric.CloudRouterProjectArgs( - project_id=995072000433550, + project_id="776847000642406", + ), + account=equinix.fabric.CloudRouterAccountArgs( + account_number=203612, )) -pulumi.export("routerId", router.id) ``` ```go package main @@ -66,45 +67,41 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - accountNum := cfg.RequireInt("accountNum") - router, err := fabric.NewCloudRouter(ctx, "router", &fabric.CloudRouterArgs{ - Name: pulumi.String("My-Fabric-Cloud-Router"), + _, err := fabric.NewCloudRouter(ctx, "newCloudRouter", &fabric.CloudRouterArgs{ + Name: pulumi.String("Router-SV"), Type: pulumi.String("XF_ROUTER"), - Location: &fabric.CloudRouterLocationArgs{ - MetroCode: pulumi.String(metro), - }, - Package: &fabric.CloudRouterPackageArgs{ - Code: pulumi.String("BASIC"), - }, Notifications: fabric.CloudRouterNotificationArray{ &fabric.CloudRouterNotificationArgs{ Type: pulumi.String("ALL"), Emails: pulumi.StringArray{ pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), }, }, }, - Account: &fabric.CloudRouterAccountArgs{ - AccountNumber: pulumi.Int(272010), + Order: &fabric.CloudRouterOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + Location: &fabric.CloudRouterLocationArgs{ + MetroCode: pulumi.String("SV"), + }, + Package: &fabric.CloudRouterPackageArgs{ + Code: pulumi.String("STANDARD"), }, Project: &fabric.CloudRouterProjectArgs{ - ProjectId: pulumi.String("995072000433550"), - }, + ProjectId: pulumi.String("776847000642406"), + }, + Account: &fabric.CloudRouterAccountArgs{ + AccountNumber: pulumi.Int(203612), + }, }) if err != nil { return err } - ctx.Export("routerId", router.ID()) return nil }) } @@ -117,21 +114,10 @@ using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var metro = config.Get("metro") ?? "FR"; - var accountNum = config.RequireInt32("accountNum"); - var router = new Equinix.Fabric.CloudRouter("router", new() + var newCloudRouter = new Equinix.Fabric.CloudRouter("newCloudRouter", new() { - Name = "My-Fabric-Cloud-Router", + Name = "Router-SV", Type = "XF_ROUTER", - Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs - { - MetroCode = metro, - }, - Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs - { - Code = "BASIC", - }, Notifications = new[] { new Equinix.Fabric.Inputs.CloudRouterNotificationArgs @@ -140,23 +126,32 @@ return await Deployment.RunAsync(() => Emails = new[] { "example@equinix.com", + "test1@equinix.com", }, }, }, - Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs + Order = new Equinix.Fabric.Inputs.CloudRouterOrderArgs { - AccountNumber = 272010, + PurchaseOrderNumber = "1-323292", + }, + Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs + { + MetroCode = "SV", + }, + Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs + { + Code = "STANDARD", }, Project = new Equinix.Fabric.Inputs.CloudRouterProjectArgs { - ProjectId = "995072000433550", + ProjectId = "776847000642406", + }, + Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs + { + AccountNumber = 203612, }, }); - return new Dictionary - { - ["routerId"] = router.Id, - }; }); ``` ```java @@ -167,9 +162,11 @@ import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.equinix.fabric.CloudRouter; import com.pulumi.equinix.fabric.CloudRouterArgs; +import com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs; +import com.pulumi.equinix.fabric.inputs.CloudRouterOrderArgs; import com.pulumi.equinix.fabric.inputs.CloudRouterLocationArgs; import com.pulumi.equinix.fabric.inputs.CloudRouterPackageArgs; -import com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs; +import com.pulumi.equinix.fabric.inputs.CloudRouterProjectArgs; import com.pulumi.equinix.fabric.inputs.CloudRouterAccountArgs; import java.util.List; import java.util.ArrayList; @@ -184,60 +181,56 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("FR"); - final var accountNum = config.get("accountNum"); - var router = new CloudRouter("router", CloudRouterArgs.builder() - .name("My-Fabric-Cloud-Router") + var newCloudRouter = new CloudRouter("newCloudRouter", CloudRouterArgs.builder() + .name("Router-SV") .type("XF_ROUTER") + .notifications(CloudRouterNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .order(CloudRouterOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) .location(CloudRouterLocationArgs.builder() - .metroCode(metro) + .metroCode("SV") .build()) .package_(CloudRouterPackageArgs.builder() - .code("BASIC") + .code("STANDARD") .build()) - .notifications(CloudRouterNotificationArgs.builder() - .type("ALL") - .emails("example@equinix.com") + .project(CloudRouterProjectArgs.builder() + .projectId("776847000642406") .build()) .account(CloudRouterAccountArgs.builder() - .accountNumber(272010) - .build()) - .project(CloudRouterProjectArgs.builder() - .projectId("995072000433550") + .accountNumber("203612") .build()) .build()); - ctx.export("routerId", router.id()); } } ``` ```yaml -config: - metro: - type: string - default: FR - accountNum: - type: integer -resources: - router: + newCloudRouter: type: equinix:fabric:CloudRouter + name: new_cloud_router properties: - name: My-Fabric-Cloud-Router + name: Router-SV type: XF_ROUTER + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + order: + purchaseOrderNumber: 1-323292 location: - metroCode: ${metro} + metroCode: SV package: - code: BASIC - notifications: - - type: ALL - emails: - - example@equinix.com - account: - accountNumber: 272010 + code: STANDARD project: - projectId: 995072000433550 -outputs: - routerId: ${router.id} + projectId: '776847000642406' + account: + accountNumber: '203612' ``` {{% /example %}} diff --git a/docs/resource/equinix_fabric_connection.examples.md b/docs/resource/equinix_fabric_connection.examples.md index 19002c7f..15224093 100644 --- a/docs/resource/equinix_fabric_connection.examples.md +++ b/docs/resource/equinix_fabric_connection.examples.md @@ -1,215 +1,4521 @@ ## Example Usage + +{{% example %}} +### example 9 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const fcr2Azure = new equinix.fabric.Connection("fcr2azure", { + name: "ConnectionName", + type: "IP_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: "CLOUD_ROUTER", + router: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +fcr2_azure = equinix.fabric.Connection("fcr2azure", + name="ConnectionName", + type="IP_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type="CLOUD_ROUTER", + router=equinix.fabric.ConnectionASideAccessPointRouterArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "fcr2azure", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("IP_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String("CLOUD_ROUTER"), + Router: &fabric.ConnectionASideAccessPointRouterArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var fcr2Azure = new Equinix.Fabric.Connection("fcr2azure", new() + { + Name = "ConnectionName", + Type = "IP_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = "CLOUD_ROUTER", + Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var fcr2Azure = new Connection("fcr2Azure", ConnectionArgs.builder() + .name("ConnectionName") + .type("IP_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("CLOUD_ROUTER") + .router(ConnectionASideAccessPointRouterArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .peeringType("PRIVATE") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + fcr2azure: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: IP_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: CLOUD_ROUTER + router: + uuid: + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 5 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2Port = new equinix.fabric.Connection("vd2port", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "NETWORK", + id: 7, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.Dot1q, + vlanSTag: 3711, + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +vd2_port = equinix.fabric.Connection("vd2port", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="NETWORK", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q, + vlan_s_tag=3711, + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "vd2port", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("NETWORK"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), + VlanSTag: pulumi.Int(3711), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2Port = new Equinix.Fabric.Connection("vd2port", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "NETWORK", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + VlanSTag = 3711, + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2Port = new Connection("vd2Port", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("NETWORK") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder() + .type("DOT1Q") + .vlanSTag("3711") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + vd2port: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: NETWORK + id: 7 + zSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: DOT1Q + vlanSTag: '3711' + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 12 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const fcr2Network = new equinix.fabric.Connection("fcr2network", { + name: "ConnectionName", + type: "IPWAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: "CLOUD_ROUTER", + router: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +fcr2_network = equinix.fabric.Connection("fcr2network", + name="ConnectionName", + type="IPWAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type="CLOUD_ROUTER", + router=equinix.fabric.ConnectionASideAccessPointRouterArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) +``` +```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 { + _, err := fabric.NewConnection(ctx, "fcr2network", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("IPWAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String("CLOUD_ROUTER"), + Router: &fabric.ConnectionASideAccessPointRouterArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var fcr2Network = new Equinix.Fabric.Connection("fcr2network", new() + { + Name = "ConnectionName", + Type = "IPWAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = "CLOUD_ROUTER", + Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var fcr2Network = new Connection("fcr2Network", ConnectionArgs.builder() + .name("ConnectionName") + .type("IPWAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("CLOUD_ROUTER") + .router(ConnectionASideAccessPointRouterArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + fcr2network: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: IPWAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: CLOUD_ROUTER + router: + uuid: + zSide: + accessPoint: + type: NETWORK + network: + uuid: +``` +{{% /example %}} + +{{% example %}} +### example 11 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2AzurePrimary = new equinix.fabric.Connection("vd2azurePrimary", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + redundancy: { + priority: "PRIMARY", + }, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "CLOUD", + id: 7, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +const vd2AzureSecondary = new equinix.fabric.Connection("vd2azureSecondary", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + redundancy: { + priority: "SECONDARY", + group: vd2AzurePrimary.redundancy.apply(redundancy => redundancy?.group), + }, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "CLOUD", + id: 5, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +vd2_azure_primary = equinix.fabric.Connection("vd2azurePrimary", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + redundancy=equinix.fabric.ConnectionRedundancyArgs( + priority="PRIMARY", + ), + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +vd2_azure_secondary = equinix.fabric.Connection("vd2azureSecondary", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + redundancy=equinix.fabric.ConnectionRedundancyArgs( + priority="SECONDARY", + group=vd2_azure_primary.redundancy.group, + ), + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=5, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + vd2AzurePrimary, err := fabric.NewConnection(ctx, "vd2azurePrimary", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Redundancy: &fabric.ConnectionRedundancyArgs{ + Priority: pulumi.String("PRIMARY"), + }, + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + _, err = fabric.NewConnection(ctx, "vd2azureSecondary", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Redundancy: &fabric.ConnectionRedundancyArgs{ + Priority: pulumi.String("SECONDARY"), + Group: vd2AzurePrimary.Redundancy.ApplyT(func(redundancy fabric.ConnectionRedundancy) (*string, error) { + return &redundancy.Group, nil + }).(pulumi.StringPtrOutput), + }, + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(5), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2AzurePrimary = new Equinix.Fabric.Connection("vd2azurePrimary", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + { + Priority = "PRIMARY", + }, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "CLOUD", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + + var vd2AzureSecondary = new Equinix.Fabric.Connection("vd2azureSecondary", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + { + Priority = "SECONDARY", + Group = vd2AzurePrimary.Redundancy.Apply(redundancy => redundancy?.Group), + }, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "CLOUD", + Id = 5, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2AzurePrimary = new Connection("vd2AzurePrimary", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .redundancy(ConnectionRedundancyArgs.builder() + .priority("PRIMARY") + .build()) + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .peeringType("PRIVATE") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + var vd2AzureSecondary = new Connection("vd2AzureSecondary", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .redundancy(ConnectionRedundancyArgs.builder() + .priority("SECONDARY") + .group(vd2AzurePrimary.redundancy().applyValue(redundancy -> redundancy.group())) + .build()) + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(5) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .peeringType("PRIVATE") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + vd2azurePrimary: + type: equinix:fabric:Connection + name: vd2azure_primary + properties: + name: ConnectionName + type: EVPL_VC + redundancy: + priority: PRIMARY + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 7 + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV + vd2azureSecondary: + type: equinix:fabric:Connection + name: vd2azure_secondary + properties: + name: ConnectionName + type: EVPL_VC + redundancy: + priority: SECONDARY + group: ${vd2azurePrimary.redundancy.group} + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 5 + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 6 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2Token = new equinix.fabric.Connection("vd2token", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "NETWORK", + id: 7, + }, + }, + }, + zSide: { + serviceToken: { + uuid: "", + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +vd2_token = equinix.fabric.Connection("vd2token", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="NETWORK", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + service_token=equinix.fabric.ConnectionZSideServiceTokenArgs( + uuid="", + ), + )) +``` +```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 { + _, err := fabric.NewConnection(ctx, "vd2token", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("NETWORK"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + ServiceToken: &fabric.ConnectionZSideServiceTokenArgs{ + Uuid: pulumi.String(""), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2Token = new Equinix.Fabric.Connection("vd2token", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "NETWORK", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + ServiceToken = new Equinix.Fabric.Inputs.ConnectionZSideServiceTokenArgs + { + Uuid = "", + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideServiceTokenArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2Token = new Connection("vd2Token", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("NETWORK") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .serviceToken(ConnectionZSideServiceTokenArgs.builder() + .uuid("") + .build()) + .build()) + .build()); + + } +} +``` +```yaml + vd2token: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: NETWORK + id: 7 + zSide: + serviceToken: + uuid: +``` +{{% /example %}} + +{{% example %}} +### example 3 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const epl = new equinix.fabric.Connection("epl", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +epl = equinix.fabric.Connection("epl", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var epl = new Equinix.Fabric.Connection("epl", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var epl = new Connection("epl", ConnectionArgs.builder() + .name("ConnectionName") + .type("EPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + epl: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + zSide: + accessPoint: + type: COLO + port: + uuid: + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 14 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const epl = new equinix.fabric.Connection("epl", { + name: "ConnectionName", + type: "EPLAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +epl = equinix.fabric.Connection("epl", + name="ConnectionName", + type="EPLAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) +``` +```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 { + _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("EPLAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var epl = new Equinix.Fabric.Connection("epl", new() + { + Name = "ConnectionName", + Type = "EPLAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var epl = new Connection("epl", ConnectionArgs.builder() + .name("ConnectionName") + .type("EPLAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + epl: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EPLAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + zSide: + accessPoint: + type: NETWORK + network: + uuid: +``` +{{% /example %}} + +{{% example %}} +### example 4 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const accessEplVc = new equinix.fabric.Connection("accessEplVc", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.AccessEPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 1976, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +access_epl_vc = equinix.fabric.Connection("accessEplVc", + name="ConnectionName", + type=equinix.fabric.ConnectionType.ACCESS_EPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=1976, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "accessEplVc", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeAccessEPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(1976), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var accessEplVc = new Equinix.Fabric.Connection("accessEplVc", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.AccessEPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 1976, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var accessEplVc = new Connection("accessEplVc", ConnectionArgs.builder() + .name("ConnectionName") + .type("ACCESS_EPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("1976") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + accessEplVc: + type: equinix:fabric:Connection + name: access_epl_vc + properties: + name: ConnectionName + type: ACCESS_EPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '1976' + zSide: + accessPoint: + type: COLO + port: + uuid: + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 13 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2Token = new equinix.fabric.Connection("vd2token", { + name: "ConnectionName", + type: "EVPLAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "CLOUD", + id: 7, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +vd2_token = equinix.fabric.Connection("vd2token", + name="ConnectionName", + type="EVPLAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) +``` +```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 { + _, err := fabric.NewConnection(ctx, "vd2token", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("EVPLAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2Token = new Equinix.Fabric.Connection("vd2token", new() + { + Name = "ConnectionName", + Type = "EVPLAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "CLOUD", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2Token = new Connection("vd2Token", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPLAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + vd2token: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPLAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 7 + zSide: + accessPoint: + type: NETWORK + network: + uuid: +``` +{{% /example %}} + +{{% example %}} +### example 1 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const port2Port = new equinix.fabric.Connection("port2port", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 1976, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 3711, + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +port2_port = equinix.fabric.Connection("port2port", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=1976, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=3711, + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "port2port", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(1976), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(3711), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var port2Port = new Equinix.Fabric.Connection("port2port", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 1976, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 3711, + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var port2Port = new Connection("port2Port", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("1976") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("3711") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + port2port: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '1976' + zSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '3711' + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 8 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const fcr2Port = new equinix.fabric.Connection("fcr2port", { + name: "ConnectionName", + type: "IP_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: "CLOUD_ROUTER", + router: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.Dot1q, + vlanTag: 2711, + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +fcr2_port = equinix.fabric.Connection("fcr2port", + name="ConnectionName", + type="IP_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type="CLOUD_ROUTER", + router=equinix.fabric.ConnectionASideAccessPointRouterArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q, + vlan_tag=2711, + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "fcr2port", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("IP_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String("CLOUD_ROUTER"), + Router: &fabric.ConnectionASideAccessPointRouterArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), + VlanTag: pulumi.Int(2711), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var fcr2Port = new Equinix.Fabric.Connection("fcr2port", new() + { + Name = "ConnectionName", + Type = "IP_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = "CLOUD_ROUTER", + Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + VlanTag = 2711, + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var fcr2Port = new Connection("fcr2Port", ConnectionArgs.builder() + .name("ConnectionName") + .type("IP_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("CLOUD_ROUTER") + .router(ConnectionASideAccessPointRouterArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder() + .type("DOT1Q") + .vlanTag("2711") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + fcr2port: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: IP_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: CLOUD_ROUTER + router: + uuid: + zSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: DOT1Q + vlanTag: '2711' + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const port2Aws = new equinix.fabric.Connection("port2aws", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + redundancy: { + priority: "PRIMARY", + }, + order: { + purchaseOrderNumber: "1-323929", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 2019, + vlanCTag: 2112, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + sellerRegion: "us-west-1", + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, + additionalInfo: [ + { + key: "accessKey", + value: "", + }, + { + key: "secretKey", + value: "", + }, + ], +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +port2_aws = equinix.fabric.Connection("port2aws", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + redundancy=equinix.fabric.ConnectionRedundancyArgs( + priority="PRIMARY", + ), + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323929", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=2019, + vlan_c_tag=2112, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + seller_region="us-west-1", + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + ), + additional_info=[ + { + "key": "accessKey", + "value": "", + }, + { + "key": "secretKey", + "value": "", + }, + ]) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "port2aws", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Redundancy: &fabric.ConnectionRedundancyArgs{ + Priority: pulumi.String("PRIMARY"), + }, + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323929"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(2019), + VlanCTag: pulumi.Int(2112), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + SellerRegion: pulumi.String("us-west-1"), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + AdditionalInfo: pulumi.MapArray{ + pulumi.Map{ + "key": pulumi.Any("accessKey"), + "value": pulumi.Any(""), + }, + pulumi.Map{ + "key": pulumi.Any("secretKey"), + "value": pulumi.Any(""), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var port2Aws = new Equinix.Fabric.Connection("port2aws", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + { + Priority = "PRIMARY", + }, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323929", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 2019, + VlanCTag = 2112, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + SellerRegion = "us-west-1", + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + AdditionalInfo = new[] + { + + { + { "key", "accessKey" }, + { "value", "" }, + }, + + { + { "key", "secretKey" }, + { "value", "" }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var port2Aws = new Connection("port2Aws", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .redundancy(ConnectionRedundancyArgs.builder() + .priority("PRIMARY") + .build()) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323929") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("2019") + .vlanCTag("2112") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .sellerRegion("us-west-1") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .additionalInfo( + Map.ofEntries( + Map.entry("key", "accessKey"), + Map.entry("value", "") + ), + Map.ofEntries( + Map.entry("key", "secretKey"), + Map.entry("value", "") + )) + .build()); + + } +} +``` +```yaml + port2aws: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + redundancy: + priority: PRIMARY + order: + purchaseOrderNumber: 1-323929 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '2019' + vlanCTag: '2112' + zSide: + accessPoint: + type: SP + authenticationKey: + sellerRegion: us-west-1 + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV + additionalInfo: + - key: accessKey + value: + - key: secretKey + value: +``` +{{% /example %}} + {{% example %}} +### example 15 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const epl = new equinix.fabric.Connection("epl", { + name: "ConnectionName", + type: "EVPLAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.Dot1q, + vlanSTag: 1976, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +epl = equinix.fabric.Connection("epl", + name="ConnectionName", + type="EVPLAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q, + vlan_s_tag=1976, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) +``` +```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 { + _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("EVPLAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), + VlanSTag: pulumi.Int(1976), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var epl = new Equinix.Fabric.Connection("epl", new() + { + Name = "ConnectionName", + Type = "EVPLAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + VlanSTag = 1976, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var epl = new Connection("epl", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPLAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("DOT1Q") + .vlanSTag("1976") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + epl: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPLAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: DOT1Q + vlanSTag: '1976' + zSide: + accessPoint: + type: NETWORK + network: + uuid: +``` +{{% /example %}} +{{% example %}} +### example 10 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const metro = config.get("metro") || "FR"; -const speedInMbps = config.getNumber("speedInMbps") || 50; -const fabricPortName = config.require("fabricPortName"); -const awsRegion = config.get("awsRegion") || "eu-central-1"; -const awsAccountId = config.require("awsAccountId"); -const serviceProfileId = equinix.fabric.getServiceProfiles({ - filter: { - property: "/name", - operator: "=", - values: ["AWS Direct Connect"], - }, -}).then(invoke => invoke.data?.[0]?.uuid!); -const portId = equinix.fabric.getPorts({ - filter: { - name: fabricPortName, - }, -}).then(invoke => invoke.data?.[0]?.uuid!); -const colo2Aws = new equinix.fabric.Connection("colo2Aws", { - name: "Pulumi-colo2Aws", - type: "EVPL_VC", +const vd2Azure = new equinix.fabric.Connection("vd2azure", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, notifications: [{ - type: "ALL", - emails: ["example@equinix.com"], + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], }], - bandwidth: speedInMbps, - redundancy: { - priority: "PRIMARY", + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", }, aSide: { accessPoint: { - type: "COLO", - port: { - uuid: portId, + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", }, - linkProtocol: { - type: "DOT1Q", - vlanTag: 1234, + "interface": { + type: "CLOUD", + id: 7, }, }, }, zSide: { accessPoint: { - type: "SP", - authenticationKey: awsAccountId, - sellerRegion: awsRegion, + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, profile: { - type: "L2_PROFILE", - uuid: serviceProfileId, + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", }, location: { - metroCode: metro, + metroCode: equinix.index.Metro.SiliconValley, }, }, }, }); -export const connectionId = colo2Aws.id; -export const connectionStatus = colo2Aws.operation.apply(operation => operation.equinixStatus); -export const connectionProviderStatus = colo2Aws.operation.apply(operation => operation.providerStatus); -export const awsDirectConnectId = colo2Aws.zSide.apply(zSide => zSide.accessPoint?.providerConnectionId); ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "FR" -speed_in_mbps = config.get_int("speedInMbps") -if speed_in_mbps is None: - speed_in_mbps = 50 -fabric_port_name = config.require("fabricPortName") -aws_region = config.get("awsRegion") -if aws_region is None: - aws_region = "eu-central-1" -aws_account_id = config.require("awsAccountId") -service_profile_id = equinix.fabric.get_service_profiles(filter=equinix.fabric.GetServiceProfilesFilterArgs( - property="/name", - operator="=", - values=["AWS Direct Connect"], -)).data[0].uuid -port_id = equinix.fabric.get_ports(filter=equinix.fabric.GetPortsFilterArgs( - name=fabric_port_name, -)).data[0].uuid -colo2_aws = equinix.fabric.Connection("colo2Aws", - name="Pulumi-colo2Aws", - type="EVPL_VC", +vd2_azure = equinix.fabric.Connection("vd2azure", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, notifications=[equinix.fabric.ConnectionNotificationArgs( - type="ALL", - emails=["example@equinix.com"], + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], )], - bandwidth=speed_in_mbps, - redundancy=equinix.fabric.ConnectionRedundancyArgs( - priority="PRIMARY", + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", ), a_side=equinix.fabric.ConnectionASideArgs( access_point=equinix.fabric.ConnectionASideAccessPointArgs( - type="COLO", - port=equinix.fabric.ConnectionASideAccessPointPortArgs( - uuid=port_id, + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", ), - link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( - type="DOT1Q", - vlan_tag=1234, + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=7, ), ), ), z_side=equinix.fabric.ConnectionZSideArgs( access_point=equinix.fabric.ConnectionZSideAccessPointArgs( - type="SP", - authentication_key=aws_account_id, - seller_region=aws_region, + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( - type="L2_PROFILE", - uuid=service_profile_id, + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", ), location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( - metro_code=metro, + metro_code=equinix.Metro.SILICON_VALLEY, ), ), )) -pulumi.export("connectionId", colo2_aws.id) -pulumi.export("connectionStatus", colo2_aws.operation.equinix_status) -pulumi.export("connectionProviderStatus", colo2_aws.operation.provider_status) -pulumi.export("awsDirectConnectId", colo2_aws.z_side.access_point.provider_connection_id) ``` ```go package main import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - speedInMbps := 50 - if param := cfg.GetInt("speedInMbps"); param != 0 { - speedInMbps = param - } - fabricPortName := cfg.Require("fabricPortName") - awsRegion := "eu-central-1" - if param := cfg.Get("awsRegion"); param != "" { - awsRegion = param - } - awsAccountId := cfg.Require("awsAccountId") - serviceProfileId := fabric.GetServiceProfiles(ctx, &fabric.GetServiceProfilesArgs{ - Filter: fabric.GetServiceProfilesFilter{ - Property: pulumi.StringRef("/name"), - Operator: pulumi.StringRef("="), - Values: []string{ - "AWS Direct Connect", - }, - }, - }, nil).Data[0].Uuid - portId := fabric.GetPorts(ctx, &fabric.GetPortsArgs{ - Filter: fabric.GetPortsFilter{ - Name: pulumi.StringRef(fabricPortName), - }, - }, nil).Data[0].Uuid - colo2Aws, err := fabric.NewConnection(ctx, "colo2Aws", &fabric.ConnectionArgs{ - Name: pulumi.String("Pulumi-colo2Aws"), - Type: pulumi.String("EVPL_VC"), + _, err := fabric.NewConnection(ctx, "vd2azure", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), Notifications: fabric.ConnectionNotificationArray{ &fabric.ConnectionNotificationArgs{ - Type: pulumi.String("ALL"), + Type: pulumi.String(fabric.NotificationsTypeAll), Emails: pulumi.StringArray{ pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), }, }, }, - Bandwidth: pulumi.Int(speedInMbps), - Redundancy: &fabric.ConnectionRedundancyArgs{ - Priority: pulumi.String("PRIMARY"), + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), }, ASide: &fabric.ConnectionASideArgs{ AccessPoint: &fabric.ConnectionASideAccessPointArgs{ - Type: pulumi.String("COLO"), - Port: &fabric.ConnectionASideAccessPointPortArgs{ - Uuid: *pulumi.String(portId), + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), }, - LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ - Type: pulumi.String("DOT1Q"), - VlanTag: pulumi.Int(1234), + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(7), }, }, }, ZSide: &fabric.ConnectionZSideArgs{ AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ - Type: pulumi.String("SP"), - AuthenticationKey: pulumi.String(awsAccountId), - SellerRegion: pulumi.String(awsRegion), + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ - Type: pulumi.String("L2_PROFILE"), - Uuid: *pulumi.String(serviceProfileId), + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), }, Location: &fabric.ConnectionZSideAccessPointLocationArgs{ - MetroCode: pulumi.String(metro), + MetroCode: pulumi.String(equinix.MetroSiliconValley), }, }, }, @@ -217,87 +4523,53 @@ func main() { if err != nil { return err } - ctx.Export("connectionId", colo2Aws.ID()) - ctx.Export("connectionStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { - return &operation.EquinixStatus, nil - }).(pulumi.StringPtrOutput)) - ctx.Export("connectionProviderStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { - return &operation.ProviderStatus, nil - }).(pulumi.StringPtrOutput)) - ctx.Export("awsDirectConnectId", colo2Aws.ZSide.ApplyT(func(zSide fabric.ConnectionZSide) (*string, error) { - return &zSide.AccessPoint.ProviderConnectionId, nil - }).(pulumi.StringPtrOutput)) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var metro = config.Get("metro") ?? "FR"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 50; - var fabricPortName = config.Require("fabricPortName"); - var awsRegion = config.Get("awsRegion") ?? "eu-central-1"; - var awsAccountId = config.Require("awsAccountId"); - var serviceProfileId = Equinix.Fabric.GetServiceProfiles.Invoke(new() - { - Filter = new Equinix.Fabric.Inputs.GetServiceProfilesFilterInputArgs - { - Property = "/name", - Operator = "=", - Values = new[] - { - "AWS Direct Connect", - }, - }, - }).Apply(invoke => invoke.Data[0]?.Uuid); - - var portId = Equinix.Fabric.GetPorts.Invoke(new() + var vd2Azure = new Equinix.Fabric.Connection("vd2azure", new() { - Filter = new Equinix.Fabric.Inputs.GetPortsFilterInputArgs - { - Name = fabricPortName, - }, - }).Apply(invoke => invoke.Data[0]?.Uuid); - - var colo2Aws = new Equinix.Fabric.Connection("colo2Aws", new() - { - Name = "Pulumi-colo2Aws", - Type = "EVPL_VC", + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, Notifications = new[] { new Equinix.Fabric.Inputs.ConnectionNotificationArgs { - Type = "ALL", + Type = Equinix.Fabric.NotificationsType.All, Emails = new[] { "example@equinix.com", + "test1@equinix.com", }, }, }, - Bandwidth = speedInMbps, - Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs { - Priority = "PRIMARY", + PurchaseOrderNumber = "1-323292", }, ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs { AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs { - Type = "COLO", - Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs { - Uuid = portId, + Type = "EDGE", + Uuid = "", }, - LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs { - Type = "DOT1Q", - VlanTag = 1234, + Type = "CLOUD", + Id = 7, }, }, }, @@ -305,29 +4577,22 @@ return await Deployment.RunAsync(() => { AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs { - Type = "SP", - AuthenticationKey = awsAccountId, - SellerRegion = awsRegion, + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs { - Type = "L2_PROFILE", - Uuid = serviceProfileId, + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", }, Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs { - MetroCode = metro, + MetroCode = Equinix.Metro.SiliconValley, }, }, }, }); - return new Dictionary - { - ["connectionId"] = colo2Aws.Id, - ["connectionStatus"] = colo2Aws.Operation.Apply(operation => operation.EquinixStatus), - ["connectionProviderStatus"] = colo2Aws.Operation.Apply(operation => operation.ProviderStatus), - ["awsDirectConnectId"] = colo2Aws.ZSide.Apply(zSide => zSide.AccessPoint?.ProviderConnectionId), - }; }); ``` ```java @@ -335,23 +4600,25 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.fabric.Connection; -import com.equinix.pulumi.fabric.ConnectionArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionNotificationArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionRedundancyArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointPortArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointProfileArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointLocationArgs; -import com.equinix.pulumi.fabric.inputs.GetServiceProfilesArgs; -import com.equinix.pulumi.fabric.inputs.GetServiceProfilesFilterArgs; -import com.equinix.pulumi.fabric.inputs.GetPortsArgs; -import com.equinix.pulumi.fabric.inputs.GetPortsFilterArgs; -import com.equinix.pulumi.fabric.FabricFunctions; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -359,142 +4626,372 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("FR"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("50")); - final var fabricPortName = config.get("fabricPortName").get().toString(); - final var awsRegion = config.get("awsRegion").orElse("eu-central-1"); - final var awsAccountId = config.get("awsAccountId").get().toString(); - System.out.println(System.getProperty("java.classpath")); - final var serviceProfileId = FabricFunctions.getServiceProfiles(GetServiceProfilesArgs.builder() - .filter(GetServiceProfilesFilterArgs.builder() - .property("/name") - .operator("=") - .values("AWS Direct Connect") - .build()) - .build()).applyValue(data -> data.data().get(0).uuid().get()); - - final var portId = FabricFunctions.getPorts(GetPortsArgs.builder() - .filter(GetPortsFilterArgs.builder() - .name(fabricPortName) - .build()) - .build()).applyValue(data -> data.data().get(0).uuid().get()); - - var colo2Aws = new Connection("colo2Aws", ConnectionArgs.builder() - .name("Pulumi-colo2Aws") + var vd2Azure = new Connection("vd2Azure", ConnectionArgs.builder() + .name("ConnectionName") .type("EVPL_VC") .notifications(ConnectionNotificationArgs.builder() .type("ALL") - .emails("example@equinix.com") + .emails( + "example@equinix.com", + "test1@equinix.com") .build()) - .bandwidth(speedInMbps) - .redundancy(ConnectionRedundancyArgs.builder() - .priority("PRIMARY") + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") .build()) .aSide(ConnectionASideArgs.builder() .accessPoint(ConnectionASideAccessPointArgs.builder() - .type("COLO") - .port(ConnectionASideAccessPointPortArgs.builder() - .uuid(portId) + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") .build()) - .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() - .type("DOT1Q") - .vlanTag(1234) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(7) .build()) .build()) .build()) .zSide(ConnectionZSideArgs.builder() .accessPoint(ConnectionZSideAccessPointArgs.builder() .type("SP") - .authenticationKey(awsAccountId) - .sellerRegion(awsRegion) + .authenticationKey("") + .peeringType("PRIVATE") .profile(ConnectionZSideAccessPointProfileArgs.builder() .type("L2_PROFILE") - .uuid(serviceProfileId) + .uuid("") .build()) .location(ConnectionZSideAccessPointLocationArgs.builder() - .metroCode(metro) + .metroCode("SV") .build()) .build()) .build()) .build()); - ctx.export("connectionId", colo2Aws.id()); - ctx.export("connectionStatus", colo2Aws.operation().applyValue(operation -> operation.equinixStatus())); - ctx.export("connectionProviderStatus", colo2Aws.operation().applyValue(operation -> operation.providerStatus())); - ctx.export("awsDirectConnectId", colo2Aws.zSide().applyValue(zSide -> zSide.accessPoint().get().providerConnectionId())); } } ``` ```yaml -config: - metro: - type: string - default: FR - speedInMbps: - type: integer - default: 50 - fabricPortName: - type: string - awsRegion: - type: string - default: eu-central-1 - awsAccountId: - type: string -variables: - serviceProfileId: - fn::invoke: - function: equinix:fabric:getServiceProfiles - arguments: - filter: - property: /name - operator: "=" - values: - - AWS Direct Connect - return: data[0].uuid - portId: - fn::invoke: - function: equinix:fabric:getPorts - arguments: - filter: - name: ${fabricPortName} - return: data[0].uuid -resources: - colo2Aws: + vd2azure: type: equinix:fabric:Connection properties: - name: Pulumi-colo2Aws + name: ConnectionName type: EVPL_VC notifications: - - type: ALL - emails: - - example@equinix.com - bandwidth: ${speedInMbps} - redundancy: - priority: PRIMARY + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 aSide: accessPoint: - type: COLO - port: - uuid: ${portId} - linkProtocol: - type: DOT1Q - vlanTag: 1234 + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 7 + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 7 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const token2Aws = new equinix.fabric.Connection("token2aws", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + serviceToken: { + uuid: "", + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + sellerRegion: "us-west-1", + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +token2_aws = equinix.fabric.Connection("token2aws", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + service_token=equinix.fabric.ConnectionASideServiceTokenArgs( + uuid="", + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + seller_region="us-west-1", + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "token2aws", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + ServiceToken: &fabric.ConnectionASideServiceTokenArgs{ + Uuid: pulumi.String(""), + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + SellerRegion: pulumi.String("us-west-1"), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var token2Aws = new Equinix.Fabric.Connection("token2aws", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + ServiceToken = new Equinix.Fabric.Inputs.ConnectionASideServiceTokenArgs + { + Uuid = "", + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + SellerRegion = "us-west-1", + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideServiceTokenArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var token2Aws = new Connection("token2Aws", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .serviceToken(ConnectionASideServiceTokenArgs.builder() + .uuid("") + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .sellerRegion("us-west-1") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} +``` +```yaml + token2aws: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + serviceToken: + uuid: zSide: accessPoint: type: SP - authenticationKey: ${awsAccountId} - sellerRegion: ${awsRegion} + authenticationKey: + sellerRegion: us-west-1 profile: type: L2_PROFILE - uuid: ${serviceProfileId} + uuid: location: - metroCode: ${metro} -outputs: - connectionId: ${colo2Aws.id} - connectionStatus: ${colo2Aws.operation.equinixStatus} - connectionProviderStatus: ${colo2Aws.operation.providerStatus} - awsDirectConnectId: ${colo2Aws.zSide.accessPoint.providerConnectionId} + metroCode: SV ``` {{% /example %}} + diff --git a/docs/resource/equinix_fabric_network.examples.md b/docs/resource/equinix_fabric_network.examples.md new file mode 100644 index 00000000..8991f878 --- /dev/null +++ b/docs/resource/equinix_fabric_network.examples.md @@ -0,0 +1,166 @@ +## Example Usage +{{% example %}} +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const newNetwork = new equinix.fabric.Network("newNetwork", { + name: "Network-SV", + type: "EVPLAN", + scope: "GLOBAL", + notifications: [{ + type: "ALL", + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + project: { + projectId: "776847000642406", + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +new_network = equinix.fabric.Network("newNetwork", + name="Network-SV", + type="EVPLAN", + scope="GLOBAL", + notifications=[equinix.fabric.NetworkNotificationArgs( + type="ALL", + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + project=equinix.fabric.NetworkProjectArgs( + project_id="776847000642406", + )) +``` +```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 { + _, err := fabric.NewNetwork(ctx, "newNetwork", &fabric.NetworkArgs{ + Name: pulumi.String("Network-SV"), + Type: pulumi.String("EVPLAN"), + Scope: pulumi.String("GLOBAL"), + Notifications: fabric.NetworkNotificationArray{ + &fabric.NetworkNotificationArgs{ + Type: pulumi.String("ALL"), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Project: &fabric.NetworkProjectArgs{ + ProjectId: pulumi.String("776847000642406"), + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var newNetwork = new Equinix.Fabric.Network("newNetwork", new() + { + Name = "Network-SV", + Type = "EVPLAN", + Scope = "GLOBAL", + Notifications = new[] + { + new Equinix.Fabric.Inputs.NetworkNotificationArgs + { + Type = "ALL", + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Project = new Equinix.Fabric.Inputs.NetworkProjectArgs + { + ProjectId = "776847000642406", + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Network; +import com.pulumi.equinix.fabric.NetworkArgs; +import com.pulumi.equinix.fabric.inputs.NetworkNotificationArgs; +import com.pulumi.equinix.fabric.inputs.NetworkProjectArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var newNetwork = new Network("newNetwork", NetworkArgs.builder() + .name("Network-SV") + .type("EVPLAN") + .scope("GLOBAL") + .notifications(NetworkNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .project(NetworkProjectArgs.builder() + .projectId("776847000642406") + .build()) + .build()); + + } +} +``` +```yaml + newNetwork: + type: equinix:fabric:Network + name: new_network + properties: + name: Network-SV + type: EVPLAN + scope: GLOBAL + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + project: + projectId: '776847000642406' +``` +{{% /example %}} diff --git a/docs/resource/equinix_fabric_routing_protocol.examples.md b/docs/resource/equinix_fabric_routing_protocol.examples.md index a7bf2241..c63be278 100644 --- a/docs/resource/equinix_fabric_routing_protocol.examples.md +++ b/docs/resource/equinix_fabric_routing_protocol.examples.md @@ -1,40 +1,67 @@ ## Example Usage -{{% example %}} +{{% example %}} +### example 3 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const connectionId = config.require("connectionId"); -const routingProtocol = new equinix.fabric.RoutingProtocol("RoutingProtocol", { - connectionUuid: connectionId, - name: "My-Direct-route-1", +const direct = new equinix.fabric.RoutingProtocol("direct", { + connectionUuid: "", type: "DIRECT", + name: "direct_rp", directIpv4: { - equinixIfaceIp: "192.168.100.1/30", + equinixIfaceIp: "190.1.1.1/30", + }, + directIpv6: { + equinixIfaceIp: "190::1:1/126", }, }); -export const routingProtocolId = routingProtocol.id; -export const routingProtocolState = routingProtocol.state; -export const routingProtocolEquinixAsn = routingProtocol.equinixAsn; +const bgp = new equinix.fabric.RoutingProtocol("bgp", { + connectionUuid: "", + type: "BGP", + name: "bgp_rp", + bgpIpv4: { + customerPeerIp: "190.1.1.2", + enabled: true, + }, + bgpIpv6: { + customerPeerIp: "190::1:2", + enabled: true, + }, + customerAsn: 4532, +}, { + dependsOn: [direct], +}); ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -connection_id = config.require("connectionId") -routing_protocol = equinix.fabric.RoutingProtocol("RoutingProtocol", - connection_uuid=connection_id, - name="My-Direct-route-1", +direct = equinix.fabric.RoutingProtocol("direct", + connection_uuid="", type="DIRECT", + name="direct_rp", direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args( - equinix_iface_ip="192.168.100.1/30", + equinix_iface_ip="190.1.1.1/30", + ), + direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args( + equinix_iface_ip="190::1:1/126", )) -pulumi.export("routingProtocolId", routing_protocol.id) -pulumi.export("routingProtocolState", routing_protocol.state) -pulumi.export("routingProtocolEquinixAsn", routing_protocol.equinix_asn) +bgp = equinix.fabric.RoutingProtocol("bgp", + connection_uuid="", + type="BGP", + name="bgp_rp", + bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args( + customer_peer_ip="190.1.1.2", + enabled=True, + ), + bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args( + customer_peer_ip="190::1:2", + enabled=True, + ), + customer_asn=4532, + opts = pulumi.ResourceOptions(depends_on=[direct])) ``` ```go package main @@ -42,27 +69,43 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - connectionId := cfg.Require("connectionId") - routingProtocol, err := fabric.NewRoutingProtocol(ctx, "RoutingProtocol", &fabric.RoutingProtocolArgs{ - ConnectionUuid: pulumi.String(connectionId), - Name: pulumi.String("My-Direct-route-1"), + direct, err := fabric.NewRoutingProtocol(ctx, "direct", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), Type: pulumi.String("DIRECT"), + Name: pulumi.String("direct_rp"), DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ - EquinixIfaceIp: pulumi.String("192.168.100.1/30"), + EquinixIfaceIp: pulumi.String("190.1.1.1/30"), + }, + DirectIpv6: &fabric.RoutingProtocolDirectIpv6Args{ + EquinixIfaceIp: pulumi.String("190::1:1/126"), }, }) if err != nil { return err } - ctx.Export("routingProtocolId", routingProtocol.ID()) - ctx.Export("routingProtocolState", routingProtocol.State) - ctx.Export("routingProtocolEquinixAsn", routingProtocol.EquinixAsn) + _, err = fabric.NewRoutingProtocol(ctx, "bgp", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), + Type: pulumi.String("BGP"), + Name: pulumi.String("bgp_rp"), + BgpIpv4: &fabric.RoutingProtocolBgpIpv4Args{ + CustomerPeerIp: pulumi.String("190.1.1.2"), + Enabled: pulumi.Bool(true), + }, + BgpIpv6: &fabric.RoutingProtocolBgpIpv6Args{ + CustomerPeerIp: pulumi.String("190::1:2"), + Enabled: pulumi.Bool(true), + }, + CustomerAsn: pulumi.Int(4532), + }, pulumi.DependsOn([]pulumi.Resource{ + direct, + })) + if err != nil { + return err + } return nil }) } @@ -75,25 +118,45 @@ using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var connectionId = config.Require("connectionId"); - var routingProtocol = new Equinix.Fabric.RoutingProtocol("RoutingProtocol", new() + var direct = new Equinix.Fabric.RoutingProtocol("direct", new() { - ConnectionUuid = connectionId, - Name = "My-Direct-route-1", + ConnectionUuid = "", Type = "DIRECT", + Name = "direct_rp", DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args { - EquinixIfaceIp = "192.168.100.1/30", + EquinixIfaceIp = "190.1.1.1/30", + }, + DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args + { + EquinixIfaceIp = "190::1:1/126", }, }); - return new Dictionary + var bgp = new Equinix.Fabric.RoutingProtocol("bgp", new() { - ["routingProtocolId"] = routingProtocol.Id, - ["routingProtocolState"] = routingProtocol.State, - ["routingProtocolEquinixAsn"] = routingProtocol.EquinixAsn, - }; + ConnectionUuid = "", + Type = "BGP", + Name = "bgp_rp", + BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args + { + CustomerPeerIp = "190.1.1.2", + Enabled = true, + }, + BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args + { + CustomerPeerIp = "190::1:2", + Enabled = true, + }, + CustomerAsn = 4532, + }, new CustomResourceOptions + { + DependsOn = + { + direct, + }, + }); + }); ``` ```java @@ -105,6 +168,10 @@ import com.pulumi.core.Output; import com.pulumi.equinix.fabric.RoutingProtocol; import com.pulumi.equinix.fabric.RoutingProtocolArgs; import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args; +import com.pulumi.resources.CustomResourceOptions; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -118,39 +185,360 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var connectionId = config.get("connectionId"); - var routingProtocol = new RoutingProtocol("routingProtocol", RoutingProtocolArgs.builder() - .connectionUuid(connectionId) - .name("My-Direct-route-1") + var direct = new RoutingProtocol("direct", RoutingProtocolArgs.builder() + .connectionUuid("") .type("DIRECT") + .name("direct_rp") .directIpv4(RoutingProtocolDirectIpv4Args.builder() - .equinixIfaceIp("192.168.100.1/30") + .equinixIfaceIp("190.1.1.1/30") + .build()) + .directIpv6(RoutingProtocolDirectIpv6Args.builder() + .equinixIfaceIp("190::1:1/126") .build()) .build()); - ctx.export("routingProtocolId", routingProtocol.id()); - ctx.export("routingProtocolState", routingProtocol.state()); - ctx.export("routingProtocolEquinixAsn", routingProtocol.equinixAsn()); + var bgp = new RoutingProtocol("bgp", RoutingProtocolArgs.builder() + .connectionUuid("") + .type("BGP") + .name("bgp_rp") + .bgpIpv4(RoutingProtocolBgpIpv4Args.builder() + .customerPeerIp("190.1.1.2") + .enabled(true) + .build()) + .bgpIpv6(RoutingProtocolBgpIpv6Args.builder() + .customerPeerIp("190::1:2") + .enabled(true) + .build()) + .customerAsn(4532) + .build(), CustomResourceOptions.builder() + .dependsOn(direct) + .build()); + } } ``` ```yaml -config: - connectionId: - type: string -resources: - RoutingProtocol: + direct: type: equinix:fabric:RoutingProtocol properties: - connectionUuid: ${connectionId} - name: My-Direct-route-1 + connectionUuid: type: DIRECT + name: direct_rp directIpv4: - equinixIfaceIp: 192.168.100.1/30 -outputs: - routingProtocolId: ${RoutingProtocol.id} - routingProtocolState: ${RoutingProtocol.state} - routingProtocolEquinixAsn: ${RoutingProtocol.equinixAsn} + equinixIfaceIp: 190.1.1.1/30 + directIpv6: + equinixIfaceIp: 190::1:1/126 + bgp: + type: equinix:fabric:RoutingProtocol + properties: + connectionUuid: + type: BGP + name: bgp_rp + bgpIpv4: + customerPeerIp: 190.1.1.2 + enabled: true + bgpIpv6: + customerPeerIp: 190::1:2 + enabled: true + customerAsn: 4532 + options: + dependson: + - ${direct} ``` {{% /example %}} + +{{% example %}} +### example 1 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const direct = new equinix.fabric.RoutingProtocol("direct", { + connectionUuid: "", + type: "DIRECT", + name: "direct_rp", + directIpv4: { + equinixIfaceIp: "190.1.1.1/30", + }, + directIpv6: { + equinixIfaceIp: "190::1:1/126", + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +direct = equinix.fabric.RoutingProtocol("direct", + connection_uuid="", + type="DIRECT", + name="direct_rp", + direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args( + equinix_iface_ip="190.1.1.1/30", + ), + direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args( + equinix_iface_ip="190::1:1/126", + )) +``` +```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 { + _, err := fabric.NewRoutingProtocol(ctx, "direct", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), + Type: pulumi.String("DIRECT"), + Name: pulumi.String("direct_rp"), + DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ + EquinixIfaceIp: pulumi.String("190.1.1.1/30"), + }, + DirectIpv6: &fabric.RoutingProtocolDirectIpv6Args{ + EquinixIfaceIp: pulumi.String("190::1:1/126"), + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var direct = new Equinix.Fabric.RoutingProtocol("direct", new() + { + ConnectionUuid = "", + Type = "DIRECT", + Name = "direct_rp", + DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args + { + EquinixIfaceIp = "190.1.1.1/30", + }, + DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args + { + EquinixIfaceIp = "190::1:1/126", + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.RoutingProtocol; +import com.pulumi.equinix.fabric.RoutingProtocolArgs; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var direct = new RoutingProtocol("direct", RoutingProtocolArgs.builder() + .connectionUuid("") + .type("DIRECT") + .name("direct_rp") + .directIpv4(RoutingProtocolDirectIpv4Args.builder() + .equinixIfaceIp("190.1.1.1/30") + .build()) + .directIpv6(RoutingProtocolDirectIpv6Args.builder() + .equinixIfaceIp("190::1:1/126") + .build()) + .build()); + + } +} +``` +```yaml + direct: + type: equinix:fabric:RoutingProtocol + properties: + connectionUuid: + type: DIRECT + name: direct_rp + directIpv4: + equinixIfaceIp: 190.1.1.1/30 + directIpv6: + equinixIfaceIp: 190::1:1/126 +``` +{{% /example %}} + +{{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const bgp = new equinix.fabric.RoutingProtocol("bgp", { + connectionUuid: "", + type: "BGP", + name: "bgp_rp", + bgpIpv4: { + customerPeerIp: "190.1.1.2", + enabled: true, + }, + bgpIpv6: { + customerPeerIp: "190::1:2", + enabled: true, + }, + customerAsn: 4532, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +bgp = equinix.fabric.RoutingProtocol("bgp", + connection_uuid="", + type="BGP", + name="bgp_rp", + bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args( + customer_peer_ip="190.1.1.2", + enabled=True, + ), + bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args( + customer_peer_ip="190::1:2", + enabled=True, + ), + customer_asn=4532) +``` +```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 { + _, err := fabric.NewRoutingProtocol(ctx, "bgp", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), + Type: pulumi.String("BGP"), + Name: pulumi.String("bgp_rp"), + BgpIpv4: &fabric.RoutingProtocolBgpIpv4Args{ + CustomerPeerIp: pulumi.String("190.1.1.2"), + Enabled: pulumi.Bool(true), + }, + BgpIpv6: &fabric.RoutingProtocolBgpIpv6Args{ + CustomerPeerIp: pulumi.String("190::1:2"), + Enabled: pulumi.Bool(true), + }, + CustomerAsn: pulumi.Int(4532), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var bgp = new Equinix.Fabric.RoutingProtocol("bgp", new() + { + ConnectionUuid = "", + Type = "BGP", + Name = "bgp_rp", + BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args + { + CustomerPeerIp = "190.1.1.2", + Enabled = true, + }, + BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args + { + CustomerPeerIp = "190::1:2", + Enabled = true, + }, + CustomerAsn = 4532, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.RoutingProtocol; +import com.pulumi.equinix.fabric.RoutingProtocolArgs; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var bgp = new RoutingProtocol("bgp", RoutingProtocolArgs.builder() + .connectionUuid("") + .type("BGP") + .name("bgp_rp") + .bgpIpv4(RoutingProtocolBgpIpv4Args.builder() + .customerPeerIp("190.1.1.2") + .enabled(true) + .build()) + .bgpIpv6(RoutingProtocolBgpIpv6Args.builder() + .customerPeerIp("190::1:2") + .enabled(true) + .build()) + .customerAsn(4532) + .build()); + + } +} +``` +```yaml + bgp: + type: equinix:fabric:RoutingProtocol + properties: + connectionUuid: + type: BGP + name: bgp_rp + bgpIpv4: + customerPeerIp: 190.1.1.2 + enabled: true + bgpIpv6: + customerPeerIp: 190::1:2 + enabled: true + customerAsn: 4532 +``` +{{% /example %}} + + diff --git a/docs/resource/equinix_fabric_service_profile.examples.md b/docs/resource/equinix_fabric_service_profile.examples.md index c803b60c..6ea70f8e 100644 --- a/docs/resource/equinix_fabric_service_profile.examples.md +++ b/docs/resource/equinix_fabric_service_profile.examples.md @@ -1,102 +1,75 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const profile = new equinix.fabric.ServiceProfile("profile", { - name: "Example Cloud Provider", - description: "50 to 500 Mbps Hosted Connection to Example Cloud", - type: "L2_PROFILE", +const newServiceProfile = new equinix.fabric.ServiceProfile("newServiceProfile", { + description: "Service Profile for Receiving Connections", + name: "Name Of Business + Use Case Tag", + type: equinix.fabric.ProfileType.L2Profile, + visibility: equinix.fabric.ProfileVisibility.Public, + notifications: [{ + emails: ["someone@sample.com"], + type: "BANDWIDTH_ALERT", + }], + allowedEmails: [ + "test@equinix.com", + "testagain@equinix.com", + ], + ports: [{ + uuid: "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee", + type: "XF_PORT", + }], accessPointTypeConfigs: [{ - type: "COLO", + type: equinix.fabric.ProfileAccessPointType.Colo, + allowRemoteConnections: true, + allowCustomBandwidth: true, + allowBandwidthAutoApproval: false, + connectionRedundancyRequired: false, + connectionLabel: "Service Profile Tag1", + bandwidthAlertThreshold: 10, supportedBandwidths: [ - 50, 100, - 200, 500, ], - allowRemoteConnections: true, - allowCustomBandwidth: false, - allowBandwidthAutoApproval: false, - linkProtocolConfig: { - encapsulationStrategy: "CTAGED", - reuseVlanSTag: false, - encapsulation: "DOT1Q", - }, - enableAutoGenerateServiceKey: "false,", - connectionRedundancyRequired: "false,", - apiConfig: { - apiAvailable: true, - integrationId: "Example-Connect-01", - bandwidthFromApi: false, - }, - connectionLabel: "Virtual Circuit Name", - authenticationKey: { - required: true, - label: "Example ACCOUNT ID", - }, }], - account: { - organizationName: "Example Cloud", - globalOrganizationName: "Example Global", - }, - metros: undefined, - visibility: "PUBLIC", - marketingInfo: { - promotion: true, - }, }); -export const profileId = profile.id; ``` ```python import pulumi import pulumi_equinix as equinix -profile = equinix.fabric.ServiceProfile("profile", - name="Example Cloud Provider", - description="50 to 500 Mbps Hosted Connection to Example Cloud", - type="L2_PROFILE", +new_service_profile = equinix.fabric.ServiceProfile("newServiceProfile", + description="Service Profile for Receiving Connections", + name="Name Of Business + Use Case Tag", + type=equinix.fabric.ProfileType.L2_PROFILE, + visibility=equinix.fabric.ProfileVisibility.PUBLIC, + notifications=[equinix.fabric.ServiceProfileNotificationArgs( + emails=["someone@sample.com"], + type="BANDWIDTH_ALERT", + )], + allowed_emails=[ + "test@equinix.com", + "testagain@equinix.com", + ], + ports=[equinix.fabric.ServiceProfilePortArgs( + uuid="c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee", + type="XF_PORT", + )], access_point_type_configs=[equinix.fabric.ServiceProfileAccessPointTypeConfigArgs( - type="COLO", + type=equinix.fabric.ProfileAccessPointType.COLO, + allow_remote_connections=True, + allow_custom_bandwidth=True, + allow_bandwidth_auto_approval=False, + connection_redundancy_required=False, + connection_label="Service Profile Tag1", + bandwidth_alert_threshold=10, supported_bandwidths=[ - 50, 100, - 200, 500, ], - allow_remote_connections=True, - allow_custom_bandwidth=False, - allow_bandwidth_auto_approval=False, - link_protocol_config=equinix.fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs( - encapsulation_strategy="CTAGED", - reuse_vlan_s_tag=False, - encapsulation="DOT1Q", - ), - enable_auto_generate_service_key="false,", - connection_redundancy_required="false,", - api_config=equinix.fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs( - api_available=True, - integration_id="Example-Connect-01", - bandwidth_from_api=False, - ), - connection_label="Virtual Circuit Name", - authentication_key=equinix.fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs( - required=True, - label="Example ACCOUNT ID", - ), - )], - account=equinix.fabric.ServiceProfileAccountArgs( - organization_name="Example Cloud", - global_organization_name="Example Global", - ), - metros=None, - visibility="PUBLIC", - marketing_info=equinix.fabric.ServiceProfileMarketingInfoArgs( - promotion=True, - )) -pulumi.export("profileId", profile.id) + )]) ``` ```go package main @@ -108,125 +81,110 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - profile, err := fabric.NewServiceProfile(ctx, "profile", &fabric.ServiceProfileArgs{ - Name: pulumi.String("Example Cloud Provider"), - Description: pulumi.String("50 to 500 Mbps Hosted Connection to Example Cloud"), - Type: pulumi.String("L2_PROFILE"), + _, err := fabric.NewServiceProfile(ctx, "newServiceProfile", &fabric.ServiceProfileArgs{ + Description: pulumi.String("Service Profile for Receiving Connections"), + Name: pulumi.String("Name Of Business + Use Case Tag"), + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Visibility: pulumi.String(fabric.ProfileVisibilityPublic), + Notifications: fabric.ServiceProfileNotificationArray{ + &fabric.ServiceProfileNotificationArgs{ + Emails: pulumi.StringArray{ + pulumi.String("someone@sample.com"), + }, + Type: pulumi.String("BANDWIDTH_ALERT"), + }, + }, + AllowedEmails: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + pulumi.String("testagain@equinix.com"), + }, + Ports: fabric.ServiceProfilePortArray{ + &fabric.ServiceProfilePortArgs{ + Uuid: pulumi.String("c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee"), + Type: pulumi.String("XF_PORT"), + }, + }, AccessPointTypeConfigs: fabric.ServiceProfileAccessPointTypeConfigArray{ &fabric.ServiceProfileAccessPointTypeConfigArgs{ - Type: pulumi.String("COLO"), + Type: pulumi.String(fabric.ProfileAccessPointTypeColo), + AllowRemoteConnections: pulumi.Bool(true), + AllowCustomBandwidth: pulumi.Bool(true), + AllowBandwidthAutoApproval: pulumi.Bool(false), + ConnectionRedundancyRequired: pulumi.Bool(false), + ConnectionLabel: pulumi.String("Service Profile Tag1"), + BandwidthAlertThreshold: pulumi.Float64(10), SupportedBandwidths: pulumi.IntArray{ - pulumi.Int(50), pulumi.Int(100), - pulumi.Int(200), pulumi.Int(500), }, - AllowRemoteConnections: pulumi.Bool(true), - AllowCustomBandwidth: pulumi.Bool(false), - AllowBandwidthAutoApproval: pulumi.Bool(false), - LinkProtocolConfig: &fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs{ - EncapsulationStrategy: pulumi.String("CTAGED"), - ReuseVlanSTag: pulumi.Bool(false), - Encapsulation: pulumi.String("DOT1Q"), - }, - EnableAutoGenerateServiceKey: pulumi.Bool("false,"), - ConnectionRedundancyRequired: pulumi.Bool("false,"), - ApiConfig: &fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs{ - ApiAvailable: pulumi.Bool(true), - IntegrationId: pulumi.String("Example-Connect-01"), - BandwidthFromApi: pulumi.Bool(false), - }, - ConnectionLabel: pulumi.String("Virtual Circuit Name"), - AuthenticationKey: &fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs{ - Required: pulumi.Bool(true), - Label: pulumi.String("Example ACCOUNT ID"), - }, }, }, - Account: &fabric.ServiceProfileAccountArgs{ - OrganizationName: pulumi.String("Example Cloud"), - GlobalOrganizationName: pulumi.String("Example Global"), - }, - Metros: nil, - Visibility: pulumi.String("PUBLIC"), - MarketingInfo: &fabric.ServiceProfileMarketingInfoArgs{ - Promotion: pulumi.Bool(true), - }, }) if err != nil { return err } - ctx.Export("profileId", profile.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var profile = new Equinix.Fabric.ServiceProfile("profile", new() + var newServiceProfile = new Equinix.Fabric.ServiceProfile("newServiceProfile", new() { - Name = "Example Cloud Provider", - Description = "50 to 500 Mbps Hosted Connection to Example Cloud", - Type = "L2_PROFILE", + Description = "Service Profile for Receiving Connections", + Name = "Name Of Business + Use Case Tag", + Type = Equinix.Fabric.ProfileType.L2Profile, + Visibility = Equinix.Fabric.ProfileVisibility.Public, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ServiceProfileNotificationArgs + { + Emails = new[] + { + "someone@sample.com", + }, + Type = "BANDWIDTH_ALERT", + }, + }, + AllowedEmails = new[] + { + "test@equinix.com", + "testagain@equinix.com", + }, + Ports = new[] + { + new Equinix.Fabric.Inputs.ServiceProfilePortArgs + { + Uuid = "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee", + Type = "XF_PORT", + }, + }, AccessPointTypeConfigs = new[] { new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigArgs { - Type = "COLO", + Type = Equinix.Fabric.ProfileAccessPointType.Colo, + AllowRemoteConnections = true, + AllowCustomBandwidth = true, + AllowBandwidthAutoApproval = false, + ConnectionRedundancyRequired = false, + ConnectionLabel = "Service Profile Tag1", + BandwidthAlertThreshold = 10, SupportedBandwidths = new[] { - 50, 100, - 200, 500, }, - AllowRemoteConnections = true, - AllowCustomBandwidth = false, - AllowBandwidthAutoApproval = false, - LinkProtocolConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs - { - EncapsulationStrategy = "CTAGED", - ReuseVlanSTag = false, - Encapsulation = "DOT1Q", - }, - EnableAutoGenerateServiceKey = "false,", - ConnectionRedundancyRequired = "false,", - ApiConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs - { - ApiAvailable = true, - IntegrationId = "Example-Connect-01", - BandwidthFromApi = false, - }, - ConnectionLabel = "Virtual Circuit Name", - AuthenticationKey = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs - { - Required = true, - Label = "Example ACCOUNT ID", - }, }, }, - Account = new Equinix.Fabric.Inputs.ServiceProfileAccountArgs - { - OrganizationName = "Example Cloud", - GlobalOrganizationName = "Example Global", - }, - Metros = null, - Visibility = "PUBLIC", - MarketingInfo = new Equinix.Fabric.Inputs.ServiceProfileMarketingInfoArgs - { - Promotion = true, - }, }); - return new Dictionary - { - ["profileId"] = profile.Id, - }; }); ``` ```java @@ -234,14 +192,18 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.fabric.ServiceProfile; -import com.equinix.pulumi.fabric.ServiceProfileArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccountArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileMarketingInfoArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.ServiceProfile; +import com.pulumi.equinix.fabric.ServiceProfileArgs; +import com.pulumi.equinix.fabric.inputs.ServiceProfileNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ServiceProfilePortArgs; +import com.pulumi.equinix.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -249,89 +211,68 @@ public class App { } public static void stack(Context ctx) { - var profile = new ServiceProfile("profile", ServiceProfileArgs.builder() - .name("Example Cloud Provider") - .description("50 to 500 Mbps Hosted Connection to Example Cloud") + var newServiceProfile = new ServiceProfile("newServiceProfile", ServiceProfileArgs.builder() + .description("Service Profile for Receiving Connections") + .name("Name Of Business + Use Case Tag") .type("L2_PROFILE") + .visibility("PUBLIC") + .notifications(ServiceProfileNotificationArgs.builder() + .emails("someone@sample.com") + .type("BANDWIDTH_ALERT") + .build()) + .allowedEmails( + "test@equinix.com", + "testagain@equinix.com") + .ports(ServiceProfilePortArgs.builder() + .uuid("c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee") + .type("XF_PORT") + .build()) .accessPointTypeConfigs(ServiceProfileAccessPointTypeConfigArgs.builder() .type("COLO") - .supportedBandwidths( - 50, - 100, - 200, - 500) .allowRemoteConnections(true) - .allowCustomBandwidth(false) + .allowCustomBandwidth(true) .allowBandwidthAutoApproval(false) - .linkProtocolConfig(ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs.builder() - .encapsulationStrategy("CTAGED") - .reuseVlanSTag(false) - .encapsulation("DOT1Q") - .build()) - .enableAutoGenerateServiceKey(false) .connectionRedundancyRequired(false) - .apiConfig(ServiceProfileAccessPointTypeConfigApiConfigArgs.builder() - .apiAvailable(true) - .integrationId("Example-Connect-01") - .bandwidthFromApi(false) - .build()) - .connectionLabel("Virtual Circuit Name") - .authenticationKey(ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs.builder() - .required(true) - .label("Example ACCOUNT ID") - .build()) - .build()) - .account(ServiceProfileAccountArgs.builder() - .organizationName("Example Cloud") - .globalOrganizationName("Example Global") - .build()) - .visibility("PUBLIC") - .marketingInfo(ServiceProfileMarketingInfoArgs.builder() - .promotion(true) + .connectionLabel("Service Profile Tag1") + .bandwidthAlertThreshold(10) + .supportedBandwidths( + 100, + 500) .build()) .build()); - ctx.export("profileId", profile.id()); } } ``` ```yaml -resources: - profile: + newServiceProfile: type: equinix:fabric:ServiceProfile + name: new_service_profile properties: - name: Example Cloud Provider - description: 50 to 500 Mbps Hosted Connection to Example Cloud + description: Service Profile for Receiving Connections + name: Name Of Business + Use Case Tag type: L2_PROFILE - accessPointTypeConfigs: - - type: COLO - supportedBandwidths: [ 50, 100, 200, 500] - allowRemoteConnections: true - allowCustomBandwidth: false - allowBandwidthAutoApproval: false - linkProtocolConfig: - encapsulationStrategy: CTAGED - reuseVlanSTag: false - encapsulation: DOT1Q - enableAutoGenerateServiceKey: false, - connectionRedundancyRequired: false, - apiConfig: - apiAvailable: true - integrationId: Example-Connect-01 - bandwidthFromApi: false - connectionLabel: Virtual Circuit Name - authenticationKey: - required: true - label: Example ACCOUNT ID - account: - organizationName: Example Cloud - globalOrganizationName: Example Global - metros: visibility: PUBLIC - marketingInfo: - promotion: true -outputs: - profileId: ${profile.id} + notifications: + - emails: + - someone@sample.com + type: BANDWIDTH_ALERT + allowedEmails: + - test@equinix.com + - testagain@equinix.com + ports: + - uuid: c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee + type: XF_PORT + accessPointTypeConfigs: + - type: COLO + allowRemoteConnections: true + allowCustomBandwidth: true + allowBandwidthAutoApproval: false + connectionRedundancyRequired: false + connectionLabel: Service Profile Tag1 + bandwidthAlertThreshold: 10 + supportedBandwidths: + - 100 + - 500 ``` {{% /example %}} - diff --git a/docs/resource/equinix_metal_bgp_session.examples.md b/docs/resource/equinix_metal_bgp_session.examples.md index 33ada724..b1a5fa38 100644 --- a/docs/resource/equinix_metal_bgp_session.examples.md +++ b/docs/resource/equinix_metal_bgp_session.examples.md @@ -1,73 +1,291 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; +import * as _null from "@pulumi/null"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const bgp = new equinix.metal.BgpSession("bgp", { - deviceId: deviceId, +const bgpPassword = "955dB0b81Ef"; +const projectId = ""; +const addr = new equinix.metal.ReservedIpBlock("addr", { + projectId: projectId, + metro: "ny", + quantity: 1, +}); +const interfaceLo0 = pulumi.interpolate`auto lo:0 +iface lo:0 inet static + address ${addr.address} + netmask ${addr.netmask} +`; +const test = new equinix.metal.Device("test", { + hostname: "terraform-test-bgp-sesh", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}); +const birdConf = pulumi.all([addr.address, addr.cidr, test.network, test.network]).apply(([address, cidr, testNetwork, testNetwork1]) => `filter equinix_metal_bgp { + if net = ${address}/${cidr} then accept; +} +router id ${testNetwork[2].address}; +protocol direct { + interface "lo"; +} +protocol kernel { + scan time 10; + persist; + import all; + export all; +} +protocol device { + scan time 10; +} +protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor ${testNetwork1[2].gateway} as 65530; + password "${bgpPassword}"; +} +`); +const testBgpSession = new equinix.metal.BgpSession("testBgpSession", { + deviceId: test.id, addressFamily: "ipv4", }); -export const bgpSessionStatus = bgp.status; +const configureBird = new _null.Resource("configureBird", {triggers: { + bird_conf: birdConf, + "interface": interfaceLo0, +}}); ``` ```python import pulumi import pulumi_equinix as equinix +import pulumi_null as null -config = pulumi.Config() -device_id = config.require("deviceId") -bgp = equinix.metal.BgpSession("bgp", - device_id=device_id, +bgp_password = "955dB0b81Ef" +project_id = "" +addr = equinix.metal.ReservedIpBlock("addr", + project_id=project_id, + metro="ny", + quantity=1) +interface_lo0 = pulumi.Output.all(addr.address, addr.netmask).apply(lambda address, netmask: f"""auto lo:0 +iface lo:0 inet static + address {address} + netmask {netmask} +""") +test = equinix.metal.Device("test", + hostname="terraform-test-bgp-sesh", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id) +bird_conf = pulumi.Output.all(addr.address, addr.cidr, test.network, test.network).apply(lambda address, cidr, testNetwork, testNetwork1: f"""filter equinix_metal_bgp {{ + if net = {address}/{cidr} then accept; +}} +router id {test_network[2].address}; +protocol direct {{ + interface "lo"; +}} +protocol kernel {{ + scan time 10; + persist; + import all; + export all; +}} +protocol device {{ + scan time 10; +}} +protocol bgp {{ + export filter equinix_metal_bgp; + local as 65000; + neighbor {test_network1[2].gateway} as 65530; + password "{bgp_password}"; +}} +""") +test_bgp_session = equinix.metal.BgpSession("testBgpSession", + device_id=test.id, address_family="ipv4") -pulumi.export("bgpSessionStatus", bgp.status) +configure_bird = null.Resource("configureBird", triggers={ + "bird_conf": bird_conf, + "interface": interface_lo0, +}) ``` ```go package main import ( + "fmt" + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi-null/sdk/go/null" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - bgp, err := metal.NewBgpSession(ctx, "bgp", &metal.BgpSessionArgs{ - DeviceId: pulumi.String(deviceId), + bgpPassword := "955dB0b81Ef" + projectId := "" + addr, err := metal.NewReservedIpBlock(ctx, "addr", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.String(projectId), + Metro: pulumi.String("ny"), + Quantity: pulumi.Int(1), + }) + if err != nil { + return err + } + interfaceLo0 := pulumi.All(addr.Address, addr.Netmask).ApplyT(func(_args []interface{}) (string, error) { + address := _args[0].(string) + netmask := _args[1].(string) + return fmt.Sprintf("auto lo:0\niface lo:0 inet static\n address %v\n netmask %v\n", address, netmask), nil + }).(pulumi.StringOutput) + test, err := metal.NewDevice(ctx, "test", &metal.DeviceArgs{ + Hostname: pulumi.String("terraform-test-bgp-sesh"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.String(projectId), + }) + if err != nil { + return err + } + birdConf := pulumi.All(addr.Address, addr.Cidr, test.Network, test.Network).ApplyT(func(_args []interface{}) (string, error) { + address := _args[0].(string) + cidr := _args[1].(int) + testNetwork := _args[2].([]metal.DeviceNetwork) + testNetwork1 := _args[3].([]metal.DeviceNetwork) + return fmt.Sprintf(`filter equinix_metal_bgp { + if net = %v/%v then accept; +} +router id %v; +protocol direct { + interface "lo"; +} +protocol kernel { + scan time 10; + persist; + import all; + export all; +} +protocol device { + scan time 10; +} +protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor %v as 65530; + password "%v"; +} +`, address, cidr, testNetwork[2].Address, testNetwork1[2].Gateway, bgpPassword), nil + }).(pulumi.StringOutput) + _, err = metal.NewBgpSession(ctx, "testBgpSession", &metal.BgpSessionArgs{ + DeviceId: test.ID(), AddressFamily: pulumi.String("ipv4"), }) if err != nil { return err } - ctx.Export("bgpSessionStatus", bgp.Status) + _, err = null.NewResource(ctx, "configureBird", &null.ResourceArgs{ + Triggers: pulumi.StringMap{ + "bird_conf": pulumi.String(birdConf), + "interface": pulumi.String(interfaceLo0), + }, + }) + if err != nil { + return err + } return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; +using Null = Pulumi.Null; return await Deployment.RunAsync(() => { - var config = new Config(); - var deviceId = config.Require("deviceId"); - var bgp = new Equinix.Metal.BgpSession("bgp", new() + var bgpPassword = "955dB0b81Ef"; + + var projectId = ""; + + var addr = new Equinix.Metal.ReservedIpBlock("addr", new() + { + ProjectId = projectId, + Metro = "ny", + Quantity = 1, + }); + + var interfaceLo0 = Output.Tuple(addr.Address, addr.Netmask).Apply(values => { - DeviceId = deviceId, + var address = values.Item1; + var netmask = values.Item2; + return @$"auto lo:0 +iface lo:0 inet static + address {address} + netmask {netmask} +"; + }); + + var test = new Equinix.Metal.Device("test", new() + { + Hostname = "terraform-test-bgp-sesh", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }); + + var birdConf = Output.Tuple(addr.Address, addr.Cidr, test.Network, test.Network).Apply(values => + { + var address = values.Item1; + var cidr = values.Item2; + var testNetwork = values.Item3; + var testNetwork1 = values.Item4; + return @$"filter equinix_metal_bgp {{ + if net = {address}/{cidr} then accept; +}} +router id {testNetwork[2].Address}; +protocol direct {{ + interface ""lo""; +}} +protocol kernel {{ + scan time 10; + persist; + import all; + export all; +}} +protocol device {{ + scan time 10; +}} +protocol bgp {{ + export filter equinix_metal_bgp; + local as 65000; + neighbor {testNetwork1[2].Gateway} as 65530; + password ""{bgpPassword}""; +}} +"; + }); + + var testBgpSession = new Equinix.Metal.BgpSession("testBgpSession", new() + { + DeviceId = test.Id, AddressFamily = "ipv4", }); - return new Dictionary + var configureBird = new Null.Resource("configureBird", new() { - ["bgpSessionStatus"] = bgp.Status, - }; + Triggers = + { + { "bird_conf", birdConf }, + { "interface", interfaceLo0 }, + }, + }); + }); ``` ```java @@ -75,8 +293,21 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.BgpSession; -import com.equinix.pulumi.metal.BgpSessionArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.BgpSession; +import com.pulumi.equinix.metal.BgpSessionArgs; +import com.pulumi.null.Resource; +import com.pulumi.null.ResourceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -84,28 +315,151 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - var bgp = new BgpSession("bgp", BgpSessionArgs.builder() - .deviceId(deviceId) + final var bgpPassword = "955dB0b81Ef"; + + final var projectId = ""; + + var addr = new ReservedIpBlock("addr", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("ny") + .quantity(1) + .build()); + + final var interfaceLo0 = Output.tuple(addr.address(), addr.netmask()).applyValue(values -> { + var address = values.t1; + var netmask = values.t2; + return """ +auto lo:0 +iface lo:0 inet static + address %s + netmask %s +", address,netmask); + }); + + var test = new Device("test", DeviceArgs.builder() + .hostname("terraform-test-bgp-sesh") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + final var birdConf = Output.tuple(addr.address(), addr.cidr(), test.network(), test.network()).applyValue(values -> { + var address = values.t1; + var cidr = values.t2; + var testNetwork = values.t3; + var testNetwork1 = values.t4; + return """ +filter equinix_metal_bgp { + if net = %s/%s then accept; +} +router id %s; +protocol direct { + interface "lo"; +} +protocol kernel { + scan time 10; + persist; + import all; + export all; +} +protocol device { + scan time 10; +} +protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor %s as 65530; + password "%s"; +} +", address,cidr,testNetwork[2].address(),testNetwork1[2].gateway(),bgpPassword); + }); + + var testBgpSession = new BgpSession("testBgpSession", BgpSessionArgs.builder() + .deviceId(test.id()) .addressFamily("ipv4") .build()); - ctx.export("bgpSessionStatus", bgp.status()); + var configureBird = new Resource("configureBird", ResourceArgs.builder() + .triggers(Map.ofEntries( + Map.entry("bird_conf", birdConf), + Map.entry("interface", interfaceLo0) + )) + .build()); + } } ``` ```yaml -config: - deviceId: - type: string -resources: - bgp: + # you need to enable BGP config for the project. If you decide to create new + # project, you can use the bgp_config section to enable BGP. + # resource "equinix_metal_project" "test" { + # name = "testpro" + # bgp_config { + # deployment_type = "local" + # md5 = local.bgp_password + # asn = 65000 + # } + # } + addr: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: ny + quantity: 1 + test: + type: equinix:metal:Device + properties: + hostname: terraform-test-bgp-sesh + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + testBgpSession: type: equinix:metal:BgpSession + name: test properties: - deviceId: ${deviceId} + deviceId: ${test.id} addressFamily: ipv4 -outputs: - bgpSessionStatus: ${bgp.status} + configureBird: + type: null:Resource + name: configure_bird + properties: + triggers: + bird_conf: ${birdConf} + interface: ${interfaceLo0} +variables: + bgpPassword: 955dB0b81Ef + projectId: + interfaceLo0: | + auto lo:0 + iface lo:0 inet static + address ${addr.address} + netmask ${addr.netmask} + birdConf: | + filter equinix_metal_bgp { + if net = ${addr.address}/${addr.cidr} then accept; + } + router id ${test.network[2].address}; + protocol direct { + interface "lo"; + } + protocol kernel { + scan time 10; + persist; + import all; + export all; + } + protocol device { + scan time 10; + } + protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor ${test.network[2].gateway} as 65530; + password "${bgpPassword}"; + } ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_connection.examples.md b/docs/resource/equinix_metal_connection.examples.md index 28a77ecb..4d3952fd 100644 --- a/docs/resource/equinix_metal_connection.examples.md +++ b/docs/resource/equinix_metal_connection.examples.md @@ -1,6 +1,190 @@ ## Example Usage + {{% example %}} +### example metal billed token +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const config = new pulumi.Config(); +const projectId = config.require("projectId"); +const metro = config.get("metro") || "SV"; +const speedInMbps = config.getNumber("speedInMbps") || 1000; +const connection = new equinix.metal.Interconnection("connection", { + name: "metal-to-cloudprovider", + projectId: projectId, + type: "shared", + redundancy: "primary", + metro: metro, + speed: `${speedInMbps}Mbps`, + serviceTokenType: "a_side", +}); +export const connectionStatus = connection.status; +export const connectionTokens = connection.serviceTokens; +``` +```python +import pulumi +import pulumi_equinix as equinix +config = pulumi.Config() +project_id = config.require("projectId") +metro = config.get("metro") +if metro is None: + metro = "SV" +speed_in_mbps = config.get_int("speedInMbps") +if speed_in_mbps is None: + speed_in_mbps = 1000 +connection = equinix.metal.Interconnection("connection", + name="metal-to-cloudprovider", + project_id=project_id, + type="shared", + redundancy="primary", + metro=metro, + speed=f"{speed_in_mbps}Mbps", + service_token_type="a_side") +pulumi.export("connectionStatus", connection.status) +pulumi.export("connectionTokens", connection.service_tokens) +``` +```go +package main + +import ( + "fmt" + + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + cfg := config.New(ctx, "") + projectId := cfg.Require("projectId") + metro := "SV" + if param := cfg.Get("metro"); param != "" { + metro = param + } + speedInMbps := 1000 + if param := cfg.GetInt("speedInMbps"); param != 0 { + speedInMbps = param + } + connection, err := metal.NewInterconnection(ctx, "connection", &metal.InterconnectionArgs{ + Name: pulumi.String("metal-to-cloudprovider"), + ProjectId: pulumi.String(projectId), + Type: pulumi.String("shared"), + Redundancy: pulumi.String("primary"), + Metro: pulumi.String(metro), + Speed: pulumi.String(fmt.Sprintf("%vMbps", speedInMbps)), + ServiceTokenType: pulumi.String("a_side"), + }) + if err != nil { + return err + } + ctx.Export("connectionStatus", connection.Status) + ctx.Export("connectionTokens", connection.ServiceTokens) + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var config = new Config(); + var projectId = config.Require("projectId"); + var metro = config.Get("metro") ?? "SV"; + var speedInMbps = config.GetInt32("speedInMbps") ?? 1000; + var connection = new Equinix.Metal.Interconnection("connection", new() + { + Name = "metal-to-cloudprovider", + ProjectId = projectId, + Type = "shared", + Redundancy = "primary", + Metro = metro, + Speed = $"{speedInMbps}Mbps", + ServiceTokenType = "a_side", + }); + + return new Dictionary + { + ["connectionStatus"] = connection.Status, + ["connectionTokens"] = connection.ServiceTokens, + }; +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Interconnection; +import com.pulumi.equinix.metal.InterconnectionArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var config = ctx.config(); + final var projectId = config.get("projectId"); + final var metro = config.get("metro").orElse("SV"); + final var speedInMbps = config.get("speedInMbps").orElse(1000); + var connection = new Interconnection("connection", InterconnectionArgs.builder() + .name("metal-to-cloudprovider") + .projectId(projectId) + .type("shared") + .redundancy("primary") + .metro(metro) + .speed(String.format("%sMbps", speedInMbps)) + .serviceTokenType("a_side") + .build()); + + ctx.export("connectionStatus", connection.status()); + ctx.export("connectionTokens", connection.serviceTokens()); + } +} +``` +```yaml +config: + projectId: + type: string + metro: + type: string + default: SV + speedInMbps: + type: integer + default: 1000 +resources: + connection: + type: equinix:metal:Interconnection + properties: + name: metal-to-cloudprovider + projectId: ${projectId} + type: shared + redundancy: primary + metro: ${metro} + speed: ${speedInMbps}Mbps + serviceTokenType: a_side +outputs: + connectionStatus: ${connection.status} + connectionTokens: ${connection.serviceTokens} +``` +{{% /example %}} + +{{% example %}} +### example fabric billed token ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; @@ -87,6 +271,7 @@ func main() { ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; @@ -95,7 +280,7 @@ return await Deployment.RunAsync(() => var config = new Config(); var projectId = config.Require("projectId"); var metro = config.Get("metro") ?? "SV"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 200; + var speedInMbps = config.GetInt32("speedInMbps") ?? 200; var connection = new Equinix.Metal.Interconnection("connection", new() { Name = "fabric-port-to-metal", @@ -120,8 +305,8 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Interconnection; -import com.equinix.pulumi.metal.InterconnectionArgs; +import com.pulumi.equinix.metal.Interconnection; +import com.pulumi.equinix.metal.InterconnectionArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -136,10 +321,10 @@ public class App { public static void stack(Context ctx) { final var config = ctx.config(); - final var projectId = config.get("projectId").get(); + final var projectId = config.get("projectId"); final var metro = config.get("metro").orElse("SV"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("200")); - var connection = new Interconnection("connection", InterconnectionArgs.builder() + final var speedInMbps = config.get("speedInMbps").orElse(200); + var connection = new Interconnection("connection", InterconnectionArgs.builder() .name("fabric-port-to-metal") .projectId(projectId) .type("shared") @@ -180,3 +365,5 @@ outputs: connectionTokens: ${connection.serviceTokens} ``` {{% /example %}} + + diff --git a/docs/resource/equinix_metal_device.examples.md b/docs/resource/equinix_metal_device.examples.md index 1666d2d1..02d2e057 100644 --- a/docs/resource/equinix_metal_device.examples.md +++ b/docs/resource/equinix_metal_device.examples.md @@ -1,93 +1,413 @@ ## Example Usage -{{% example %}} +{{% example %}} +### example 1 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const web = new equinix.metal.Device("web", { - hostname: "webserver1", - plan: "c3.small.x86", - operatingSystem: "ubuntu_20_04", +const web1 = new equinix.metal.Device("web1", { + hostname: "tf.coreos2", + plan: equinix.metal.Plan.C3SmallX86, metro: "sv", - billingCycle: "hourly", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, projectId: projectId, }); -export const webPublicIp = pulumi.interpolate`http://${web.accessPublicIpv4}`; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -web = equinix.metal.Device("web", - hostname="webserver1", - plan="c3.small.x86", - operating_system="ubuntu_20_04", +web1 = equinix.metal.Device("web1", + hostname="tf.coreos2", + plan=equinix.metal.Plan.C3_SMALL_X86, metro="sv", - billing_cycle="hourly", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, project_id=project_id) -pulumi.export("webPublicIp", web.access_public_ipv4.apply(lambda access_public_ipv4: f"http://{access_public_ipv4}")) ``` ```go package main import ( - "fmt" - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - web, err := metal.NewDevice(ctx, "web", &metal.DeviceArgs{ - Hostname: pulumi.String("webserver1"), - Plan: pulumi.String("c3.small.x86"), - OperatingSystem: pulumi.String("ubuntu_20_04"), + _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2"), + Plan: pulumi.String(metal.PlanC3SmallX86), Metro: pulumi.String("sv"), - BillingCycle: pulumi.String("hourly"), - ProjectId: pulumi.String(projectId), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), }) if err != nil { return err } - ctx.Export("webPublicIp", web.AccessPublicIpv4.ApplyT(func(accessPublicIpv4 string) (string, error) { - return fmt.Sprintf("http://%v", accessPublicIpv4), nil - }).(pulumi.StringOutput)) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var web = new Equinix.Metal.Device("web", new() + var web1 = new Equinix.Metal.Device("web1", new() { - Hostname = "webserver1", - Plan = "c3.small.x86", - OperatingSystem = "ubuntu_20_04", + Hostname = "tf.coreos2", + Plan = Equinix.Metal.Plan.C3SmallX86, Metro = "sv", - BillingCycle = "hourly", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, ProjectId = projectId, }); - return new Dictionary +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var web1 = new Device("web1", DeviceArgs.builder() + .hostname("tf.coreos2") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + } +} +``` +```yaml + web1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2 + plan: c3.small.x86 + metro: sv + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} +``` +{{% /example %}} + +{{% example %}} +### example 4 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const web1 = new equinix.metal.Device("web1", { + hostname: "tftest", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + hardwareReservationId: "next-available", + storage: `{ + "disks": [ { - ["webPublicIp"] = web.AccessPublicIpv4.Apply(accessPublicIpv4 => $"http://{accessPublicIpv4}"), - }; + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} +`, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +web1 = equinix.metal.Device("web1", + hostname="tftest", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + hardware_reservation_id="next-available", + storage="""{ + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} +""") +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ + Hostname: pulumi.String("tftest"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + HardwareReservationId: pulumi.String("next-available"), + Storage: pulumi.String(`{ + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} +`), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var web1 = new Equinix.Metal.Device("web1", new() + { + Hostname = "tftest", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + HardwareReservationId = "next-available", + Storage = @"{ + ""disks"": [ + { + ""device"": ""/dev/sda"", + ""wipeTable"": true, + ""partitions"": [ + { + ""label"": ""BIOS"", + ""number"": 1, + ""size"": ""4096"" + }, + { + ""label"": ""SWAP"", + ""number"": 2, + ""size"": ""3993600"" + }, + { + ""label"": ""ROOT"", + ""number"": 3, + ""size"": ""0"" + } + ] + } + ], + ""filesystems"": [ + { + ""mount"": { + ""device"": ""/dev/sda3"", + ""format"": ""ext4"", + ""point"": ""/"", + ""create"": { + ""options"": [ + ""-L"", + ""ROOT"" + ] + } + } + }, + { + ""mount"": { + ""device"": ""/dev/sda2"", + ""format"": ""swap"", + ""point"": ""none"", + ""create"": { + ""options"": [ + ""-L"", + ""SWAP"" + ] + } + } + } + ] +} +", + }); + }); ``` ```java @@ -95,8 +415,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Device; -import com.equinix.pulumi.metal.DeviceArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -104,36 +431,602 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - var web = new Device("web", DeviceArgs.builder() - .hostname("webserver1") + var web1 = new Device("web1", DeviceArgs.builder() + .hostname("tftest") .plan("c3.small.x86") + .metro("ny") .operatingSystem("ubuntu_20_04") - .metro("sv") .billingCycle("hourly") .projectId(projectId) + .hardwareReservationId("next-available") + .storage(""" +{ + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} + """) .build()); - ctx.export("webPublicIp", web.accessPublicIpv4().applyValue(accessPublicIpv4 -> String.format("http://%s", accessPublicIpv4))); } } ``` ```yaml -config: - projectId: - type: string -resources: - web: + web1: type: equinix:metal:Device properties: - hostname: webserver1 + hostname: tftest plan: c3.small.x86 + metro: ny operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + hardwareReservationId: next-available + storage: | + { + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] + } +``` +{{% /example %}} + +{{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const pxe1 = new equinix.metal.Device("pxe1", { + hostname: "tf.coreos2-pxe", + plan: equinix.metal.Plan.C3SmallX86, + metro: "sv", + operatingSystem: equinix.metal.OperatingSystem.CustomIPXE, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + ipxeScriptUrl: "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + alwaysPxe: false, + userData: example.rendered, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +pxe1 = equinix.metal.Device("pxe1", + hostname="tf.coreos2-pxe", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="sv", + operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + always_pxe=False, + user_data=example["rendered"]) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "pxe1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2-pxe"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("sv"), + OperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + IpxeScriptUrl: pulumi.String("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe"), + AlwaysPxe: pulumi.Bool(false), + UserData: pulumi.Any(example.Rendered), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var pxe1 = new Equinix.Metal.Device("pxe1", new() + { + Hostname = "tf.coreos2-pxe", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "sv", + OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + IpxeScriptUrl = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + AlwaysPxe = false, + UserData = example.Rendered, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var pxe1 = new Device("pxe1", DeviceArgs.builder() + .hostname("tf.coreos2-pxe") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("custom_ipxe") + .billingCycle("hourly") + .projectId(projectId) + .ipxeScriptUrl("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe") + .alwaysPxe("false") + .userData(example.rendered()) + .build()); + + } +} +``` +```yaml + pxe1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2-pxe + plan: c3.small.x86 + metro: sv + operatingSystem: custom_ipxe + billingCycle: hourly + projectId: ${projectId} + ipxeScriptUrl: https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe + alwaysPxe: 'false' + userData: ${example.rendered} +``` +{{% /example %}} + +{{% example %}} +### example 5 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const pxe1 = new equinix.metal.Device("pxe1", { + hostname: "tf.coreos2-pxe", + plan: equinix.metal.Plan.C3SmallX86, + metro: "sv", + operatingSystem: equinix.metal.OperatingSystem.CustomIPXE, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + ipxeScriptUrl: "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + alwaysPxe: false, + userData: userData, + customData: customData, + behavior: { + allowChanges: [ + "custom_data", + "user_data", + ], + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +pxe1 = equinix.metal.Device("pxe1", + hostname="tf.coreos2-pxe", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="sv", + operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + always_pxe=False, + user_data=user_data, + custom_data=custom_data, + behavior=equinix.metal.DeviceBehaviorArgs( + allow_changes=[ + "custom_data", + "user_data", + ], + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "pxe1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2-pxe"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("sv"), + OperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + IpxeScriptUrl: pulumi.String("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe"), + AlwaysPxe: pulumi.Bool(false), + UserData: pulumi.Any(userData), + CustomData: pulumi.Any(customData), + Behavior: &metal.DeviceBehaviorArgs{ + AllowChanges: pulumi.StringArray{ + pulumi.String("custom_data"), + pulumi.String("user_data"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var pxe1 = new Equinix.Metal.Device("pxe1", new() + { + Hostname = "tf.coreos2-pxe", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "sv", + OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + IpxeScriptUrl = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + AlwaysPxe = false, + UserData = userData, + CustomData = customData, + Behavior = new Equinix.Metal.Inputs.DeviceBehaviorArgs + { + AllowChanges = new[] + { + "custom_data", + "user_data", + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.inputs.DeviceBehaviorArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var pxe1 = new Device("pxe1", DeviceArgs.builder() + .hostname("tf.coreos2-pxe") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("custom_ipxe") + .billingCycle("hourly") + .projectId(projectId) + .ipxeScriptUrl("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe") + .alwaysPxe("false") + .userData(userData) + .customData(customData) + .behavior(DeviceBehaviorArgs.builder() + .allowChanges( + "custom_data", + "user_data") + .build()) + .build()); + + } +} +``` +```yaml + pxe1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2-pxe + plan: c3.small.x86 metro: sv + operatingSystem: custom_ipxe + billingCycle: hourly + projectId: ${projectId} + ipxeScriptUrl: https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe + alwaysPxe: 'false' + userData: ${userData} + customData: ${customData} + behavior: + allowChanges: + - custom_data + - user_data +``` +{{% /example %}} + +{{% example %}} +### example 3 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const web1 = new equinix.metal.Device("web1", { + hostname: "tf.coreos2", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + ipAddresses: [{ + type: "private_ipv4", + cidr: 30, + }], +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +web1 = equinix.metal.Device("web1", + hostname="tf.coreos2", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + ip_addresses=[equinix.metal.DeviceIpAddressArgs( + type="private_ipv4", + cidr=30, + )]) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + IpAddresses: metal.DeviceIpAddressArray{ + &metal.DeviceIpAddressArgs{ + Type: pulumi.String("private_ipv4"), + Cidr: pulumi.Int(30), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var web1 = new Equinix.Metal.Device("web1", new() + { + Hostname = "tf.coreos2", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + IpAddresses = new[] + { + new Equinix.Metal.Inputs.DeviceIpAddressArgs + { + Type = "private_ipv4", + Cidr = 30, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var web1 = new Device("web1", DeviceArgs.builder() + .hostname("tf.coreos2") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .ipAddresses(DeviceIpAddressArgs.builder() + .type("private_ipv4") + .cidr(30) + .build()) + .build()); + + } +} +``` +```yaml + web1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2 + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 billingCycle: hourly projectId: ${projectId} -outputs: - webPublicIp: http://${web.accessPublicIpv4} + ipAddresses: + - type: private_ipv4 + cidr: 30 ``` {{% /example %}} + + diff --git a/docs/resource/equinix_metal_device_network_type.examples.md b/docs/resource/equinix_metal_device_network_type.examples.md index f46aee6c..c9a7432c 100644 --- a/docs/resource/equinix_metal_device_network_type.examples.md +++ b/docs/resource/equinix_metal_device_network_type.examples.md @@ -1,6 +1,5 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; @@ -59,6 +58,7 @@ func main() { ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; @@ -84,8 +84,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.DeviceNetworkType; -import com.equinix.pulumi.metal.DeviceNetworkTypeArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.DeviceNetworkType; +import com.pulumi.equinix.metal.DeviceNetworkTypeArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -94,9 +101,9 @@ public class App { public static void stack(Context ctx) { final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); + final var deviceId = config.get("deviceId"); final var networkType = config.get("networkType").orElse("hybrid"); - var deviceNetwork = new DeviceNetworkType("deviceNetwork", DeviceNetworkTypeArgs.builder() + var deviceNetwork = new DeviceNetworkType("deviceNetwork", DeviceNetworkTypeArgs.builder() .deviceId(deviceId) .type(networkType) .build()); diff --git a/docs/resource/equinix_metal_gateway.examples.md b/docs/resource/equinix_metal_gateway.examples.md index 0ce8a0b6..b47b5133 100644 --- a/docs/resource/equinix_metal_gateway.examples.md +++ b/docs/resource/equinix_metal_gateway.examples.md @@ -1,32 +1,34 @@ ## Example Usage -{{% example %}} +{{% example %}} +### example 1 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const vlanId = config.require("vlanId"); -const gateway = new equinix.metal.Gateway("gateway", { +const test = new equinix.metal.Vlan("test", { + description: "test VLAN in SV", + metro: "sv", + projectId: projectId, +}); +const testGateway = new equinix.metal.Gateway("testGateway", { projectId: projectId, - vlanId: vlanId, + vlanId: test.id, privateIpv4SubnetSize: 8, }); -export const gatewayState = gateway.state; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -vlan_id = config.require("vlanId") -gateway = equinix.metal.Gateway("gateway", +test = equinix.metal.Vlan("test", + description="test VLAN in SV", + metro="sv", + project_id=project_id) +test_gateway = equinix.metal.Gateway("testGateway", project_id=project_id, - vlan_id=vlan_id, + vlan_id=test.id, private_ipv4_subnet_size=8) -pulumi.export("gatewayState", gateway.state) ``` ```go package main @@ -34,48 +36,52 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - vlanId := cfg.Require("vlanId") - gateway, err := metal.NewGateway(ctx, "gateway", &metal.GatewayArgs{ - ProjectId: pulumi.String(projectId), - VlanId: pulumi.String(vlanId), + test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ + Description: pulumi.String("test VLAN in SV"), + Metro: pulumi.String("sv"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + _, err = metal.NewGateway(ctx, "testGateway", &metal.GatewayArgs{ + ProjectId: pulumi.Any(projectId), + VlanId: test.ID(), PrivateIpv4SubnetSize: pulumi.Int(8), }) if err != nil { return err } - ctx.Export("gatewayState", gateway.State) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var vlanId = config.Require("vlanId"); - var gateway = new Equinix.Metal.Gateway("gateway", new() + var test = new Equinix.Metal.Vlan("test", new() { + Description = "test VLAN in SV", + Metro = "sv", ProjectId = projectId, - VlanId = vlanId, - PrivateIpv4SubnetSize = 8, }); - return new Dictionary + var testGateway = new Equinix.Metal.Gateway("testGateway", new() { - ["gatewayState"] = gateway.State, - }; + ProjectId = projectId, + VlanId = test.Id, + PrivateIpv4SubnetSize = 8, + }); + }); ``` ```java @@ -83,8 +89,17 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Gateway; -import com.equinix.pulumi.metal.GatewayArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.Gateway; +import com.pulumi.equinix.metal.GatewayArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -92,33 +107,215 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var vlanId = config.get("vlanId").get(); - var gateway = new Gateway("gateway", GatewayArgs.builder() + var test = new Vlan("test", VlanArgs.builder() + .description("test VLAN in SV") + .metro("sv") + .projectId(projectId) + .build()); + + var testGateway = new Gateway("testGateway", GatewayArgs.builder() .projectId(projectId) - .vlanId(vlanId) + .vlanId(test.id()) .privateIpv4SubnetSize(8) .build()); - ctx.export("gatewayState", gateway.state()); } } ``` ```yaml -config: - projectId: - type: string - vlanId: - type: string -resources: - gateway: + # Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses + test: + type: equinix:metal:Vlan + properties: + description: test VLAN in SV + metro: sv + projectId: ${projectId} + testGateway: type: equinix:metal:Gateway + name: test properties: projectId: ${projectId} - vlanId: ${vlanId} + vlanId: ${test.id} privateIpv4SubnetSize: 8 -outputs: - gatewayState: ${gateway.state} ``` {{% /example %}} + +{{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const test = new equinix.metal.Vlan("test", { + description: "test VLAN in SV", + metro: "sv", + projectId: projectId, +}); +const test1 = new equinix.metal.ReservedIpBlock("test1", { + projectId: projectId, + metro: "sv", + quantity: 8, +}); +const testGateway = new equinix.metal.Gateway("testGateway", { + projectId: projectId, + vlanId: test.id, + ipReservationId: testEquinixMetalReservedIpBlock.id, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +test = equinix.metal.Vlan("test", + description="test VLAN in SV", + metro="sv", + project_id=project_id) +test1 = equinix.metal.ReservedIpBlock("test1", + project_id=project_id, + metro="sv", + quantity=8) +test_gateway = equinix.metal.Gateway("testGateway", + project_id=project_id, + vlan_id=test.id, + ip_reservation_id=test_equinix_metal_reserved_ip_block["id"]) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ + Description: pulumi.String("test VLAN in SV"), + Metro: pulumi.String("sv"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + _, err = metal.NewReservedIpBlock(ctx, "test1", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(8), + }) + if err != nil { + return err + } + _, err = metal.NewGateway(ctx, "testGateway", &metal.GatewayArgs{ + ProjectId: pulumi.Any(projectId), + VlanId: test.ID(), + IpReservationId: pulumi.Any(testEquinixMetalReservedIpBlock.Id), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var test = new Equinix.Metal.Vlan("test", new() + { + Description = "test VLAN in SV", + Metro = "sv", + ProjectId = projectId, + }); + + var test1 = new Equinix.Metal.ReservedIpBlock("test1", new() + { + ProjectId = projectId, + Metro = "sv", + Quantity = 8, + }); + + var testGateway = new Equinix.Metal.Gateway("testGateway", new() + { + ProjectId = projectId, + VlanId = test.Id, + IpReservationId = testEquinixMetalReservedIpBlock.Id, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Gateway; +import com.pulumi.equinix.metal.GatewayArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var test = new Vlan("test", VlanArgs.builder() + .description("test VLAN in SV") + .metro("sv") + .projectId(projectId) + .build()); + + var test1 = new ReservedIpBlock("test1", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("sv") + .quantity(8) + .build()); + + var testGateway = new Gateway("testGateway", GatewayArgs.builder() + .projectId(projectId) + .vlanId(test.id()) + .ipReservationId(testEquinixMetalReservedIpBlock.id()) + .build()); + + } +} +``` +```yaml + # Create Metal Gateway for a VLAN and reserved IP address block + test: + type: equinix:metal:Vlan + properties: + description: test VLAN in SV + metro: sv + projectId: ${projectId} + test1: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: sv + quantity: 8 + testGateway: + type: equinix:metal:Gateway + name: test + properties: + projectId: ${projectId} + vlanId: ${test.id} + ipReservationId: ${testEquinixMetalReservedIpBlock.id} +``` +{{% /example %}} + + diff --git a/docs/resource/equinix_metal_ip_attachment.examples.md b/docs/resource/equinix_metal_ip_attachment.examples.md index 710940d1..83a58097 100644 --- a/docs/resource/equinix_metal_ip_attachment.examples.md +++ b/docs/resource/equinix_metal_ip_attachment.examples.md @@ -1,86 +1,127 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as std from "@pulumi/std"; -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const subnetCidr = config.get("subnetCidr") || "147.229.10.152/31"; -const ipAttachResource = new equinix.metal.IpAttachment("ipAttach", { - deviceId: deviceId, - cidrNotation: subnetCidr, +const myblock = new equinix.metal.ReservedIpBlock("myblock", { + projectId: projectId, + metro: "ny", + quantity: 2, +}); +const firstAddressAssignment = new equinix.metal.IpAttachment("firstAddressAssignment", { + deviceId: mydevice.id, + cidrNotation: std.joinOutput({ + separator: "/", + input: [ + std.cidrhostOutput({ + input: myblockMetalReservedIpBlock.cidrNotation, + host: 0, + }).apply(invoke => invoke.result), + "32", + ], + }).apply(invoke => invoke.result), }); -export const ipAttach = ipAttachResource.id; -export const ipNetmask = ipAttachResource.netmask; ``` ```python import pulumi import pulumi_equinix as equinix +import pulumi_std as std -config = pulumi.Config() -device_id = config.require("deviceId") -subnet_cidr = config.get("subnetCidr") -if subnet_cidr is None: - subnet_cidr = "147.229.10.152/31" -ip_attach_resource = equinix.metal.IpAttachment("ipAttach", - device_id=device_id, - cidr_notation=subnet_cidr) -pulumi.export("ipAttach", ip_attach_resource.id) -pulumi.export("ipNetmask", ip_attach_resource.netmask) +myblock = equinix.metal.ReservedIpBlock("myblock", + project_id=project_id, + metro="ny", + quantity=2) +first_address_assignment = equinix.metal.IpAttachment("firstAddressAssignment", + device_id=mydevice["id"], + cidr_notation=std.join_output(separator="/", + input=[ + std.cidrhost_output(input=myblock_metal_reserved_ip_block["cidrNotation"], + host=0).apply(lambda invoke: invoke.result), + "32", + ]).apply(lambda invoke: invoke.result)) ``` ```go package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi-std/sdk/go/std" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) - func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - subnetCidr := "147.229.10.152/31" - if param := cfg.Get("subnetCidr"); param != "" { - subnetCidr = param - } - ipAttachResource, err := metal.NewIpAttachment(ctx, "ipAttach", &metal.IpAttachmentArgs{ - DeviceId: pulumi.String(deviceId), - CidrNotation: pulumi.String(subnetCidr), - }) - if err != nil { - return err - } - ctx.Export("ipAttach", ipAttachResource.ID()) - ctx.Export("ipNetmask", ipAttachResource.Netmask) - return nil - }) +pulumi.Run(func(ctx *pulumi.Context) error { +_, err := metal.NewReservedIpBlock(ctx, "myblock", &metal.ReservedIpBlockArgs{ +ProjectId: pulumi.Any(projectId), +Metro: pulumi.String("ny"), +Quantity: pulumi.Int(2), +}) +if err != nil { +return err +} +invokeJoin, err := std.Join(ctx, invokeCidrhost1, err := std.Cidrhost(ctx, &std.CidrhostArgs{ +Input: myblockMetalReservedIpBlock.CidrNotation, +Host: 0, +}, nil) +if err != nil { +return err +} +&std.JoinArgs{ +Separator: "/", +Input: []*string{ +invokeCidrhost1.Result, +"32", +}, +}, nil) +if err != nil { +return err +} +_, err = metal.NewIpAttachment(ctx, "firstAddressAssignment", &metal.IpAttachmentArgs{ +DeviceId: pulumi.Any(mydevice.Id), +CidrNotation: invokeJoin.Result, +}) +if err != nil { +return err +} +return nil +}) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; return await Deployment.RunAsync(() => { - var config = new Config(); - var deviceId = config.Require("deviceId"); - var subnetCidr = config.Get("subnetCidr") ?? "147.229.10.152/31"; - var ipAttachResource = new Equinix.Metal.IpAttachment("ipAttach", new() + var myblock = new Equinix.Metal.ReservedIpBlock("myblock", new() { - DeviceId = deviceId, - CidrNotation = subnetCidr, + ProjectId = projectId, + Metro = "ny", + Quantity = 2, }); - return new Dictionary + var firstAddressAssignment = new Equinix.Metal.IpAttachment("firstAddressAssignment", new() { - ["ipAttach"] = ipAttachResource.Id, - ["ipNetmask"] = ipAttachResource.Netmask, - }; + DeviceId = mydevice.Id, + CidrNotation = Std.Cidrhost.Invoke(new() + { + Input = myblockMetalReservedIpBlock.CidrNotation, + Host = 0, + }).Apply(invoke => Std.Join.Invoke(new() + { + Separator = "/", + Input = new[] + { + invoke.Result, + "32", + }, + })).Apply(invoke => invoke.Result), + }); + }); ``` ```java @@ -88,8 +129,17 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.IpAttachment; -import com.equinix.pulumi.metal.IpAttachmentArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.IpAttachment; +import com.pulumi.equinix.metal.IpAttachmentArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -97,34 +147,55 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - final var subnetCidr = config.get("subnetCidr").orElse("147.229.10.152/31"); - var ipAttachResource = new IpAttachment("ipAttachResource", IpAttachmentArgs.builder() - .deviceId(deviceId) - .cidrNotation(subnetCidr) + var myblock = new ReservedIpBlock("myblock", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("ny") + .quantity(2) + .build()); + + var firstAddressAssignment = new IpAttachment("firstAddressAssignment", IpAttachmentArgs.builder() + .deviceId(mydevice.id()) + .cidrNotation(StdFunctions.join(JoinArgs.builder() + .separator("/") + .input( + StdFunctions.cidrhost(CidrhostArgs.builder() + .input(myblockMetalReservedIpBlock.cidrNotation()) + .host(0) + .build()).result(), + "32") + .build()).result()) .build()); - ctx.export("ipAttach", ipAttachResource.id()); - ctx.export("ipNetmask", ipAttachResource.netmask()); } } ``` ```yaml -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 -resources: - ipAttach: + # Reserve /30 block of max 2 public IPv4 addresses in metro ny for myproject + myblock: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: ny + quantity: 2 + # Assign /32 subnet (single address) from reserved block to a device + firstAddressAssignment: type: equinix:metal:IpAttachment + name: first_address_assignment properties: - deviceId: ${deviceId} - cidrNotation: ${subnetCidr} -outputs: - ipAttach: ${ipAttach.id} - ipNetmask: ${ipAttach.netmask} + deviceId: ${mydevice.id} + cidrNotation: + fn::invoke: + Function: std:join + Arguments: + separator: / + input: + - fn::invoke: + Function: std:cidrhost + Arguments: + input: ${myblockMetalReservedIpBlock.cidrNotation} + host: 0 + Return: result + - '32' + Return: result ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_organization.examples.md b/docs/resource/equinix_metal_organization.examples.md index 355f04a5..84c2d65b 100644 --- a/docs/resource/equinix_metal_organization.examples.md +++ b/docs/resource/equinix_metal_organization.examples.md @@ -1,36 +1,21 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const orgResource = new equinix.metal.Organization("org", { - name: "Foo Organization", - address: { - address: "org street", - city: "london", - country: "GB", - zipCode: "12345", - }, - description: "An organization", +const tfOrganization1 = new equinix.metal.Organization("tfOrganization1", { + name: "foobar", + description: "quux", }); -export const org = orgResource.id; ``` ```python import pulumi import pulumi_equinix as equinix -org_resource = equinix.metal.Organization("org", - name="Foo Organization", - address=equinix.metal.OrganizationAddressArgs( - address="org street", - city="london", - country="GB", - zip_code="12345", - ), - description="An organization") -pulumi.export("org", org_resource.id) +tf_organization1 = equinix.metal.Organization("tfOrganization1", + name="foobar", + description="quux") ``` ```go package main @@ -42,48 +27,31 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - orgResource, err := metal.NewOrganization(ctx, "org", &metal.OrganizationArgs{ - Name: pulumi.String("Foo Organization"), - Address: &metal.OrganizationAddressArgs{ - Address: pulumi.String("org street"), - City: pulumi.String("london"), - Country: pulumi.String("GB"), - ZipCode: pulumi.String("12345"), - }, - Description: pulumi.String("An organization"), + _, err := metal.NewOrganization(ctx, "tfOrganization1", &metal.OrganizationArgs{ + Name: pulumi.String("foobar"), + Description: pulumi.String("quux"), }) if err != nil { return err } - ctx.Export("org", orgResource.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var orgResource = new Equinix.Metal.Organization("org", new() + var tfOrganization1 = new Equinix.Metal.Organization("tfOrganization1", new() { - Name = "Foo Organization", - Address = new Equinix.Metal.Inputs.OrganizationAddressArgs - { - Address = "org street", - City = "london", - Country = "GB", - ZipCode = "12345", - }, - Description = "An organization", + Name = "foobar", + Description = "quux", }); - return new Dictionary - { - ["org"] = orgResource.Id, - }; }); ``` ```java @@ -92,9 +60,8 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Organization; -import com.equinix.pulumi.metal.OrganizationArgs; -import com.equinix.pulumi.metal.inputs.OrganizationAddressArgs; +import com.pulumi.equinix.metal.Organization; +import com.pulumi.equinix.metal.OrganizationArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -108,34 +75,21 @@ public class App { } public static void stack(Context ctx) { - var orgResource = new Organization("orgResource", OrganizationArgs.builder() - .name("Foo Organization") - .address(OrganizationAddressArgs.builder() - .address("org street") - .city("london") - .country("GB") - .zipCode("12345") - .build()) - .description("An organization") + var tfOrganization1 = new Organization("tfOrganization1", OrganizationArgs.builder() + .name("foobar") + .description("quux") .build()); - ctx.export("org", orgResource.id()); } } ``` ```yaml -resources: - org: + # Create a new Organization + tfOrganization1: type: equinix:metal:Organization + name: tf_organization_1 properties: - name: Foo Organization - address: - address: org street - city: london - country: GB - zipCode: "12345" - description: An organization -outputs: - org: ${org.id} + name: foobar + description: quux ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_organization_member.examples.md b/docs/resource/equinix_metal_organization_member.examples.md index d49dae8b..0fdc088c 100644 --- a/docs/resource/equinix_metal_organization_member.examples.md +++ b/docs/resource/equinix_metal_organization_member.examples.md @@ -1,38 +1,139 @@ ## Example Usage + {{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const owner = new equinix.metal.OrganizationMember("owner", { + invitee: "admin@example.com", + roles: ["owner"], + projectsIds: [], + organizationId: organizationId, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +owner = equinix.metal.OrganizationMember("owner", + invitee="admin@example.com", + roles=["owner"], + projects_ids=[], + organization_id=organization_id) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewOrganizationMember(ctx, "owner", &metal.OrganizationMemberArgs{ + Invitee: pulumi.String("admin@example.com"), + Roles: pulumi.StringArray{ + pulumi.String("owner"), + }, + ProjectsIds: pulumi.StringArray{}, + OrganizationId: pulumi.Any(organizationId), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; +return await Deployment.RunAsync(() => +{ + var owner = new Equinix.Metal.OrganizationMember("owner", new() + { + Invitee = "admin@example.com", + Roles = new[] + { + "owner", + }, + ProjectsIds = new[] {}, + OrganizationId = organizationId, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.OrganizationMember; +import com.pulumi.equinix.metal.OrganizationMemberArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var owner = new OrganizationMember("owner", OrganizationMemberArgs.builder() + .invitee("admin@example.com") + .roles("owner") + .projectsIds() + .organizationId(organizationId) + .build()); + + } +} +``` +```yaml + owner: + type: equinix:metal:OrganizationMember + properties: + invitee: admin@example.com + roles: + - owner + projectsIds: [] + organizationId: ${organizationId} +``` +{{% /example %}} + +{{% example %}} +### example 1 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const organizationId = config.require("organizationId"); -const projectId = config.require("projectId"); -const userEmailAddress = config.require("userEmailAddress"); const member = new equinix.metal.OrganizationMember("member", { - invitee: userEmailAddress, + invitee: "member@example.com", roles: ["limited_collaborator"], projectsIds: [projectId], organizationId: organizationId, }); -export const memberId = member.id; -export const memberState = member.state; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -organization_id = config.require("organizationId") -project_id = config.require("projectId") -user_email_address = config.require("userEmailAddress") member = equinix.metal.OrganizationMember("member", - invitee=user_email_address, + invitee="member@example.com", roles=["limited_collaborator"], projects_ids=[project_id], organization_id=organization_id) -pulumi.export("memberId", member.id) -pulumi.export("memberState", member.state) ``` ```go package main @@ -40,48 +141,38 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - organizationId := cfg.Require("organizationId") - projectId := cfg.Require("projectId") - userEmailAddress := cfg.Require("userEmailAddress") - member, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{ - Invitee: pulumi.String(userEmailAddress), + _, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{ + Invitee: pulumi.String("member@example.com"), Roles: pulumi.StringArray{ pulumi.String("limited_collaborator"), }, ProjectsIds: pulumi.StringArray{ - pulumi.String(projectId), + projectId, }, - OrganizationId: pulumi.String(organizationId), + OrganizationId: pulumi.Any(organizationId), }) if err != nil { return err } - ctx.Export("memberId", member.ID()) - ctx.Export("memberState", member.State) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var organizationId = config.Require("organizationId"); - var projectId = config.Require("projectId"); - var userEmailAddress = config.Require("userEmailAddress"); var member = new Equinix.Metal.OrganizationMember("member", new() { - Invitee = userEmailAddress, + Invitee = "member@example.com", Roles = new[] { "limited_collaborator", @@ -93,11 +184,6 @@ return await Deployment.RunAsync(() => OrganizationId = organizationId, }); - return new Dictionary - { - ["memberId"] = member.Id, - ["memberState"] = member.State, - }; }); ``` ```java @@ -105,8 +191,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.OrganizationMember; -import com.equinix.pulumi.metal.OrganizationMemberArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.OrganizationMember; +import com.pulumi.equinix.metal.OrganizationMemberArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -114,42 +207,27 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var organizationId = config.get("organizationId").get(); - final var projectId = config.get("projectId").get(); - final var userEmailAddress = config.get("userEmailAddress").get(); - var member = new OrganizationMember("member", OrganizationMemberArgs.builder() - .invitee(userEmailAddress) + var member = new OrganizationMember("member", OrganizationMemberArgs.builder() + .invitee("member@example.com") .roles("limited_collaborator") .projectsIds(projectId) .organizationId(organizationId) .build()); - ctx.export("memberId", member.id()); - ctx.export("memberState", member.state()); } } ``` ```yaml -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string -resources: member: type: equinix:metal:OrganizationMember properties: - invitee: ${userEmailAddress} + invitee: member@example.com roles: - - limited_collaborator + - limited_collaborator projectsIds: - - ${projectId} + - ${projectId} organizationId: ${organizationId} -outputs: - memberId: ${member.id} - memberState: ${member.state} ``` {{% /example %}} + + diff --git a/docs/resource/equinix_metal_port.examples.md b/docs/resource/equinix_metal_port.examples.md index a9278d98..0da0c68b 100644 --- a/docs/resource/equinix_metal_port.examples.md +++ b/docs/resource/equinix_metal_port.examples.md @@ -1,132 +1,3 @@ ## Example Usage -{{% example %}} -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const portId = config.require("portId"); -const org = new equinix.metal.Port("org", { - portId: portId, - bonded: true, - layer2: true, -}); -export const portType = port.type; -export const portBondedNetworkType = port.networkType; -``` -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -port_id = config.require("portId") -org = equinix.metal.Port("org", - port_id=port_id, - bonded=True, - layer2=True) -pulumi.export("portType", port["type"]) -pulumi.export("portBondedNetworkType", port["networkType"]) -``` -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - portId := cfg.Require("portId") - _, err := metal.NewPort(ctx, "org", &metal.PortArgs{ - PortId: pulumi.String(portId), - Bonded: pulumi.Bool(true), - Layer2: pulumi.Bool(true), - }) - if err != nil { - return err - } - ctx.Export("portType", port.Type) - ctx.Export("portBondedNetworkType", port.NetworkType) - return nil - }) -} -``` -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var portId = config.Require("portId"); - var org = new Equinix.Metal.Port("org", new() - { - PortId = portId, - Bonded = true, - Layer2 = true, - }); - - return new Dictionary - { - ["portType"] = port.Type, - ["portBondedNetworkType"] = port.NetworkType, - }; -}); -``` -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Port; -import com.equinix.pulumi.metal.PortArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var portId = config.get("portId").get(); - final var vlanId = config.get("vlanId").get(); - var port = new Port("port", PortArgs.builder() - .portId(portId) - .bonded(true) - .layer2(false) - .vlanIds(vlanId) - .build()); - - ctx.export("portType", port.type()); - ctx.export("portBondedNetworkType", port.networkType()); - } -} -``` -```yaml -config: - portId: - type: string -resources: - org: - type: equinix:metal:Port - properties: - portId: ${portId} - bonded: true - layer2: true -outputs: - portType: ${port.type} - portBondedNetworkType: ${port.networkType} -``` -{{% /example %}} diff --git a/docs/resource/equinix_metal_port_vlan_attachment.examples.md b/docs/resource/equinix_metal_port_vlan_attachment.examples.md index 4d186b0d..39bc9524 100644 --- a/docs/resource/equinix_metal_port_vlan_attachment.examples.md +++ b/docs/resource/equinix_metal_port_vlan_attachment.examples.md @@ -1,40 +1,380 @@ ## Example Usage + {{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const test = new equinix.metal.Device("test", { + hostname: "test", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}); +const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", { + deviceId: test.id, + type: "layer2-individual", +}); +const test1 = new equinix.metal.Vlan("test1", { + description: "VLAN in New York", + metro: "ny", + projectId: projectId, +}); +const test2 = new equinix.metal.Vlan("test2", { + description: "VLAN in New Jersey", + metro: "ny", + projectId: projectId, +}); +const test1PortVlanAttachment = new equinix.metal.PortVlanAttachment("test1PortVlanAttachment", { + deviceId: testDeviceNetworkType.id, + vlanVnid: test1.vxlan, + portName: "eth1", +}); +const test2PortVlanAttachment = new equinix.metal.PortVlanAttachment("test2PortVlanAttachment", { + deviceId: testDeviceNetworkType.id, + vlanVnid: test2.vxlan, + portName: "eth1", + native: true, +}, { + dependsOn: [test1PortVlanAttachment], +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +test = equinix.metal.Device("test", + hostname="test", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id) +test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType", + device_id=test.id, + type="layer2-individual") +test1 = equinix.metal.Vlan("test1", + description="VLAN in New York", + metro="ny", + project_id=project_id) +test2 = equinix.metal.Vlan("test2", + description="VLAN in New Jersey", + metro="ny", + project_id=project_id) +test1_port_vlan_attachment = equinix.metal.PortVlanAttachment("test1PortVlanAttachment", + device_id=test_device_network_type.id, + vlan_vnid=test1.vxlan, + port_name="eth1") +test2_port_vlan_attachment = equinix.metal.PortVlanAttachment("test2PortVlanAttachment", + device_id=test_device_network_type.id, + vlan_vnid=test2.vxlan, + port_name="eth1", + native=True, + opts = pulumi.ResourceOptions(depends_on=[test1_port_vlan_attachment])) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + test, err := metal.NewDevice(ctx, "test", &metal.DeviceArgs{ + Hostname: pulumi.String("test"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{ + DeviceId: test.ID(), + Type: pulumi.String("layer2-individual"), + }) + if err != nil { + return err + } + test1, err := metal.NewVlan(ctx, "test1", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New York"), + Metro: pulumi.String("ny"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + test2, err := metal.NewVlan(ctx, "test2", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New Jersey"), + Metro: pulumi.String("ny"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + test1PortVlanAttachment, err := metal.NewPortVlanAttachment(ctx, "test1PortVlanAttachment", &metal.PortVlanAttachmentArgs{ + DeviceId: testDeviceNetworkType.ID(), + VlanVnid: test1.Vxlan, + PortName: pulumi.String("eth1"), + }) + if err != nil { + return err + } + _, err = metal.NewPortVlanAttachment(ctx, "test2PortVlanAttachment", &metal.PortVlanAttachmentArgs{ + DeviceId: testDeviceNetworkType.ID(), + VlanVnid: test2.Vxlan, + PortName: pulumi.String("eth1"), + Native: pulumi.Bool(true), + }, pulumi.DependsOn([]pulumi.Resource{ + test1PortVlanAttachment, + })) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var test = new Equinix.Metal.Device("test", new() + { + Hostname = "test", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }); + + var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new() + { + DeviceId = test.Id, + Type = "layer2-individual", + }); + + var test1 = new Equinix.Metal.Vlan("test1", new() + { + Description = "VLAN in New York", + Metro = "ny", + ProjectId = projectId, + }); + + var test2 = new Equinix.Metal.Vlan("test2", new() + { + Description = "VLAN in New Jersey", + Metro = "ny", + ProjectId = projectId, + }); + + var test1PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test1PortVlanAttachment", new() + { + DeviceId = testDeviceNetworkType.Id, + VlanVnid = test1.Vxlan, + PortName = "eth1", + }); + + var test2PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test2PortVlanAttachment", new() + { + DeviceId = testDeviceNetworkType.Id, + VlanVnid = test2.Vxlan, + PortName = "eth1", + Native = true, + }, new CustomResourceOptions + { + DependsOn = + { + test1PortVlanAttachment, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.DeviceNetworkType; +import com.pulumi.equinix.metal.DeviceNetworkTypeArgs; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.PortVlanAttachment; +import com.pulumi.equinix.metal.PortVlanAttachmentArgs; +import com.pulumi.resources.CustomResourceOptions; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var test = new Device("test", DeviceArgs.builder() + .hostname("test") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder() + .deviceId(test.id()) + .type("layer2-individual") + .build()); + + var test1 = new Vlan("test1", VlanArgs.builder() + .description("VLAN in New York") + .metro("ny") + .projectId(projectId) + .build()); + + var test2 = new Vlan("test2", VlanArgs.builder() + .description("VLAN in New Jersey") + .metro("ny") + .projectId(projectId) + .build()); + + var test1PortVlanAttachment = new PortVlanAttachment("test1PortVlanAttachment", PortVlanAttachmentArgs.builder() + .deviceId(testDeviceNetworkType.id()) + .vlanVnid(test1.vxlan()) + .portName("eth1") + .build()); + + var test2PortVlanAttachment = new PortVlanAttachment("test2PortVlanAttachment", PortVlanAttachmentArgs.builder() + .deviceId(testDeviceNetworkType.id()) + .vlanVnid(test2.vxlan()) + .portName("eth1") + .native_(true) + .build(), CustomResourceOptions.builder() + .dependsOn(test1PortVlanAttachment) + .build()); + + } +} +``` +```yaml + test: + type: equinix:metal:Device + properties: + hostname: test + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + testDeviceNetworkType: + type: equinix:metal:DeviceNetworkType + name: test + properties: + deviceId: ${test.id} + type: layer2-individual + test1: + type: equinix:metal:Vlan + properties: + description: VLAN in New York + metro: ny + projectId: ${projectId} + test2: + type: equinix:metal:Vlan + properties: + description: VLAN in New Jersey + metro: ny + projectId: ${projectId} + test1PortVlanAttachment: + type: equinix:metal:PortVlanAttachment + name: test1 + properties: + deviceId: ${testDeviceNetworkType.id} + vlanVnid: ${test1.vxlan} + portName: eth1 + test2PortVlanAttachment: + type: equinix:metal:PortVlanAttachment + name: test2 + properties: + deviceId: ${testDeviceNetworkType.id} + vlanVnid: ${test2.vxlan} + portName: eth1 + native: true + options: + dependson: + - ${test1PortVlanAttachment} +``` +{{% /example %}} +{{% example %}} +### example 1 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const portName = config.get("portName") || "eth1"; -const vxlanId = config.getNumber("vxlanId") || 1004; -const attach = new equinix.metal.PortVlanAttachment("attach", { - deviceId: deviceId, - portName: portName, - vlanVnid: vxlanId, +const test = new equinix.metal.Vlan("test", { + description: "VLAN in New York", + metro: "ny", + projectId: projectId, +}); +const testDevice = new equinix.metal.Device("testDevice", { + hostname: "test", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}); +const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", { + deviceId: testDevice.id, + type: "hybrid", +}); +const testPortVlanAttachment = new equinix.metal.PortVlanAttachment("testPortVlanAttachment", { + deviceId: testDeviceNetworkType.id, + portName: "eth1", + vlanVnid: test.vxlan, }); -export const attachId = attach.id; -export const portId = attach.portId; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -device_id = config.require("deviceId") -port_name = config.get("portName") -if port_name is None: - port_name = "eth1" -vxlan_id = config.get_int("vxlanId") -if vxlan_id is None: - vxlan_id = 1004 -attach = equinix.metal.PortVlanAttachment("attach", - device_id=device_id, - port_name=port_name, - vlan_vnid=vxlan_id) -pulumi.export("attachId", attach.id) -pulumi.export("portId", attach.port_id) +test = equinix.metal.Vlan("test", + description="VLAN in New York", + metro="ny", + project_id=project_id) +test_device = equinix.metal.Device("testDevice", + hostname="test", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id) +test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType", + device_id=test_device.id, + type="hybrid") +test_port_vlan_attachment = equinix.metal.PortVlanAttachment("testPortVlanAttachment", + device_id=test_device_network_type.id, + port_name="eth1", + vlan_vnid=test.vxlan) ``` ```go package main @@ -42,58 +382,86 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - portName := "eth1" - if param := cfg.Get("portName"); param != "" { - portName = param + test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New York"), + Metro: pulumi.String("ny"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err } - vxlanId := 1004 - if param := cfg.GetInt("vxlanId"); param != 0 { - vxlanId = param + testDevice, err := metal.NewDevice(ctx, "testDevice", &metal.DeviceArgs{ + Hostname: pulumi.String("test"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{ + DeviceId: testDevice.ID(), + Type: pulumi.String("hybrid"), + }) + if err != nil { + return err } - attach, err := metal.NewPortVlanAttachment(ctx, "attach", &metal.PortVlanAttachmentArgs{ - DeviceId: pulumi.String(deviceId), - PortName: pulumi.String(portName), - VlanVnid: pulumi.Int(vxlanId), + _, err = metal.NewPortVlanAttachment(ctx, "testPortVlanAttachment", &metal.PortVlanAttachmentArgs{ + DeviceId: testDeviceNetworkType.ID(), + PortName: pulumi.String("eth1"), + VlanVnid: test.Vxlan, }) if err != nil { return err } - ctx.Export("attachId", attach.ID()) - ctx.Export("portId", attach.PortId) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var deviceId = config.Require("deviceId"); - var portName = config.Get("portName") ?? "eth1"; - var vxlanId = config.GetNumber("vxlanId") ?? 1004; - var attach = new Equinix.Metal.PortVlanAttachment("attach", new() + var test = new Equinix.Metal.Vlan("test", new() { - DeviceId = deviceId, - PortName = portName, - VlanVnid = vxlanId, + Description = "VLAN in New York", + Metro = "ny", + ProjectId = projectId, }); - return new Dictionary + var testDevice = new Equinix.Metal.Device("testDevice", new() { - ["attachId"] = attach.Id, - ["portId"] = attach.PortId, - }; + Hostname = "test", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }); + + var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new() + { + DeviceId = testDevice.Id, + Type = "hybrid", + }); + + var testPortVlanAttachment = new Equinix.Metal.PortVlanAttachment("testPortVlanAttachment", new() + { + DeviceId = testDeviceNetworkType.Id, + PortName = "eth1", + VlanVnid = test.Vxlan, + }); + }); ``` ```java @@ -101,8 +469,21 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.PortVlanAttachment; -import com.equinix.pulumi.metal.PortVlanAttachmentArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.DeviceNetworkType; +import com.pulumi.equinix.metal.DeviceNetworkTypeArgs; +import com.pulumi.equinix.metal.PortVlanAttachment; +import com.pulumi.equinix.metal.PortVlanAttachmentArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -110,41 +491,66 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - final var portName = config.get("portName").orElse("eth1"); - final var vxlanId = Integer.parseInt(config.get("vxlanId").orElse("1004")); - - var attach = new PortVlanAttachment("attach", PortVlanAttachmentArgs.builder() - .deviceId(deviceId) - .portName(portName) - .vlanVnid(vxlanId) + var test = new Vlan("test", VlanArgs.builder() + .description("VLAN in New York") + .metro("ny") + .projectId(projectId) + .build()); + + var testDevice = new Device("testDevice", DeviceArgs.builder() + .hostname("test") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder() + .deviceId(testDevice.id()) + .type("hybrid") + .build()); + + var testPortVlanAttachment = new PortVlanAttachment("testPortVlanAttachment", PortVlanAttachmentArgs.builder() + .deviceId(testDeviceNetworkType.id()) + .portName("eth1") + .vlanVnid(test.vxlan()) .build()); - ctx.export("attachId", attach.id()); - ctx.export("portId", attach.portId()); } } ``` ```yaml -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 -resources: - attach: + test: + type: equinix:metal:Vlan + properties: + description: VLAN in New York + metro: ny + projectId: ${projectId} + testDevice: + type: equinix:metal:Device + name: test + properties: + hostname: test + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + testDeviceNetworkType: + type: equinix:metal:DeviceNetworkType + name: test + properties: + deviceId: ${testDevice.id} + type: hybrid + testPortVlanAttachment: type: equinix:metal:PortVlanAttachment + name: test properties: - deviceId: ${deviceId} - portName: ${portName} - vlanVnid: ${vxlanId} -outputs: - attachId: ${attach.id} - portId: ${attach.portId} + deviceId: ${testDeviceNetworkType.id} + portName: eth1 + vlanVnid: ${test.vxlan} ``` {{% /example %}} + + diff --git a/docs/resource/equinix_metal_project.examples.md b/docs/resource/equinix_metal_project.examples.md index f7294e6b..b6135208 100644 --- a/docs/resource/equinix_metal_project.examples.md +++ b/docs/resource/equinix_metal_project.examples.md @@ -1,32 +1,31 @@ ## Example Usage -{{% example %}} +{{% example %}} +### example 3 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const organizationId = config.require("organizationId"); -const name = config.get("name") || "Default Project"; -const projectResource = new equinix.metal.Project("project", { - name: name, - organizationId: organizationId, +const existingProject = new equinix.metal.Project("existingProject", { + name: "The name of the project (if different, will rewrite)", + bgpConfig: { + deploymentType: "local", + md5: "C179c28c41a85b", + asn: 65000, + }, }); -export const projectId = projectResource.id; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -organization_id = config.require("organizationId") -name = config.get("name") -if name is None: - name = "Default Project" -project_resource = equinix.metal.Project("project", - name=name, - organization_id=organization_id) -pulumi.export("projectId", project_resource.id) +existing_project = equinix.metal.Project("existingProject", + name="The name of the project (if different, will rewrite)", + bgp_config=equinix.metal.ProjectBgpConfigArgs( + deployment_type="local", + md5="C179c28c41a85b", + asn=65000, + )) ``` ```go package main @@ -34,49 +33,261 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - organizationId := cfg.Require("organizationId") - name := "Default Project" - if param := cfg.Get("name"); param != "" { - name = param + _, err := metal.NewProject(ctx, "existingProject", &metal.ProjectArgs{ + Name: pulumi.String("The name of the project (if different, will rewrite)"), + BgpConfig: &metal.ProjectBgpConfigArgs{ + DeploymentType: pulumi.String("local"), + Md5: pulumi.String("C179c28c41a85b"), + Asn: pulumi.Int(65000), + }, + }) + if err != nil { + return err } - projectResource, err := metal.NewProject(ctx, "project", &metal.ProjectArgs{ - Name: pulumi.String(name), - OrganizationId: pulumi.String(organizationId), + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var existingProject = new Equinix.Metal.Project("existingProject", new() + { + Name = "The name of the project (if different, will rewrite)", + BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs + { + DeploymentType = "local", + Md5 = "C179c28c41a85b", + Asn = 65000, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var existingProject = new Project("existingProject", ProjectArgs.builder() + .name("The name of the project (if different, will rewrite)") + .bgpConfig(ProjectBgpConfigArgs.builder() + .deploymentType("local") + .md5("C179c28c41a85b") + .asn(65000) + .build()) + .build()); + + } +} +``` +```yaml + existingProject: + type: equinix:metal:Project + name: existing_project + properties: + name: The name of the project (if different, will rewrite) + bgpConfig: + deploymentType: local + md5: C179c28c41a85b + asn: 65000 +``` +{{% /example %}} + +{{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const tfProject1 = new equinix.metal.Project("tfProject1", { + name: "tftest", + bgpConfig: { + deploymentType: "local", + md5: "C179c28c41a85b", + asn: 65000, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +tf_project1 = equinix.metal.Project("tfProject1", + name="tftest", + bgp_config=equinix.metal.ProjectBgpConfigArgs( + deployment_type="local", + md5="C179c28c41a85b", + asn=65000, + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewProject(ctx, "tfProject1", &metal.ProjectArgs{ + Name: pulumi.String("tftest"), + BgpConfig: &metal.ProjectBgpConfigArgs{ + DeploymentType: pulumi.String("local"), + Md5: pulumi.String("C179c28c41a85b"), + Asn: pulumi.Int(65000), + }, }) if err != nil { return err } - ctx.Export("projectId", projectResource.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var organizationId = config.Require("organizationId"); - var name = config.Get("name") ?? "Default Project"; - var projectResource = new Equinix.Metal.Project("project", new() + var tfProject1 = new Equinix.Metal.Project("tfProject1", new() { - Name = name, - OrganizationId = organizationId, + Name = "tftest", + BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs + { + DeploymentType = "local", + Md5 = "C179c28c41a85b", + Asn = 65000, + }, }); - return new Dictionary +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var tfProject1 = new Project("tfProject1", ProjectArgs.builder() + .name("tftest") + .bgpConfig(ProjectBgpConfigArgs.builder() + .deploymentType("local") + .md5("C179c28c41a85b") + .asn(65000) + .build()) + .build()); + + } +} +``` +```yaml + # Create a new Project + tfProject1: + type: equinix:metal:Project + name: tf_project_1 + properties: + name: tftest + bgpConfig: + deploymentType: local + md5: C179c28c41a85b + asn: 65000 +``` +{{% /example %}} + +{{% example %}} +### example 1 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const tfProject1 = new equinix.metal.Project("tfProject1", {name: "Terraform Fun"}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +tf_project1 = equinix.metal.Project("tfProject1", name="Terraform Fun") +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewProject(ctx, "tfProject1", &metal.ProjectArgs{ + Name: pulumi.String("Terraform Fun"), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var tfProject1 = new Equinix.Metal.Project("tfProject1", new() { - ["projectId"] = projectResource.Id, - }; + Name = "Terraform Fun", + }); + }); ``` ```java @@ -84,8 +295,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Project; -import com.equinix.pulumi.metal.ProjectArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -93,32 +311,20 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var organizationId = config.get("organizationId").get(); - final var name = config.get("name").orElse("Default Project"); - var projectResource = new Project("projectResource", ProjectArgs.builder() - .name(name) - .organizationId(organizationId) + var tfProject1 = new Project("tfProject1", ProjectArgs.builder() + .name("Terraform Fun") .build()); - ctx.export("projectId", projectResource.id()); } } ``` ```yaml -config: - organizationId: - type: string - name: - type: string - default: Default Project -resources: - project: + tfProject1: type: equinix:metal:Project + name: tf_project_1 properties: - name: ${name} - organizationId: ${organizationId} -outputs: - projectId: ${project.id} + name: Terraform Fun ``` {{% /example %}} + + diff --git a/docs/resource/equinix_metal_project_api_key.examples.md b/docs/resource/equinix_metal_project_api_key.examples.md index a8098d45..ffb9968e 100644 --- a/docs/resource/equinix_metal_project_api_key.examples.md +++ b/docs/resource/equinix_metal_project_api_key.examples.md @@ -1,34 +1,23 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const readOnly = config.getBoolean("readOnly") || false; -const apiKey = new equinix.metal.ProjectApiKey("apiKey", { - projectId: projectId, - description: "A project level API Key", - readOnly: readOnly, +const test = new equinix.metal.ProjectApiKey("test", { + projectId: existingProjectId, + description: "Read-only key scoped to a projct", + readOnly: true, }); -export const apiKeyToken = apiKey.token; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -read_only = config.get_bool("readOnly") -if read_only is None: - read_only = False -api_key = equinix.metal.ProjectApiKey("apiKey", - project_id=project_id, - description="A project level API Key", - read_only=read_only) -pulumi.export("apiKeyToken", api_key.token) +test = equinix.metal.ProjectApiKey("test", + project_id=existing_project_id, + description="Read-only key scoped to a projct", + read_only=True) ``` ```go package main @@ -36,51 +25,37 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - readOnly := false - if param := cfg.GetBool("readOnly"); param { - readOnly = param - } - apiKey, err := metal.NewProjectApiKey(ctx, "apiKey", &metal.ProjectApiKeyArgs{ - ProjectId: pulumi.String(projectId), - Description: pulumi.String("A project level API Key"), - ReadOnly: pulumi.Bool(readOnly), + _, err := metal.NewProjectApiKey(ctx, "test", &metal.ProjectApiKeyArgs{ + ProjectId: pulumi.Any(existingProjectId), + Description: pulumi.String("Read-only key scoped to a projct"), + ReadOnly: pulumi.Bool(true), }) if err != nil { return err } - ctx.Export("apiKeyToken", apiKey.Token) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var readOnly = config.GetBoolean("readOnly") ?? false; - var apiKey = new Equinix.Metal.ProjectApiKey("apiKey", new() + var test = new Equinix.Metal.ProjectApiKey("test", new() { - ProjectId = projectId, - Description = "A project level API Key", - ReadOnly = readOnly, + ProjectId = existingProjectId, + Description = "Read-only key scoped to a projct", + ReadOnly = true, }); - return new Dictionary - { - ["apiKeyToken"] = apiKey.Token, - }; }); ``` ```java @@ -88,8 +63,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ProjectApiKey; -import com.equinix.pulumi.metal.ProjectApiKeyArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ProjectApiKey; +import com.pulumi.equinix.metal.ProjectApiKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -97,34 +79,22 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var readOnly = config.getBoolean("readOnly").orElse(false); - var apiKey = new ProjectApiKey("apiKey", ProjectApiKeyArgs.builder() - .projectId(projectId) - .description("A project level API Key") - .readOnly(readOnly) + var test = new ProjectApiKey("test", ProjectApiKeyArgs.builder() + .projectId(existingProjectId) + .description("Read-only key scoped to a projct") + .readOnly(true) .build()); - ctx.export("apiKeyToken", apiKey.token()); } } ``` ```yaml -config: - projectId: - type: string - readOnly: - type: boolean - default: false -resources: - apiKey: + # Create a new read-only API key in existing project + test: type: equinix:metal:ProjectApiKey properties: - projectId: ${projectId} - description: A project level API Key - readOnly: ${readOnly} -outputs: - apiKeyToken: ${apiKey.token} + projectId: ${existingProjectId} + description: Read-only key scoped to a projct + readOnly: true ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_project_ssh_key.examples.md b/docs/resource/equinix_metal_project_ssh_key.examples.md index e3b9a1da..2ccb3522 100644 --- a/docs/resource/equinix_metal_project_ssh_key.examples.md +++ b/docs/resource/equinix_metal_project_ssh_key.examples.md @@ -1,89 +1,111 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const sshKey = new equinix.metal.ProjectSshKey("sshKey", { +const projectId = ""; +const test = new equinix.metal.ProjectSshKey("test", { + name: "test", + publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", + projectId: projectId, +}); +const testDevice = new equinix.metal.Device("testDevice", { + hostname: "test", + plan: equinix.metal.Plan.C3MediumX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectSshKeyIds: [test.id], projectId: projectId, - name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"), }); -export const sshKeyId = sshKey.id; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -ssh_key = equinix.metal.ProjectSshKey("sshKey", - project_id=project_id, - name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) +project_id = "" +test = equinix.metal.ProjectSshKey("test", + name="test", + public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", + project_id=project_id) +test_device = equinix.metal.Device("testDevice", + hostname="test", + plan=equinix.metal.Plan.C3_MEDIUM_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_ssh_key_ids=[test.id], + project_id=project_id) ``` ```go package main import ( - "os" - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - sshKey, err := metal.NewProjectSshKey(ctx, "sshKey", &metal.ProjectSshKeyArgs{ + projectId := "" + test, err := metal.NewProjectSshKey(ctx, "test", &metal.ProjectSshKeyArgs{ + Name: pulumi.String("test"), + PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2"), + ProjectId: pulumi.String(projectId), + }) + if err != nil { + return err + } + _, err = metal.NewDevice(ctx, "testDevice", &metal.DeviceArgs{ + Hostname: pulumi.String("test"), + Plan: pulumi.String(metal.PlanC3MediumX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectSshKeyIds: pulumi.StringArray{ + test.ID(), + }, ProjectId: pulumi.String(projectId), - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), }) if err != nil { return err } - ctx.Export("sshKeyId", sshKey.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; -using System.IO; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var sshKey = new Equinix.Metal.ProjectSshKey("sshKey", new() + var projectId = ""; + + var test = new Equinix.Metal.ProjectSshKey("test", new() { + Name = "test", + PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", ProjectId = projectId, - Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), }); - return new Dictionary + var testDevice = new Equinix.Metal.Device("testDevice", new() { - ["sshKeyId"] = sshKey.Id, - }; + Hostname = "test", + Plan = Equinix.Metal.Plan.C3MediumX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectSshKeyIds = new[] + { + test.Id, + }, + ProjectId = projectId, + }); + }); ``` ```java @@ -91,10 +113,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ProjectSshKey; -import com.equinix.pulumi.metal.ProjectSshKeyArgs; - -import java.io.IOException; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ProjectSshKey; +import com.pulumi.equinix.metal.ProjectSshKeyArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -104,39 +131,47 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); + final var projectId = ""; - String content = null; - try { - content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } + var test = new ProjectSshKey("test", ProjectSshKeyArgs.builder() + .name("test") + .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2") + .projectId(projectId) + .build()); - var sshKey = new ProjectSshKey("sshKey", ProjectSshKeyArgs.builder() + var testDevice = new Device("testDevice", DeviceArgs.builder() + .hostname("test") + .plan("c3.medium.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectSshKeyIds(test.id()) .projectId(projectId) - .name("johnKent") - .publicKey(content) .build()); - ctx.export("sshKeyId", sshKey.id()); } } ``` ```yaml -config: - projectId: - type: string -resources: - sshKey: + test: type: equinix:metal:ProjectSshKey properties: + name: test + publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2 + projectId: ${projectId} + testDevice: + type: equinix:metal:Device + name: test + properties: + hostname: test + plan: c3.medium.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectSshKeyIds: + - ${test.id} projectId: ${projectId} - name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/metal_rsa.pub -outputs: - sshKeyId: ${sshKey.id} +variables: + projectId: ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_reserved_ip_block.examples.md b/docs/resource/equinix_metal_reserved_ip_block.examples.md index 890312bb..44da89fd 100644 --- a/docs/resource/equinix_metal_reserved_ip_block.examples.md +++ b/docs/resource/equinix_metal_reserved_ip_block.examples.md @@ -1,46 +1,45 @@ ## Example Usage -{{% example %}} +{{% example %}} +### example 1 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "FR"; -const type = config.get("type") || "public_ipv4"; -const quantity = config.getNumber("quantity") || 1; -const ipBlock = new equinix.metal.ReservedIpBlock("ipBlock", { +const twoElasticAddresses = new equinix.metal.ReservedIpBlock("twoElasticAddresses", { + projectId: projectId, + metro: "sv", + quantity: 2, +}); +const test1 = new equinix.metal.ReservedIpBlock("test1", { projectId: projectId, - type: "public_ipv4", - quantity: quantity, - metro: metro, + type: equinix.metal.IpBlockType.PublicIPv4, + metro: "sv", + quantity: 1, +}); +const test = new equinix.metal.ReservedIpBlock("test", { + projectId: projectId, + type: equinix.metal.IpBlockType.GlobalIPv4, + quantity: 1, }); -export const ipBlockId = ipBlock.id; -export const ipBlockSubent = ipBlock.cidrNotation; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "FR" -type = config.get("type") -if type is None: - type = "public_ipv4" -quantity = config.get_int("quantity") -if quantity is None: - quantity = 1 -ip_block = equinix.metal.ReservedIpBlock("ipBlock", +two_elastic_addresses = equinix.metal.ReservedIpBlock("twoElasticAddresses", + project_id=project_id, + metro="sv", + quantity=2) +test1 = equinix.metal.ReservedIpBlock("test1", + project_id=project_id, + type=equinix.metal.IpBlockType.PUBLIC_I_PV4, + metro="sv", + quantity=1) +test = equinix.metal.ReservedIpBlock("test", project_id=project_id, - type="public_ipv4", - quantity=quantity, - metro=metro) -pulumi.export("ipBlockId", ip_block.id) -pulumi.export("ipBlockSubent", ip_block.cidr_notation) + type=equinix.metal.IpBlockType.GLOBAL_I_PV4, + quantity=1) ``` ```go package main @@ -48,65 +47,69 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - _type := "public_ipv4" - if param := cfg.Get("type"); param != "" { - _type = param + _, err := metal.NewReservedIpBlock(ctx, "twoElasticAddresses", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(2), + }) + if err != nil { + return err } - quantity := 1 - if param := cfg.GetInt("quantity"); param != 0 { - quantity = param + _, err = metal.NewReservedIpBlock(ctx, "test1", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Type: pulumi.String(metal.IpBlockTypePublicIPv4), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(1), + }) + if err != nil { + return err } - ipBlock, err := metal.NewReservedIpBlock(ctx, "ipBlock", &metal.ReservedIpBlockArgs{ - ProjectId: pulumi.String(projectId), - Type: pulumi.String("public_ipv4"), - Quantity: pulumi.Int(quantity), - Metro: pulumi.String(metro), + _, err = metal.NewReservedIpBlock(ctx, "test", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Type: pulumi.String(metal.IpBlockTypeGlobalIPv4), + Quantity: pulumi.Int(1), }) if err != nil { return err } - ctx.Export("ipBlockId", ipBlock.ID()) - ctx.Export("ipBlockSubent", ipBlock.CidrNotation) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "FR"; - var type = config.Get("type") ?? "public_ipv4"; - var quantity = config.GetNumber("quantity") ?? 1; - var ipBlock = new Equinix.Metal.ReservedIpBlock("ipBlock", new() + var twoElasticAddresses = new Equinix.Metal.ReservedIpBlock("twoElasticAddresses", new() { ProjectId = projectId, - Type = "public_ipv4", - Quantity = quantity, - Metro = metro, + Metro = "sv", + Quantity = 2, }); - return new Dictionary + var test1 = new Equinix.Metal.ReservedIpBlock("test1", new() { - ["ipBlockId"] = ipBlock.Id, - ["ipBlockSubent"] = ipBlock.CidrNotation, - }; + ProjectId = projectId, + Type = Equinix.Metal.IpBlockType.PublicIPv4, + Metro = "sv", + Quantity = 1, + }); + + var test = new Equinix.Metal.ReservedIpBlock("test", new() + { + ProjectId = projectId, + Type = Equinix.Metal.IpBlockType.GlobalIPv4, + Quantity = 1, + }); + }); ``` ```java @@ -114,8 +117,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ReservedIpBlock; -import com.equinix.pulumi.metal.ReservedIpBlockArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -123,46 +133,275 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("FR"); - final var type = config.get("type").orElse("public_ipv4"); - final var quantity = Integer.parseInt(config.get("quantity").orElse("1")); - var ipBlock = new ReservedIpBlock("ipBlock", ReservedIpBlockArgs.builder() + var twoElasticAddresses = new ReservedIpBlock("twoElasticAddresses", ReservedIpBlockArgs.builder() .projectId(projectId) - .type(type) - .quantity(quantity) - .metro(metro) + .metro("sv") + .quantity(2) + .build()); + + var test1 = new ReservedIpBlock("test1", ReservedIpBlockArgs.builder() + .projectId(projectId) + .type("public_ipv4") + .metro("sv") + .quantity(1) + .build()); + + var test = new ReservedIpBlock("test", ReservedIpBlockArgs.builder() + .projectId(projectId) + .type("global_ipv4") + .quantity(1) .build()); - ctx.export("ipBlockId", ipBlock.id()); - ctx.export("ipBlockSubent", ipBlock.cidrNotation()); } } ``` ```yaml -config: - projectId: - type: string - metro: - type: string - default: FR - type: - type: string - default: public_ipv4 - quantity: - type: integer - default: 1 -resources: - ipBlock: + # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro for myproject + twoElasticAddresses: + type: equinix:metal:ReservedIpBlock + name: two_elastic_addresses + properties: + projectId: ${projectId} + metro: sv + quantity: 2 + # Allocate 1 floating IP in Silicon Valley (sv) metro + test1: type: equinix:metal:ReservedIpBlock properties: projectId: ${projectId} type: public_ipv4 - quantity: ${quantity} - metro: ${metro} -outputs: - ipBlockId: ${ipBlock.id} - ipBlockSubent: ${ipBlock.cidrNotation} + metro: sv + quantity: 1 + # Allocate 1 global floating IP, which can be assigned to device in any metro + test: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + type: global_ipv4 + quantity: 1 +``` +{{% /example %}} + +{{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const example = new equinix.metal.ReservedIpBlock("example", { + projectId: projectId, + metro: "sv", + quantity: 2, +}); +const nodes = new equinix.metal.Device("nodes", { + projectId: projectId, + metro: "sv", + plan: equinix.metal.Plan.C3SmallX86, + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + hostname: "test", + billingCycle: equinix.metal.BillingCycle.Hourly, + ipAddresses: [ + { + type: "public_ipv4", + cidr: 31, + reservationIds: [example.id], + }, + { + type: "private_ipv4", + }, + ], +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +example = equinix.metal.ReservedIpBlock("example", + project_id=project_id, + metro="sv", + quantity=2) +nodes = equinix.metal.Device("nodes", + project_id=project_id, + metro="sv", + plan=equinix.metal.Plan.C3_SMALL_X86, + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + hostname="test", + billing_cycle=equinix.metal.BillingCycle.HOURLY, + ip_addresses=[ + equinix.metal.DeviceIpAddressArgs( + type="public_ipv4", + cidr=31, + reservation_ids=[example.id], + ), + equinix.metal.DeviceIpAddressArgs( + type="private_ipv4", + ), + ]) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + example, err := metal.NewReservedIpBlock(ctx, "example", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(2), + }) + if err != nil { + return err + } + _, err = metal.NewDevice(ctx, "nodes", &metal.DeviceArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Plan: pulumi.String(metal.PlanC3SmallX86), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + Hostname: pulumi.String("test"), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + IpAddresses: metal.DeviceIpAddressArray{ + &metal.DeviceIpAddressArgs{ + Type: pulumi.String("public_ipv4"), + Cidr: pulumi.Int(31), + ReservationIds: pulumi.StringArray{ + example.ID(), + }, + }, + &metal.DeviceIpAddressArgs{ + Type: pulumi.String("private_ipv4"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var example = new Equinix.Metal.ReservedIpBlock("example", new() + { + ProjectId = projectId, + Metro = "sv", + Quantity = 2, + }); + + var nodes = new Equinix.Metal.Device("nodes", new() + { + ProjectId = projectId, + Metro = "sv", + Plan = Equinix.Metal.Plan.C3SmallX86, + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + Hostname = "test", + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + IpAddresses = new[] + { + new Equinix.Metal.Inputs.DeviceIpAddressArgs + { + Type = "public_ipv4", + Cidr = 31, + ReservationIds = new[] + { + example.Id, + }, + }, + new Equinix.Metal.Inputs.DeviceIpAddressArgs + { + Type = "private_ipv4", + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var example = new ReservedIpBlock("example", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("sv") + .quantity(2) + .build()); + + var nodes = new Device("nodes", DeviceArgs.builder() + .projectId(projectId) + .metro("sv") + .plan("c3.small.x86") + .operatingSystem("ubuntu_20_04") + .hostname("test") + .billingCycle("hourly") + .ipAddresses( + DeviceIpAddressArgs.builder() + .type("public_ipv4") + .cidr(31) + .reservationIds(example.id()) + .build(), + DeviceIpAddressArgs.builder() + .type("private_ipv4") + .build()) + .build()); + + } +} +``` +```yaml + # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro + example: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: sv + quantity: 2 + # Run a device with both public IPv4 from the block assigned + nodes: + type: equinix:metal:Device + properties: + projectId: ${projectId} + metro: sv + plan: c3.small.x86 + operatingSystem: ubuntu_20_04 + hostname: test + billingCycle: hourly + ipAddresses: + - type: public_ipv4 + cidr: 31 + reservationIds: + - ${example.id} + - type: private_ipv4 ``` {{% /example %}} + + diff --git a/docs/resource/equinix_metal_spot_market_request.examples.md b/docs/resource/equinix_metal_spot_market_request.examples.md index 1cb2b286..724d080b 100644 --- a/docs/resource/equinix_metal_spot_market_request.examples.md +++ b/docs/resource/equinix_metal_spot_market_request.examples.md @@ -1,17 +1,13 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "FR"; -const request = new equinix.metal.SpotMarketRequest("request", { +const req = new equinix.metal.SpotMarketRequest("req", { projectId: projectId, - metro: metro, - maxBidPrice: 0.75, + maxBidPrice: 0.03, + metro: "ny", devicesMin: 1, devicesMax: 1, instanceParameters: { @@ -21,21 +17,15 @@ const request = new equinix.metal.SpotMarketRequest("request", { plan: "c3.small.x86", }, }); -export const requestId = request.id; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "FR" -request = equinix.metal.SpotMarketRequest("request", +req = equinix.metal.SpotMarketRequest("req", project_id=project_id, - metro=metro, - max_bid_price=0.75, + max_bid_price=0.03, + metro="ny", devices_min=1, devices_max=1, instance_parameters=equinix.metal.SpotMarketRequestInstanceParametersArgs( @@ -44,7 +34,6 @@ request = equinix.metal.SpotMarketRequest("request", operating_system="ubuntu_20_04", plan="c3.small.x86", )) -pulumi.export("requestId", request.id) ``` ```go package main @@ -52,21 +41,14 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - request, err := metal.NewSpotMarketRequest(ctx, "request", &metal.SpotMarketRequestArgs{ - ProjectId: pulumi.String(projectId), - Metro: pulumi.String(metro), - MaxBidPrice: pulumi.Float64(0.75), + _, err := metal.NewSpotMarketRequest(ctx, "req", &metal.SpotMarketRequestArgs{ + ProjectId: pulumi.Any(projectId), + MaxBidPrice: pulumi.Float64(0.03), + Metro: pulumi.String("ny"), DevicesMin: pulumi.Int(1), DevicesMax: pulumi.Int(1), InstanceParameters: &metal.SpotMarketRequestInstanceParametersArgs{ @@ -79,26 +61,23 @@ func main() { if err != nil { return err } - ctx.Export("requestId", request.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "FR"; - var request = new Equinix.Metal.SpotMarketRequest("request", new() + var req = new Equinix.Metal.SpotMarketRequest("req", new() { ProjectId = projectId, - Metro = metro, - MaxBidPrice = 0.75, + MaxBidPrice = 0.03, + Metro = "ny", DevicesMin = 1, DevicesMax = 1, InstanceParameters = new Equinix.Metal.Inputs.SpotMarketRequestInstanceParametersArgs @@ -110,10 +89,6 @@ return await Deployment.RunAsync(() => }, }); - return new Dictionary - { - ["requestId"] = request.Id, - }; }); ``` ```java @@ -121,9 +96,16 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.SpotMarketRequest; -import com.equinix.pulumi.metal.SpotMarketRequestArgs; -import com.equinix.pulumi.metal.inputs.SpotMarketRequestInstanceParametersArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.SpotMarketRequest; +import com.pulumi.equinix.metal.SpotMarketRequestArgs; +import com.pulumi.equinix.metal.inputs.SpotMarketRequestInstanceParametersArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -131,13 +113,10 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("FR"); - var request = new SpotMarketRequest("request", SpotMarketRequestArgs.builder() + var req = new SpotMarketRequest("req", SpotMarketRequestArgs.builder() .projectId(projectId) - .metro(metro) - .maxBidPrice(0.75) + .maxBidPrice(0.03) + .metro("ny") .devicesMin(1) .devicesMax(1) .instanceParameters(SpotMarketRequestInstanceParametersArgs.builder() @@ -148,24 +127,17 @@ public class App { .build()) .build()); - ctx.export("requestId", request.id()); } } ``` ```yaml -config: - projectId: - type: string - metro: - type: string - default: FR -resources: - request: + # Create a spot market request + req: type: equinix:metal:SpotMarketRequest properties: projectId: ${projectId} - metro: ${metro} - maxBidPrice: 0.75 + maxBidPrice: 0.03 + metro: ny devicesMin: 1 devicesMax: 1 instanceParameters: @@ -173,7 +145,5 @@ resources: billingCycle: hourly operatingSystem: ubuntu_20_04 plan: c3.small.x86 -outputs: - requestId: ${request.id} ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_ssh_key.examples.md b/docs/resource/equinix_metal_ssh_key.examples.md index 1e08f50e..b4db662c 100644 --- a/docs/resource/equinix_metal_ssh_key.examples.md +++ b/docs/resource/equinix_metal_ssh_key.examples.md @@ -1,76 +1,119 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; +import * as std from "@pulumi/std"; -const sshKey = new equinix.metal.SshKey("sshKey", { - name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"), +const key1 = new equinix.metal.SshKey("key1", { + name: "terraform-1", + publicKey: std.fileOutput({ + input: "/home/terraform/.ssh/id_rsa.pub", + }).apply(invoke => invoke.result), +}); +const test = new equinix.metal.Device("test", { + hostname: "test-device", + plan: equinix.metal.Plan.C3SmallX86, + metro: "sv", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}, { + dependsOn: [key1], }); -export const sshKeyId = sshKey.id; ``` ```python import pulumi import pulumi_equinix as equinix +import pulumi_std as std -ssh_key = equinix.metal.SshKey("sshKey", - name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) +key1 = equinix.metal.SshKey("key1", + name="terraform-1", + public_key=std.file_output(input="/home/terraform/.ssh/id_rsa.pub").apply(lambda invoke: invoke.result)) +test = equinix.metal.Device("test", + hostname="test-device", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="sv", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + opts = pulumi.ResourceOptions(depends_on=[key1])) ``` ```go package main import ( - "os" - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi-std/sdk/go/std" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - func main() { pulumi.Run(func(ctx *pulumi.Context) error { - sshKey, err := metal.NewSshKey(ctx, "sshKey", &metal.SshKeyArgs{ - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: "/home/terraform/.ssh/id_rsa.pub", + }, nil) + if err != nil { + return err + } + key1, err := metal.NewSshKey(ctx, "key1", &metal.SshKeyArgs{ + Name: pulumi.String("terraform-1"), + PublicKey: invokeFile.Result, }) if err != nil { return err } - ctx.Export("sshKeyId", sshKey.ID()) + _, err = metal.NewDevice(ctx, "test", &metal.DeviceArgs{ + Hostname: pulumi.String("test-device"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("sv"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + }, pulumi.DependsOn([]pulumi.Resource{ + key1, + })) + if err != nil { + return err + } return nil }) } ``` ```csharp using System.Collections.Generic; -using System.IO; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; return await Deployment.RunAsync(() => { - var sshKey = new Equinix.Metal.SshKey("sshKey", new() + var key1 = new Equinix.Metal.SshKey("key1", new() { - Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), + Name = "terraform-1", + PublicKey = Std.File.Invoke(new() + { + Input = "/home/terraform/.ssh/id_rsa.pub", + }).Apply(invoke => invoke.Result), }); - return new Dictionary + var test = new Equinix.Metal.Device("test", new() + { + Hostname = "test-device", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "sv", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }, new CustomResourceOptions { - ["sshKeyId"] = sshKey.Id, - }; + DependsOn = + { + key1, + }, + }); + }); ``` ```java @@ -78,10 +121,16 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.SshKey; -import com.equinix.pulumi.metal.SshKeyArgs; - -import java.io.IOException; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.SshKey; +import com.pulumi.equinix.metal.SshKeyArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.resources.CustomResourceOptions; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -91,31 +140,52 @@ public class App { } public static void stack(Context ctx) { - String content = null; - try { - content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } - - var sshKey = new SshKey("sshKey", SshKeyArgs.builder() - .name("johnKent") - .publicKey(content) + var key1 = new SshKey("key1", SshKeyArgs.builder() + .name("terraform-1") + .publicKey(StdFunctions.file(FileArgs.builder() + .input("/home/terraform/.ssh/id_rsa.pub") + .build()).result()) .build()); - ctx.export("sshKeyId", sshKey.id()); + var test = new Device("test", DeviceArgs.builder() + .hostname("test-device") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build(), CustomResourceOptions.builder() + .dependsOn(key1) + .build()); + } } ``` ```yaml -resources: - sshKey: + # Create a new SSH key + key1: type: equinix:metal:SshKey properties: - name: johnKent + name: terraform-1 publicKey: - fn::readFile: /Users/John/.ssh/metal_rsa.pub -outputs: - sshKeyId: ${sshKey.id} + fn::invoke: + Function: std:file + Arguments: + input: /home/terraform/.ssh/id_rsa.pub + Return: result + # Create new device with "key1" included. The device resource "depends_on" the + # key, in order to make sure the key is created before the device. + test: + type: equinix:metal:Device + properties: + hostname: test-device + plan: c3.small.x86 + metro: sv + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + options: + dependson: + - ${key1} ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_user_api_key.examples.md b/docs/resource/equinix_metal_user_api_key.examples.md index 453aed4d..c3b75de8 100644 --- a/docs/resource/equinix_metal_user_api_key.examples.md +++ b/docs/resource/equinix_metal_user_api_key.examples.md @@ -1,34 +1,21 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const description = config.get("description") || "An user level API Key"; -const readOnly = config.getBoolean("readOnly") || false; -const apiKey = new equinix.metal.UserApiKey("apiKey", { - description: description, - readOnly: readOnly, +const test = new equinix.metal.UserApiKey("test", { + description: "Read-only user key", + readOnly: true, }); -export const apiKeyToken = apiKey.token; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -description = config.get("description") -if description is None: - description = "An user level API Key" -read_only = config.get_bool("readOnly") -if read_only is None: - read_only = False -api_key = equinix.metal.UserApiKey("apiKey", - description=description, - read_only=read_only) -pulumi.export("apiKeyToken", api_key.token) +test = equinix.metal.UserApiKey("test", + description="Read-only user key", + read_only=True) ``` ```go package main @@ -36,52 +23,35 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - description := "An user level API Key" - if param := cfg.Get("description"); param != "" { - description = param - } - readOnly := false - if param := cfg.GetBool("readOnly"); param { - readOnly = param - } - apiKey, err := metal.NewUserApiKey(ctx, "apiKey", &metal.UserApiKeyArgs{ - Description: pulumi.String(description), - ReadOnly: pulumi.Bool(readOnly), + _, err := metal.NewUserApiKey(ctx, "test", &metal.UserApiKeyArgs{ + Description: pulumi.String("Read-only user key"), + ReadOnly: pulumi.Bool(true), }) if err != nil { return err } - ctx.Export("apiKeyToken", apiKey.Token) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var description = config.Get("description") ?? "An user level API Key"; - var readOnly = config.GetBoolean("readOnly") ?? false; - var apiKey = new Equinix.Metal.UserApiKey("apiKey", new() + var test = new Equinix.Metal.UserApiKey("test", new() { - Description = description, - ReadOnly = readOnly, + Description = "Read-only user key", + ReadOnly = true, }); - return new Dictionary - { - ["apiKeyToken"] = apiKey.Token, - }; }); ``` ```java @@ -89,8 +59,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.UserApiKey; -import com.equinix.pulumi.metal.UserApiKeyArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.UserApiKey; +import com.pulumi.equinix.metal.UserApiKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -98,33 +75,20 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var description = config.get("description").orElse("An user level API Key"); - final var readOnly = config.getBoolean("readOnly").orElse(false); - var apiKey = new UserApiKey("apiKey", UserApiKeyArgs.builder() - .description(description) - .readOnly(readOnly) + var test = new UserApiKey("test", UserApiKeyArgs.builder() + .description("Read-only user key") + .readOnly(true) .build()); - ctx.export("apiKeyToken", apiKey.token()); } } ``` ```yaml -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false -resources: - apiKey: + # Create a new read-only user API key + test: type: equinix:metal:UserApiKey properties: - description: ${description} - readOnly: ${readOnly} -outputs: - apiKeyToken: ${apiKey.token} + description: Read-only user key + readOnly: true ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_virtual_circuit.examples.md b/docs/resource/equinix_metal_virtual_circuit.examples.md index 0f59fc2c..f0d5feb3 100644 --- a/docs/resource/equinix_metal_virtual_circuit.examples.md +++ b/docs/resource/equinix_metal_virtual_circuit.examples.md @@ -1,44 +1,43 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const connectionId = config.require("connectionId"); -const vlanId = config.require("vlanId"); -const portId = equinix.metal.getInterconnection({ - connectionId: connectionId, -}).then(invoke => invoke.ports?.[0]?.id); -const vc = new equinix.metal.VirtualCircuit("vc", { - connectionId: connectionId, +const projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; +const connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; +const test = equinix.metal.getInterconnectionOutput({ + connectionId: connId, +}); +const testVlan = new equinix.metal.Vlan("testVlan", { projectId: projectId, - portId: portId, - vlanId: vlanId, + metro: test.apply(test => test.metro), +}); +const testVirtualCircuit = new equinix.metal.VirtualCircuit("testVirtualCircuit", { + connectionId: connId, + projectId: projectId, + portId: test.apply(test => test.ports?.[0]?.id), + vlanId: testVlan.id, nniVlan: 1056, }); -export const vcStatus = vc.status; -export const vcVnid = vc.vnid; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -connection_id = config.require("connectionId") -vlan_id = config.require("vlanId") -port_id = equinix.metal.get_interconnection(connection_id=connection_id).ports[0].id -vc = equinix.metal.VirtualCircuit("vc", - connection_id=connection_id, +project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c" +conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0" +test = equinix.metal.get_interconnection_output(connection_id=conn_id) +test_vlan = equinix.metal.Vlan("testVlan", + project_id=project_id, + metro=test.metro) +test_virtual_circuit = equinix.metal.VirtualCircuit("testVirtualCircuit", + connection_id=conn_id, project_id=project_id, - port_id=port_id, - vlan_id=vlan_id, + port_id=test.ports[0].id, + vlan_id=test_vlan.id, nni_vlan=1056) -pulumi.export("vcStatus", vc.status) -pulumi.export("vcVnid", vc.vnid) ``` ```go package main @@ -46,64 +45,71 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - connectionId := cfg.Require("connectionId") - vlanId := cfg.Require("vlanId") - portId := metal.LookupInterconnection(ctx, &metal.LookupInterconnectionArgs{ - ConnectionId: connectionId, - }, nil).Ports[0].Id - vc, err := metal.NewVirtualCircuit(ctx, "vc", &metal.VirtualCircuitArgs{ - ConnectionId: pulumi.String(connectionId), + projectId := "52000fb2-ee46-4673-93a8-de2c2bdba33c" + connId := "73f12f29-3e19-43a0-8e90-ae81580db1e0" + test, err := metal.LookupInterconnection(ctx, &metal.LookupInterconnectionArgs{ + ConnectionId: connId, + }, nil) + if err != nil { + return err + } + testVlan, err := metal.NewVlan(ctx, "testVlan", &metal.VlanArgs{ + ProjectId: pulumi.String(projectId), + Metro: pulumi.String(test.Metro), + }) + if err != nil { + return err + } + _, err = metal.NewVirtualCircuit(ctx, "testVirtualCircuit", &metal.VirtualCircuitArgs{ + ConnectionId: pulumi.String(connId), ProjectId: pulumi.String(projectId), - PortId: *pulumi.String(portId), - VlanId: pulumi.String(vlanId), + PortId: pulumi.String(test.Ports[0].Id), + VlanId: testVlan.ID(), NniVlan: pulumi.Int(1056), }) if err != nil { return err } - ctx.Export("vcStatus", vc.Status) - ctx.Export("vcVnid", vc.Vnid) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var connectionId = config.Require("connectionId"); - var vlanId = config.Require("vlanId"); - var portId = Equinix.Metal.GetInterconnection.Invoke(new() + var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; + + var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; + + var test = Equinix.Metal.GetInterconnection.Invoke(new() { - ConnectionId = connectionId, - }).Apply(invoke => invoke.Ports[0]?.Id); + ConnectionId = connId, + }); - var vc = new Equinix.Metal.VirtualCircuit("vc", new() + var testVlan = new Equinix.Metal.Vlan("testVlan", new() { - ConnectionId = connectionId, ProjectId = projectId, - PortId = portId, - VlanId = vlanId, - NniVlan = 1056, + Metro = test.Apply(getInterconnectionResult => getInterconnectionResult.Metro), }); - return new Dictionary + var testVirtualCircuit = new Equinix.Metal.VirtualCircuit("testVirtualCircuit", new() { - ["vcStatus"] = vc.Status, - ["vcVnid"] = vc.Vnid, - }; + ConnectionId = connId, + ProjectId = projectId, + PortId = test.Apply(getInterconnectionResult => getInterconnectionResult.Ports[0]?.Id), + VlanId = testVlan.Id, + NniVlan = 1056, + }); + }); ``` ```java @@ -111,10 +117,19 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.inputs.GetInterconnectionArgs; -import com.equinix.pulumi.metal.MetalFunctions; -import com.equinix.pulumi.metal.VirtualCircuit; -import com.equinix.pulumi.metal.VirtualCircuitArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.MetalFunctions; +import com.pulumi.equinix.metal.inputs.GetInterconnectionArgs; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.VirtualCircuit; +import com.pulumi.equinix.metal.VirtualCircuitArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -122,53 +137,53 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var connectionId = config.get("connectionId").get(); - final var vlanId = config.get("vlanId").get(); - final var portId = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder() - .connectionId(connectionId) - .build()).applyValue(data -> data.ports().get(0).id()); - - var vc = new VirtualCircuit("vc", VirtualCircuitArgs.builder() - .connectionId(connectionId) + final var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; + + final var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; + + final var test = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder() + .connectionId(connId) + .build()); + + var testVlan = new Vlan("testVlan", VlanArgs.builder() + .projectId(projectId) + .metro(test.applyValue(getInterconnectionResult -> getInterconnectionResult.metro())) + .build()); + + var testVirtualCircuit = new VirtualCircuit("testVirtualCircuit", VirtualCircuitArgs.builder() + .connectionId(connId) .projectId(projectId) - .portId(portId) - .vlanId(vlanId) + .portId(test.applyValue(getInterconnectionResult -> getInterconnectionResult.ports()[0].id())) + .vlanId(testVlan.id()) .nniVlan(1056) .build()); - ctx.export("vcStatus", vc.status()); - ctx.export("vcVnid", vc.vnid()); } } ``` ```yaml -config: - projectId: - type: string - connectionId: - type: string - vlanId: - type: string -variables: - portId: - fn::invoke: - function: equinix:metal:getInterconnection - arguments: - connectionId: ${connectionId} - return: ports[0].id -resources: - vc: + testVlan: + type: equinix:metal:Vlan + name: test + properties: + projectId: ${projectId} + metro: ${test.metro} + testVirtualCircuit: type: equinix:metal:VirtualCircuit + name: test properties: - connectionId: ${connectionId} + connectionId: ${connId} projectId: ${projectId} - portId: ${portId} - vlanId: ${vlanId} + portId: ${test.ports[0].id} + vlanId: ${testVlan.id} nniVlan: 1056 -outputs: - vcStatus: ${vc.status} - vcVnid: ${vc.vnid} +variables: + projectId: 52000fb2-ee46-4673-93a8-de2c2bdba33c + connId: 73f12f29-3e19-43a0-8e90-ae81580db1e0 + test: + fn::invoke: + Function: equinix:metal:getInterconnection + Arguments: + connectionId: ${connId} ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_vlan.examples.md b/docs/resource/equinix_metal_vlan.examples.md index 8a8fbadd..fc022c8a 100644 --- a/docs/resource/equinix_metal_vlan.examples.md +++ b/docs/resource/equinix_metal_vlan.examples.md @@ -1,38 +1,25 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "DA"; -const vxlan = config.requireNumber("vxlan"); -const vlan = new equinix.metal.Vlan("vlan", { - description: "VLAN in Dallas", +const vlan1 = new equinix.metal.Vlan("vlan1", { + description: "VLAN in New Jersey", + metro: "sv", projectId: projectId, - metro: metro, - vxlan: vxlan, + vxlan: 1040, }); -export const vlanId = vlan.id; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "DA" -vxlan = config.require_int("vxlan") -vlan = equinix.metal.Vlan("vlan", - description="VLAN in Dallas", +vlan1 = equinix.metal.Vlan("vlan1", + description="VLAN in New Jersey", + metro="sv", project_id=project_id, - metro=metro, - vxlan=vxlan) -pulumi.export("vlanId", vlan.id) + vxlan=1040) ``` ```go package main @@ -40,55 +27,39 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "DA" - if param := cfg.Get("metro"); param != "" { - metro = param - } - vxlan := cfg.RequireInt("vxlan") - vlan, err := metal.NewVlan(ctx, "vlan", &metal.VlanArgs{ - Description: pulumi.String("VLAN in Dallas"), - ProjectId: pulumi.String(projectId), - Metro: pulumi.String(metro), - Vxlan: pulumi.Int(vxlan), + _, err := metal.NewVlan(ctx, "vlan1", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New Jersey"), + Metro: pulumi.String("sv"), + ProjectId: pulumi.Any(projectId), + Vxlan: pulumi.Int(1040), }) if err != nil { return err } - ctx.Export("vlanId", vlan.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "DA"; - var vxlan = config.RequireNumber("vxlan"); - var vlan = new Equinix.Metal.Vlan("vlan", new() + var vlan1 = new Equinix.Metal.Vlan("vlan1", new() { - Description = "VLAN in Dallas", + Description = "VLAN in New Jersey", + Metro = "sv", ProjectId = projectId, - Metro = metro, - Vxlan = vxlan, + Vxlan = 1040, }); - return new Dictionary - { - ["vlanId"] = vlan.Id, - }; }); ``` ```java @@ -96,8 +67,15 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Vlan; -import com.equinix.pulumi.metal.VlanArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -105,39 +83,24 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("DA"); - final var vxlan = Integer.parseInt(config.get("vxlan").get()); - var vlan = new Vlan("vlan", VlanArgs.builder() - .description("VLAN in Dallas") + var vlan1 = new Vlan("vlan1", VlanArgs.builder() + .description("VLAN in New Jersey") + .metro("sv") .projectId(projectId) - .metro(metro) - .vxlan(vxlan) + .vxlan(1040) .build()); - ctx.export("vlanId", vlan.id()); } } ``` ```yaml -config: - projectId: - type: string - metro: - type: string - default: DA - vxlan: - type: integer -resources: - vlan: + # Create a new VLAN in metro "esv" + vlan1: type: equinix:metal:Vlan properties: - description: VLAN in Dallas + description: VLAN in New Jersey + metro: sv projectId: ${projectId} - metro: ${metro} - vxlan: ${vxlan} -outputs: - vlanId: ${vlan.id} + vxlan: 1040 ``` {{% /example %}} diff --git a/docs/resource/equinix_metal_vrf.examples.md b/docs/resource/equinix_metal_vrf.examples.md index 7d085260..1bbb9fac 100644 --- a/docs/resource/equinix_metal_vrf.examples.md +++ b/docs/resource/equinix_metal_vrf.examples.md @@ -1,46 +1,241 @@ ## Example Usage + {{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const example = new equinix.metal.ReservedIpBlock("example", { + description: "Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.", + projectId: exampleEquinixMetalProject.id, + metro: exampleEquinixMetalVrf.metro, + type: "vrf", + vrfId: exampleEquinixMetalVrf.id, + cidr: 29, + network: "192.168.100.0", +}); +const exampleVlan = new equinix.metal.Vlan("exampleVlan", { + description: "A VLAN for Layer2 and Hybrid Metal devices", + metro: exampleEquinixMetalVrf.metro, + projectId: exampleEquinixMetalProject.id, +}); +const exampleGateway = new equinix.metal.Gateway("exampleGateway", { + projectId: exampleEquinixMetalProject.id, + vlanId: exampleVlan.id, + ipReservationId: example.id, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +example = equinix.metal.ReservedIpBlock("example", + description="Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.", + project_id=example_equinix_metal_project["id"], + metro=example_equinix_metal_vrf["metro"], + type="vrf", + vrf_id=example_equinix_metal_vrf["id"], + cidr=29, + network="192.168.100.0") +example_vlan = equinix.metal.Vlan("exampleVlan", + description="A VLAN for Layer2 and Hybrid Metal devices", + metro=example_equinix_metal_vrf["metro"], + project_id=example_equinix_metal_project["id"]) +example_gateway = equinix.metal.Gateway("exampleGateway", + project_id=example_equinix_metal_project["id"], + vlan_id=example_vlan.id, + ip_reservation_id=example.id) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + example, err := metal.NewReservedIpBlock(ctx, "example", &metal.ReservedIpBlockArgs{ + Description: pulumi.String("Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space."), + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + Metro: pulumi.Any(exampleEquinixMetalVrf.Metro), + Type: pulumi.String("vrf"), + VrfId: pulumi.Any(exampleEquinixMetalVrf.Id), + Cidr: pulumi.Int(29), + Network: pulumi.String("192.168.100.0"), + }) + if err != nil { + return err + } + exampleVlan, err := metal.NewVlan(ctx, "exampleVlan", &metal.VlanArgs{ + Description: pulumi.String("A VLAN for Layer2 and Hybrid Metal devices"), + Metro: pulumi.Any(exampleEquinixMetalVrf.Metro), + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + }) + if err != nil { + return err + } + _, err = metal.NewGateway(ctx, "exampleGateway", &metal.GatewayArgs{ + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + VlanId: exampleVlan.ID(), + IpReservationId: example.ID(), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var example = new Equinix.Metal.ReservedIpBlock("example", new() + { + Description = "Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.", + ProjectId = exampleEquinixMetalProject.Id, + Metro = exampleEquinixMetalVrf.Metro, + Type = "vrf", + VrfId = exampleEquinixMetalVrf.Id, + Cidr = 29, + Network = "192.168.100.0", + }); + + var exampleVlan = new Equinix.Metal.Vlan("exampleVlan", new() + { + Description = "A VLAN for Layer2 and Hybrid Metal devices", + Metro = exampleEquinixMetalVrf.Metro, + ProjectId = exampleEquinixMetalProject.Id, + }); + + var exampleGateway = new Equinix.Metal.Gateway("exampleGateway", new() + { + ProjectId = exampleEquinixMetalProject.Id, + VlanId = exampleVlan.Id, + IpReservationId = example.Id, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.Gateway; +import com.pulumi.equinix.metal.GatewayArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var example = new ReservedIpBlock("example", ReservedIpBlockArgs.builder() + .description("Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.") + .projectId(exampleEquinixMetalProject.id()) + .metro(exampleEquinixMetalVrf.metro()) + .type("vrf") + .vrfId(exampleEquinixMetalVrf.id()) + .cidr(29) + .network("192.168.100.0") + .build()); + + var exampleVlan = new Vlan("exampleVlan", VlanArgs.builder() + .description("A VLAN for Layer2 and Hybrid Metal devices") + .metro(exampleEquinixMetalVrf.metro()) + .projectId(exampleEquinixMetalProject.id()) + .build()); + + var exampleGateway = new Gateway("exampleGateway", GatewayArgs.builder() + .projectId(exampleEquinixMetalProject.id()) + .vlanId(exampleVlan.id()) + .ipReservationId(example.id()) + .build()); + + } +} +``` +```yaml + example: + type: equinix:metal:ReservedIpBlock + properties: + description: Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space. + projectId: ${exampleEquinixMetalProject.id} + metro: ${exampleEquinixMetalVrf.metro} + type: vrf + vrfId: ${exampleEquinixMetalVrf.id} + cidr: 29 + network: 192.168.100.0 + exampleVlan: + type: equinix:metal:Vlan + name: example + properties: + description: A VLAN for Layer2 and Hybrid Metal devices + metro: ${exampleEquinixMetalVrf.metro} + projectId: ${exampleEquinixMetalProject.id} + exampleGateway: + type: equinix:metal:Gateway + name: example + properties: + projectId: ${exampleEquinixMetalProject.id} + vlanId: ${exampleVlan.id} + ipReservationId: ${example.id} +``` +{{% /example %}} +{{% example %}} +### example 1 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "DA"; -const vrf = new equinix.metal.Vrf("vrf", { - description: "VRF with ASN 65000 and a pool of address space", +const example = new equinix.metal.Project("example", {name: "example"}); +const exampleVrf = new equinix.metal.Vrf("exampleVrf", { + description: "VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25", name: "example-vrf", - metro: metro, + metro: "da", localAsn: 65000, ipRanges: [ "192.168.100.0/25", "192.168.200.0/25", ], - projectId: projectId, + projectId: example.id, }); -export const vrfId = vrf.id; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "DA" -vrf = equinix.metal.Vrf("vrf", - description="VRF with ASN 65000 and a pool of address space", +example = equinix.metal.Project("example", name="example") +example_vrf = equinix.metal.Vrf("exampleVrf", + description="VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25", name="example-vrf", - metro=metro, + metro="da", local_asn=65000, ip_ranges=[ "192.168.100.0/25", "192.168.200.0/25", ], - project_id=project_id) -pulumi.export("vrfId", vrf.id) + project_id=example.id) ``` ```go package main @@ -48,64 +243,61 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "DA" - if param := cfg.Get("metro"); param != "" { - metro = param + example, err := metal.NewProject(ctx, "example", &metal.ProjectArgs{ + Name: pulumi.String("example"), + }) + if err != nil { + return err } - vrf, err := metal.NewVrf(ctx, "vrf", &metal.VrfArgs{ - Description: pulumi.String("VRF with ASN 65000 and a pool of address space"), + _, err = metal.NewVrf(ctx, "exampleVrf", &metal.VrfArgs{ + Description: pulumi.String("VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25"), Name: pulumi.String("example-vrf"), - Metro: pulumi.String(metro), + Metro: pulumi.String("da"), LocalAsn: pulumi.Int(65000), IpRanges: pulumi.StringArray{ pulumi.String("192.168.100.0/25"), pulumi.String("192.168.200.0/25"), }, - ProjectId: pulumi.String(projectId), + ProjectId: example.ID(), }) if err != nil { return err } - ctx.Export("vrfId", vrf.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "DA"; - var vrf = new Equinix.Metal.Vrf("vrf", new() + var example = new Equinix.Metal.Project("example", new() + { + Name = "example", + }); + + var exampleVrf = new Equinix.Metal.Vrf("exampleVrf", new() { - Description = "VRF with ASN 65000 and a pool of address space", + Description = "VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25", Name = "example-vrf", - Metro = metro, + Metro = "da", LocalAsn = 65000, IpRanges = new[] { "192.168.100.0/25", "192.168.200.0/25", }, - ProjectId = projectId, + ProjectId = example.Id, }); - return new Dictionary - { - ["vrfId"] = vrf.Id, - }; }); ``` ```java @@ -113,8 +305,17 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Vrf; -import com.equinix.pulumi.metal.VrfArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import com.pulumi.equinix.metal.Vrf; +import com.pulumi.equinix.metal.VrfArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -122,44 +323,197 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("DA"); - var vrf = new Vrf("vrf", VrfArgs.builder() - .description("VRF with ASN 65000 and a pool of address space") + var example = new Project("example", ProjectArgs.builder() + .name("example") + .build()); + + var exampleVrf = new Vrf("exampleVrf", VrfArgs.builder() + .description("VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25") .name("example-vrf") - .metro(metro) - .localAsn(65000) + .metro("da") + .localAsn("65000") .ipRanges( "192.168.100.0/25", "192.168.200.0/25") - .projectId(projectId) + .projectId(example.id()) .build()); - ctx.export("vrfId", vrf.id()); } } ``` ```yaml -config: - projectId: - type: string - metro: - type: string - default: DA -resources: - vrf: + example: + type: equinix:metal:Project + properties: + name: example + exampleVrf: type: equinix:metal:Vrf + name: example properties: - description: VRF with ASN 65000 and a pool of address space + description: VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25 name: example-vrf - metro: ${metro} - localAsn: "65000" + metro: da + localAsn: '65000' ipRanges: - - 192.168.100.0/25 - - 192.168.200.0/25 - projectId: ${projectId} -outputs: - vrfId: ${vrf.id} + - 192.168.100.0/25 + - 192.168.200.0/25 + projectId: ${example.id} ``` {{% /example %}} + +{{% example %}} +### example 3 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const exampleVirtualCircuit = new equinix.metal.VirtualCircuit("exampleVirtualCircuit", { + name: "example-vc", + description: "Virtual Circuit", + connectionId: example.id, + projectId: exampleEquinixMetalProject.id, + portId: example.ports[0].id, + nniVlan: 1024, + vrfId: exampleEquinixMetalVrf.id, + peerAsn: 65530, + subnet: "192.168.100.16/31", + metalIp: "192.168.100.16", + customerIp: "192.168.100.17", +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +example_virtual_circuit = equinix.metal.VirtualCircuit("exampleVirtualCircuit", + name="example-vc", + description="Virtual Circuit", + connection_id=example["id"], + project_id=example_equinix_metal_project["id"], + port_id=example["ports"][0]["id"], + nni_vlan=1024, + vrf_id=example_equinix_metal_vrf["id"], + peer_asn=65530, + subnet="192.168.100.16/31", + metal_ip="192.168.100.16", + customer_ip="192.168.100.17") +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewVirtualCircuit(ctx, "exampleVirtualCircuit", &metal.VirtualCircuitArgs{ + Name: pulumi.String("example-vc"), + Description: pulumi.String("Virtual Circuit"), + ConnectionId: pulumi.Any(example.Id), + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + PortId: pulumi.Any(example.Ports[0].Id), + NniVlan: pulumi.Int(1024), + VrfId: pulumi.Any(exampleEquinixMetalVrf.Id), + PeerAsn: pulumi.Int(65530), + Subnet: pulumi.String("192.168.100.16/31"), + MetalIp: pulumi.String("192.168.100.16"), + CustomerIp: pulumi.String("192.168.100.17"), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var exampleVirtualCircuit = new Equinix.Metal.VirtualCircuit("exampleVirtualCircuit", new() + { + Name = "example-vc", + Description = "Virtual Circuit", + ConnectionId = example.Id, + ProjectId = exampleEquinixMetalProject.Id, + PortId = example.Ports[0].Id, + NniVlan = 1024, + VrfId = exampleEquinixMetalVrf.Id, + PeerAsn = 65530, + Subnet = "192.168.100.16/31", + MetalIp = "192.168.100.16", + CustomerIp = "192.168.100.17", + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.VirtualCircuit; +import com.pulumi.equinix.metal.VirtualCircuitArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var exampleVirtualCircuit = new VirtualCircuit("exampleVirtualCircuit", VirtualCircuitArgs.builder() + .name("example-vc") + .description("Virtual Circuit") + .connectionId(example.id()) + .projectId(exampleEquinixMetalProject.id()) + .portId(example.ports()[0].id()) + .nniVlan(1024) + .vrfId(exampleEquinixMetalVrf.id()) + .peerAsn(65530) + .subnet("192.168.100.16/31") + .metalIp("192.168.100.16") + .customerIp("192.168.100.17") + .build()); + + } +} +``` +```yaml + exampleVirtualCircuit: + type: equinix:metal:VirtualCircuit + name: example + properties: + name: example-vc + description: Virtual Circuit + connectionId: ${example.id} + projectId: ${exampleEquinixMetalProject.id} + portId: ${example.ports[0].id} + nniVlan: 1024 + vrfId: ${exampleEquinixMetalVrf.id} + peerAsn: 65530 + subnet: 192.168.100.16/31 + metalIp: 192.168.100.16 + customerIp: 192.168.100.17 +variables: + example: + fn::invoke: + Function: equinix:metal:getInterconnection + Arguments: + connectionId: ${metalDedicatedConnectionId} +``` +{{% /example %}} + + diff --git a/docs/resource/equinix_network_acl_template.examples.md b/docs/resource/equinix_network_acl_template.examples.md index 116661f0..23029f52 100644 --- a/docs/resource/equinix_network_acl_template.examples.md +++ b/docs/resource/equinix_network_acl_template.examples.md @@ -1,56 +1,53 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const aclTemplate = new equinix.networkedge.AclTemplate("aclTemplate", { +const myacl = new equinix.networkedge.AclTemplate("myacl", { name: "test", description: "Test ACL template", + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", inboundRules: [ { subnet: "1.1.1.1/32", - protocol: "IP", + protocol: equinix.networkedge.AclRuleProtocolType.IP, srcPort: "any", dstPort: "any", description: "inbound rule description", }, { - subnet: "2.2.2.2/28", - protocol: "TCP", + subnet: "172.16.25.0/24", + protocol: equinix.networkedge.AclRuleProtocolType.UDP, srcPort: "any", - dstPort: "any", - description: "inbound rule description", + dstPort: "53,1045,2041", }, ], }); -export const templateId = aclTemplate.id; ``` ```python import pulumi import pulumi_equinix as equinix -acl_template = equinix.networkedge.AclTemplate("aclTemplate", +myacl = equinix.networkedge.AclTemplate("myacl", name="test", description="Test ACL template", + project_id="a86d7112-d740-4758-9c9c-31e66373746b", inbound_rules=[ equinix.networkedge.AclTemplateInboundRuleArgs( subnet="1.1.1.1/32", - protocol="IP", + protocol=equinix.networkedge.AclRuleProtocolType.IP, src_port="any", dst_port="any", description="inbound rule description", ), equinix.networkedge.AclTemplateInboundRuleArgs( - subnet="2.2.2.2/28", - protocol="TCP", + subnet="172.16.25.0/24", + protocol=equinix.networkedge.AclRuleProtocolType.UDP, src_port="any", - dst_port="any", - description="inbound rule description", + dst_port="53,1045,2041", ), ]) -pulumi.export("templateId", acl_template.id) ``` ```go package main @@ -62,70 +59,66 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - aclTemplate, err := networkedge.NewAclTemplate(ctx, "aclTemplate", &networkedge.AclTemplateArgs{ + _, err := networkedge.NewAclTemplate(ctx, "myacl", &networkedge.AclTemplateArgs{ Name: pulumi.String("test"), Description: pulumi.String("Test ACL template"), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), InboundRules: networkedge.AclTemplateInboundRuleArray{ &networkedge.AclTemplateInboundRuleArgs{ Subnet: pulumi.String("1.1.1.1/32"), - Protocol: pulumi.String("IP"), + Protocol: pulumi.String(networkedge.AclRuleProtocolTypeIP), SrcPort: pulumi.String("any"), DstPort: pulumi.String("any"), Description: pulumi.String("inbound rule description"), }, &networkedge.AclTemplateInboundRuleArgs{ - Subnet: pulumi.String("2.2.2.2/28"), - Protocol: pulumi.String("TCP"), - SrcPort: pulumi.String("any"), - DstPort: pulumi.String("any"), - Description: pulumi.String("inbound rule description"), + Subnet: pulumi.String("172.16.25.0/24"), + Protocol: pulumi.String(networkedge.AclRuleProtocolTypeUDP), + SrcPort: pulumi.String("any"), + DstPort: pulumi.String("53,1045,2041"), }, }, }) if err != nil { return err } - ctx.Export("templateId", aclTemplate.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var aclTemplate = new Equinix.NetworkEdge.AclTemplate("aclTemplate", new() + var myacl = new Equinix.NetworkEdge.AclTemplate("myacl", new() { Name = "test", Description = "Test ACL template", + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", InboundRules = new[] { new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs { Subnet = "1.1.1.1/32", - Protocol = "IP", + Protocol = Equinix.NetworkEdge.AclRuleProtocolType.IP, SrcPort = "any", DstPort = "any", Description = "inbound rule description", }, new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs { - Subnet = "2.2.2.2/28", - Protocol = "TCP", + Subnet = "172.16.25.0/24", + Protocol = Equinix.NetworkEdge.AclRuleProtocolType.UDP, SrcPort = "any", - DstPort = "any", - Description = "inbound rule description", + DstPort = "53,1045,2041", }, }, }); - return new Dictionary - { - ["templateId"] = aclTemplate.Id, - }; }); ``` ```java @@ -134,9 +127,9 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.AclTemplate; -import com.equinix.pulumi.networkedge.AclTemplateArgs; -import com.equinix.pulumi.networkedge.inputs.AclTemplateInboundRuleArgs; +import com.pulumi.equinix.networkedge.AclTemplate; +import com.pulumi.equinix.networkedge.AclTemplateArgs; +import com.pulumi.equinix.networkedge.inputs.AclTemplateInboundRuleArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -150,9 +143,10 @@ public class App { } public static void stack(Context ctx) { - var aclTemplate = new AclTemplate("aclTemplate", AclTemplateArgs.builder() + var myacl = new AclTemplate("myacl", AclTemplateArgs.builder() .name("test") .description("Test ACL template") + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") .inboundRules( AclTemplateInboundRuleArgs.builder() .subnet("1.1.1.1/32") @@ -162,37 +156,33 @@ public class App { .description("inbound rule description") .build(), AclTemplateInboundRuleArgs.builder() - .subnet("2.2.2.2/28") - .protocol("TCP") + .subnet("172.16.25.0/24") + .protocol("UDP") .srcPort("any") - .dstPort("any") - .description("inbound rule description") + .dstPort("53,1045,2041") .build()) .build()); - ctx.export("templateId", aclTemplate.id()); } } ``` ```yaml -resources: - aclTemplate: + # Creates ACL template and assigns it to the network device + myacl: type: equinix:networkedge:AclTemplate properties: name: test description: Test ACL template + projectId: a86d7112-d740-4758-9c9c-31e66373746b inboundRules: - - subnet: 1.1.1.1/32 - protocol: IP - srcPort: any - dstPort: any - description: inbound rule description - - subnet: 2.2.2.2/28 - protocol: TCP - srcPort: any - dstPort: any - description: inbound rule description -outputs: - templateId: ${aclTemplate.id} + - subnet: 1.1.1.1/32 + protocol: IP + srcPort: any + dstPort: any + description: inbound rule description + - subnet: 172.16.25.0/24 + protocol: UDP + srcPort: any + dstPort: 53,1045,2041 ``` {{% /example %}} diff --git a/docs/resource/equinix_network_bgp.examples.md b/docs/resource/equinix_network_bgp.examples.md index d65d592b..66411fca 100644 --- a/docs/resource/equinix_network_bgp.examples.md +++ b/docs/resource/equinix_network_bgp.examples.md @@ -1,11 +1,10 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const bgp = new equinix.networkedge.Bgp("bgp", { +const test = new equinix.networkedge.Bgp("test", { connectionId: "54014acf-9730-4b55-a791-459283d05fb1", localIpAddress: "10.1.1.1/30", localAsn: 12345, @@ -13,22 +12,18 @@ const bgp = new equinix.networkedge.Bgp("bgp", { remoteAsn: 66123, authenticationKey: "secret", }); -export const state = bgp.state; -export const provisioningStatus = bgp.provisioningStatus; ``` ```python import pulumi import pulumi_equinix as equinix -bgp = equinix.networkedge.Bgp("bgp", +test = equinix.networkedge.Bgp("test", connection_id="54014acf-9730-4b55-a791-459283d05fb1", local_ip_address="10.1.1.1/30", local_asn=12345, remote_ip_address="10.1.1.2", remote_asn=66123, authentication_key="secret") -pulumi.export("state", bgp.state) -pulumi.export("provisioningStatus", bgp.provisioning_status) ``` ```go package main @@ -40,7 +35,7 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - bgp, err := networkedge.NewBgp(ctx, "bgp", &networkedge.BgpArgs{ + _, err := networkedge.NewBgp(ctx, "test", &networkedge.BgpArgs{ ConnectionId: pulumi.String("54014acf-9730-4b55-a791-459283d05fb1"), LocalIpAddress: pulumi.String("10.1.1.1/30"), LocalAsn: pulumi.Int(12345), @@ -51,20 +46,19 @@ func main() { if err != nil { return err } - ctx.Export("state", bgp.State) - ctx.Export("provisioningStatus", bgp.ProvisioningStatus) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var bgp = new Equinix.NetworkEdge.Bgp("bgp", new() + var test = new Equinix.NetworkEdge.Bgp("test", new() { ConnectionId = "54014acf-9730-4b55-a791-459283d05fb1", LocalIpAddress = "10.1.1.1/30", @@ -74,11 +68,6 @@ return await Deployment.RunAsync(() => AuthenticationKey = "secret", }); - return new Dictionary - { - ["state"] = bgp.State, - ["provisioningStatus"] = bgp.ProvisioningStatus, - }; }); ``` ```java @@ -87,8 +76,8 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.Bgp; -import com.equinix.pulumi.networkedge.BgpArgs; +import com.pulumi.equinix.networkedge.Bgp; +import com.pulumi.equinix.networkedge.BgpArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -102,7 +91,7 @@ public class App { } public static void stack(Context ctx) { - var bgp = new Bgp("bgp", BgpArgs.builder() + var test = new Bgp("test", BgpArgs.builder() .connectionId("54014acf-9730-4b55-a791-459283d05fb1") .localIpAddress("10.1.1.1/30") .localAsn(12345) @@ -111,14 +100,13 @@ public class App { .authenticationKey("secret") .build()); - ctx.export("state", bgp.state()); - ctx.export("provisioningStatus", bgp.provisioningStatus()); } } ``` ```yaml -resources: - bgp: + # Create BGP peering configuration on a existing connection + # between network device and service provider + test: type: equinix:networkedge:Bgp properties: connectionId: 54014acf-9730-4b55-a791-459283d05fb1 @@ -127,8 +115,5 @@ resources: remoteIpAddress: 10.1.1.2 remoteAsn: 66123 authenticationKey: secret -outputs: - state: ${bgp.state} - provisioningStatus: ${bgp.provisioningStatus} ``` {{% /example %}} diff --git a/docs/resource/equinix_network_device.examples.md b/docs/resource/equinix_network_device.examples.md index 0da7b2ba..02cf306c 100644 --- a/docs/resource/equinix_network_device.examples.md +++ b/docs/resource/equinix_network_device.examples.md @@ -1,112 +1,2027 @@ ## Example Usage + +{{% example %}} +### example 8 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; +import * as std from "@pulumi/std"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const bluecatEdgeServicePointCloudinitPrimaryFile = new equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", { + fileName: "TF-BLUECAT-ESP-cloud-init-file.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]), + deviceTypeCode: "BLUECAT-EDGE-SERVICE-POINT", + processType: equinix.networkedge.FileType.CloudInit, + selfManaged: true, + byol: true, +}); +const bluecatEdgeServicePointCloudinitSecondaryFile = new equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", { + fileName: "TF-BLUECAT-ESP-cloud-init-file.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]), + deviceTypeCode: "BLUECAT-EDGE-SERVICE-POINT", + processType: equinix.networkedge.FileType.CloudInit, + selfManaged: true, + byol: true, +}); +const bluecatEdgeServicePointHa = new equinix.networkedge.Device("bluecatEdgeServicePointHa", { + name: "tf-bluecat-edge-service-point-p", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "BLUECAT-EDGE-SERVICE-POINT", + selfManaged: true, + connectivity: "PRIVATE", + byol: true, + packageCode: "STD", + notifications: ["test@equinix.com"], + accountNumber: sv.apply(sv => sv.number), + cloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.uuid, + version: "4.6.3", + coreCount: 4, + termLength: 12, + secondaryDevice: { + name: "tf-bluecat-edge-service-point-s", + metroCode: sv.apply(sv => sv.metroCode), + notifications: ["test@eq.com"], + accountNumber: sv.apply(sv => sv.number), + cloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.uuid, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix +import pulumi_std as std + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +bluecat_edge_service_point_cloudinit_primary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", + file_name="TF-BLUECAT-ESP-cloud-init-file.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)), + device_type_code="BLUECAT-EDGE-SERVICE-POINT", + process_type=equinix.networkedge.FileType.CLOUD_INIT, + self_managed=True, + byol=True) +bluecat_edge_service_point_cloudinit_secondary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", + file_name="TF-BLUECAT-ESP-cloud-init-file.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)), + device_type_code="BLUECAT-EDGE-SERVICE-POINT", + process_type=equinix.networkedge.FileType.CLOUD_INIT, + self_managed=True, + byol=True) +bluecat_edge_service_point_ha = equinix.networkedge.Device("bluecatEdgeServicePointHa", + name="tf-bluecat-edge-service-point-p", + metro_code=sv.metro_code, + type_code="BLUECAT-EDGE-SERVICE-POINT", + self_managed=True, + connectivity="PRIVATE", + byol=True, + package_code="STD", + notifications=["test@equinix.com"], + account_number=sv.number, + cloud_init_file_id=bluecat_edge_service_point_cloudinit_primary_file.uuid, + version="4.6.3", + core_count=4, + term_length=12, + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-bluecat-edge-service-point-s", + metro_code=sv.metro_code, + notifications=["test@eq.com"], + account_number=sv.number, + cloud_init_file_id=bluecat_edge_service_point_cloudinit_secondary_file.uuid, + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi-std/sdk/go/std" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err + } + bluecatEdgeServicePointCloudinitPrimaryFile, err := networkedge.NewNetworkFile(ctx, "bluecatEdgeServicePointCloudinitPrimaryFile", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("TF-BLUECAT-ESP-cloud-init-file.txt"), + Content: invokeFile.Result, + MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), + DeviceTypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + }) + if err != nil { + return err + } + invokeFile1, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err + } + bluecatEdgeServicePointCloudinitSecondaryFile, err := networkedge.NewNetworkFile(ctx, "bluecatEdgeServicePointCloudinitSecondaryFile", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("TF-BLUECAT-ESP-cloud-init-file.txt"), + Content: invokeFile1.Result, + MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), + DeviceTypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + }) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "bluecatEdgeServicePointHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-bluecat-edge-service-point-p"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), + SelfManaged: pulumi.Bool(true), + Connectivity: pulumi.String("PRIVATE"), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("STD"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + AccountNumber: pulumi.String(sv.Number), + CloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.Uuid, + Version: pulumi.String("4.6.3"), + CoreCount: pulumi.Int(4), + TermLength: pulumi.Int(12), + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-bluecat-edge-service-point-s"), + MetroCode: pulumi.String(sv.MetroCode), + Notifications: pulumi.StringArray{ + pulumi.String("test@eq.com"), + }, + AccountNumber: pulumi.String(sv.Number), + CloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.Uuid, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var bluecatEdgeServicePointCloudinitPrimaryFile = new Equinix.NetworkEdge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", new() + { + FileName = "TF-BLUECAT-ESP-cloud-init-file.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse), + DeviceTypeCode = "BLUECAT-EDGE-SERVICE-POINT", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + SelfManaged = true, + Byol = true, + }); + + var bluecatEdgeServicePointCloudinitSecondaryFile = new Equinix.NetworkEdge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", new() + { + FileName = "TF-BLUECAT-ESP-cloud-init-file.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse), + DeviceTypeCode = "BLUECAT-EDGE-SERVICE-POINT", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + SelfManaged = true, + Byol = true, + }); + + var bluecatEdgeServicePointHa = new Equinix.NetworkEdge.Device("bluecatEdgeServicePointHa", new() + { + Name = "tf-bluecat-edge-service-point-p", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "BLUECAT-EDGE-SERVICE-POINT", + SelfManaged = true, + Connectivity = "PRIVATE", + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "test@equinix.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + CloudInitFileId = bluecatEdgeServicePointCloudinitPrimaryFile.Uuid, + Version = "4.6.3", + CoreCount = 4, + TermLength = 12, + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-bluecat-edge-service-point-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Notifications = new[] + { + "test@eq.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + CloudInitFileId = bluecatEdgeServicePointCloudinitSecondaryFile.Uuid, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.NetworkFile; +import com.pulumi.equinix.networkedge.NetworkFileArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var bluecatEdgeServicePointCloudinitPrimaryFile = new NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", NetworkFileArgs.builder() + .fileName("TF-BLUECAT-ESP-cloud-init-file.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .deviceTypeCode("BLUECAT-EDGE-SERVICE-POINT") + .processType("CLOUD_INIT") + .selfManaged(true) + .byol(true) + .build()); + + var bluecatEdgeServicePointCloudinitSecondaryFile = new NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", NetworkFileArgs.builder() + .fileName("TF-BLUECAT-ESP-cloud-init-file.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .deviceTypeCode("BLUECAT-EDGE-SERVICE-POINT") + .processType("CLOUD_INIT") + .selfManaged(true) + .byol(true) + .build()); + + var bluecatEdgeServicePointHa = new Device("bluecatEdgeServicePointHa", DeviceArgs.builder() + .name("tf-bluecat-edge-service-point-p") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("BLUECAT-EDGE-SERVICE-POINT") + .selfManaged(true) + .connectivity("PRIVATE") + .byol(true) + .packageCode("STD") + .notifications("test@equinix.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .cloudInitFileId(bluecatEdgeServicePointCloudinitPrimaryFile.uuid()) + .version("4.6.3") + .coreCount(4) + .termLength(12) + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-bluecat-edge-service-point-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .notifications("test@eq.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .cloudInitFileId(bluecatEdgeServicePointCloudinitSecondaryFile.uuid()) + .build()) + .build()); + + } +} +``` +```yaml + bluecatEdgeServicePointCloudinitPrimaryFile: + type: equinix:networkedge:NetworkFile + name: bluecat_edge_service_point_cloudinit_primary_file + properties: + fileName: TF-BLUECAT-ESP-cloud-init-file.txt + content: + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: ${sv.metroCode} + deviceTypeCode: BLUECAT-EDGE-SERVICE-POINT + processType: CLOUD_INIT + selfManaged: true + byol: true + bluecatEdgeServicePointCloudinitSecondaryFile: + type: equinix:networkedge:NetworkFile + name: bluecat_edge_service_point_cloudinit_secondary_file + properties: + fileName: TF-BLUECAT-ESP-cloud-init-file.txt + content: + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: ${sv.metroCode} + deviceTypeCode: BLUECAT-EDGE-SERVICE-POINT + processType: CLOUD_INIT + selfManaged: true + byol: true + bluecatEdgeServicePointHa: + type: equinix:networkedge:Device + name: bluecat_edge_service_point_ha + properties: + name: tf-bluecat-edge-service-point-p + metroCode: ${sv.metroCode} + typeCode: BLUECAT-EDGE-SERVICE-POINT + selfManaged: true + connectivity: PRIVATE + byol: true + packageCode: STD + notifications: + - test@equinix.com + accountNumber: ${sv.number} + cloudInitFileId: ${bluecatEdgeServicePointCloudinitPrimaryFile.uuid} + version: 4.6.3 + coreCount: 4 + termLength: 12 + secondaryDevice: + name: tf-bluecat-edge-service-point-s + metroCode: ${sv.metroCode} + notifications: + - test@eq.com + accountNumber: ${sv.number} + cloudInitFileId: ${bluecatEdgeServicePointCloudinitSecondaryFile.uuid} +variables: + # Create self configured redundant BlueCat Edge Service Point + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 1 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const dc = equinix.networkedge.getAccountOutput({ + metroCode: "DC", +}); +const sv = equinix.networkedge.getAccountOutput({ + metroCode: "SV", +}); +const csr1000VHa = new equinix.networkedge.Device("csr1000vHa", { + name: "tf-csr1000v-p", + throughput: 500, + throughputUnit: equinix.networkedge.ThroughputUnit.Mbps, + metroCode: dc.apply(dc => dc.metroCode), + typeCode: "CSR1000V", + selfManaged: false, + connectivity: "INTERNET-ACCESS", + byol: false, + packageCode: "SEC", + notifications: [ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + hostname: "csr1000v-p", + termLength: 12, + accountNumber: dc.apply(dc => dc.number), + version: "16.09.05", + coreCount: 2, + secondaryDevice: { + name: "tf-csr1000v-s", + metroCode: sv.apply(sv => sv.metroCode), + hostname: "csr1000v-s", + notifications: [ + "john@equinix.com", + "marry@equinix.com", + ], + accountNumber: sv.apply(sv => sv.number), + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +dc = equinix.networkedge.get_account_output(metro_code="DC") +sv = equinix.networkedge.get_account_output(metro_code="SV") +csr1000_v_ha = equinix.networkedge.Device("csr1000vHa", + name="tf-csr1000v-p", + throughput=500, + throughput_unit=equinix.networkedge.ThroughputUnit.MBPS, + metro_code=dc.metro_code, + type_code="CSR1000V", + self_managed=False, + connectivity="INTERNET-ACCESS", + byol=False, + package_code="SEC", + notifications=[ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + hostname="csr1000v-p", + term_length=12, + account_number=dc.number, + version="16.09.05", + core_count=2, + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-csr1000v-s", + metro_code=sv.metro_code, + hostname="csr1000v-s", + notifications=[ + "john@equinix.com", + "marry@equinix.com", + ], + account_number=sv.number, + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + dc, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "DC", + }, nil) + if err != nil { + return err + } + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "csr1000vHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-csr1000v-p"), + Throughput: pulumi.Int(500), + ThroughputUnit: pulumi.String(networkedge.ThroughputUnitMbps), + MetroCode: pulumi.String(dc.MetroCode), + TypeCode: pulumi.String("CSR1000V"), + SelfManaged: pulumi.Bool(false), + Connectivity: pulumi.String("INTERNET-ACCESS"), + Byol: pulumi.Bool(false), + PackageCode: pulumi.String("SEC"), + Notifications: pulumi.StringArray{ + pulumi.String("john@equinix.com"), + pulumi.String("marry@equinix.com"), + pulumi.String("fred@equinix.com"), + }, + Hostname: pulumi.String("csr1000v-p"), + TermLength: pulumi.Int(12), + AccountNumber: pulumi.String(dc.Number), + Version: pulumi.String("16.09.05"), + CoreCount: pulumi.Int(2), + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-csr1000v-s"), + MetroCode: pulumi.String(sv.MetroCode), + Hostname: pulumi.String("csr1000v-s"), + Notifications: pulumi.StringArray{ + pulumi.String("john@equinix.com"), + pulumi.String("marry@equinix.com"), + }, + AccountNumber: pulumi.String(sv.Number), + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var dc = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "DC", + }); + + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "SV", + }); + + var csr1000VHa = new Equinix.NetworkEdge.Device("csr1000vHa", new() + { + Name = "tf-csr1000v-p", + Throughput = 500, + ThroughputUnit = Equinix.NetworkEdge.ThroughputUnit.Mbps, + MetroCode = dc.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "CSR1000V", + SelfManaged = false, + Connectivity = "INTERNET-ACCESS", + Byol = false, + PackageCode = "SEC", + Notifications = new[] + { + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + }, + Hostname = "csr1000v-p", + TermLength = 12, + AccountNumber = dc.Apply(getAccountResult => getAccountResult.Number), + Version = "16.09.05", + CoreCount = 2, + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-csr1000v-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Hostname = "csr1000v-s", + Notifications = new[] + { + "john@equinix.com", + "marry@equinix.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var dc = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("DC") + .build()); + + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("SV") + .build()); + + var csr1000VHa = new Device("csr1000VHa", DeviceArgs.builder() + .name("tf-csr1000v-p") + .throughput(500) + .throughputUnit("Mbps") + .metroCode(dc.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("CSR1000V") + .selfManaged(false) + .connectivity("INTERNET-ACCESS") + .byol(false) + .packageCode("SEC") + .notifications( + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com") + .hostname("csr1000v-p") + .termLength(12) + .accountNumber(dc.applyValue(getAccountResult -> getAccountResult.number())) + .version("16.09.05") + .coreCount(2) + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-csr1000v-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .hostname("csr1000v-s") + .notifications( + "john@equinix.com", + "marry@equinix.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .build()) + .build()); + + } +} +``` +```yaml + csr1000vHa: + type: equinix:networkedge:Device + name: csr1000v_ha + properties: + name: tf-csr1000v-p + throughput: 500 + throughputUnit: Mbps + metroCode: ${dc.metroCode} + typeCode: CSR1000V + selfManaged: false + connectivity: INTERNET-ACCESS + byol: false + packageCode: SEC + notifications: + - john@equinix.com + - marry@equinix.com + - fred@equinix.com + hostname: csr1000v-p + termLength: 12 + accountNumber: ${dc.number} + version: 16.09.05 + coreCount: 2 + secondaryDevice: + name: tf-csr1000v-s + metroCode: ${sv.metroCode} + hostname: csr1000v-s + notifications: + - john@equinix.com + - marry@equinix.com + accountNumber: ${sv.number} +variables: + # Create pair of redundant, managed CSR1000V routers with license subscription + # in two different metro locations + dc: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: DC + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 4 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const c8KvSingle = new equinix.networkedge.Device("c8kvSingle", { + name: "tf-c8kv", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "C8000V", + selfManaged: true, + byol: true, + packageCode: "network-essentials", + notifications: ["test@equinix.com"], + hostname: "C8KV", + accountNumber: sv.apply(sv => sv.number), + version: "17.06.01a", + coreCount: 2, + termLength: 12, + licenseToken: "valid-license-token", + additionalBandwidth: 5, + sshKey: { + username: "test-username", + keyName: "valid-key-name", + }, + aclTemplateId: "3e548c02-9164-4197-aa23-05b1f644883c", +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +c8_kv_single = equinix.networkedge.Device("c8kvSingle", + name="tf-c8kv", + metro_code=sv.metro_code, + type_code="C8000V", + self_managed=True, + byol=True, + package_code="network-essentials", + notifications=["test@equinix.com"], + hostname="C8KV", + account_number=sv.number, + version="17.06.01a", + core_count=2, + term_length=12, + license_token="valid-license-token", + additional_bandwidth=5, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name="valid-key-name", + ), + acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c") +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "c8kvSingle", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-c8kv"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("C8000V"), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("network-essentials"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + Hostname: pulumi.String("C8KV"), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("17.06.01a"), + CoreCount: pulumi.Int(2), + TermLength: pulumi.Int(12), + LicenseToken: pulumi.String("valid-license-token"), + AdditionalBandwidth: pulumi.Int(5), + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test-username"), + KeyName: pulumi.String("valid-key-name"), + }, + AclTemplateId: pulumi.String("3e548c02-9164-4197-aa23-05b1f644883c"), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var c8KvSingle = new Equinix.NetworkEdge.Device("c8kvSingle", new() + { + Name = "tf-c8kv", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "C8000V", + SelfManaged = true, + Byol = true, + PackageCode = "network-essentials", + Notifications = new[] + { + "test@equinix.com", + }, + Hostname = "C8KV", + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "17.06.01a", + CoreCount = 2, + TermLength = 12, + LicenseToken = "valid-license-token", + AdditionalBandwidth = 5, + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test-username", + KeyName = "valid-key-name", + }, + AclTemplateId = "3e548c02-9164-4197-aa23-05b1f644883c", + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var c8KvSingle = new Device("c8KvSingle", DeviceArgs.builder() + .name("tf-c8kv") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("C8000V") + .selfManaged(true) + .byol(true) + .packageCode("network-essentials") + .notifications("test@equinix.com") + .hostname("C8KV") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("17.06.01a") + .coreCount(2) + .termLength(12) + .licenseToken("valid-license-token") + .additionalBandwidth(5) + .sshKey(DeviceSshKeyArgs.builder() + .username("test-username") + .keyName("valid-key-name") + .build()) + .aclTemplateId("3e548c02-9164-4197-aa23-05b1f644883c") + .build()); + + } +} +``` +```yaml + c8kvSingle: + type: equinix:networkedge:Device + name: c8kv_single + properties: + name: tf-c8kv + metroCode: ${sv.metroCode} + typeCode: C8000V + selfManaged: true + byol: true + packageCode: network-essentials + notifications: + - test@equinix.com + hostname: C8KV + accountNumber: ${sv.number} + version: 17.06.01a + coreCount: 2 + termLength: 12 + licenseToken: valid-license-token + additionalBandwidth: 5 + sshKey: + username: test-username + keyName: valid-key-name + aclTemplateId: 3e548c02-9164-4197-aa23-05b1f644883c +variables: + # Create self configured single Catalyst 8000V (Autonomous Mode) router with license token + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 7 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const testPublicKey = new equinix.networkedge.SshKey("testPublicKey", { + name: "key-name", + publicKey: "ssh-dss key-value", + type: "DSA", +}); +const bluecatBddsHa = new equinix.networkedge.Device("bluecatBddsHa", { + name: "tf-bluecat-bdds-p", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "BLUECAT", + selfManaged: true, + connectivity: "PRIVATE", + byol: true, + packageCode: "STD", + notifications: ["test@equinix.com"], + accountNumber: sv.apply(sv => sv.number), + version: "9.6.0", + coreCount: 2, + termLength: 12, + vendorConfiguration: { + hostname: "test", + privateAddress: "x.x.x.x", + privateCidrMask: "24", + privateGateway: "x.x.x.x", + licenseKey: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + licenseId: "xxxxxxxxxxxxxxx", + }, + sshKey: { + username: "test-username", + keyName: testPublicKey.name, + }, + secondaryDevice: { + name: "tf-bluecat-bdds-s", + metroCode: sv.apply(sv => sv.metroCode), + notifications: ["test@eq.com"], + accountNumber: sv.apply(sv => sv.number), + vendorConfiguration: { + hostname: "test", + privateAddress: "x.x.x.x", + privateCidrMask: "24", + privateGateway: "x.x.x.x", + licenseKey: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + licenseId: "xxxxxxxxxxxxxxx", + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +test_public_key = equinix.networkedge.SshKey("testPublicKey", + name="key-name", + public_key="ssh-dss key-value", + type="DSA") +bluecat_bdds_ha = equinix.networkedge.Device("bluecatBddsHa", + name="tf-bluecat-bdds-p", + metro_code=sv.metro_code, + type_code="BLUECAT", + self_managed=True, + connectivity="PRIVATE", + byol=True, + package_code="STD", + notifications=["test@equinix.com"], + account_number=sv.number, + version="9.6.0", + core_count=2, + term_length=12, + vendor_configuration={ + "hostname": "test", + "privateAddress": "x.x.x.x", + "privateCidrMask": "24", + "privateGateway": "x.x.x.x", + "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + "licenseId": "xxxxxxxxxxxxxxx", + }, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name=test_public_key.name, + ), + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-bluecat-bdds-s", + metro_code=sv.metro_code, + notifications=["test@eq.com"], + account_number=sv.number, + vendor_configuration={ + "hostname": "test", + "privateAddress": "x.x.x.x", + "privateCidrMask": "24", + "privateGateway": "x.x.x.x", + "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + "licenseId": "xxxxxxxxxxxxxxx", + }, + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + testPublicKey, err := networkedge.NewSshKey(ctx, "testPublicKey", &networkedge.SshKeyArgs{ + Name: pulumi.String("key-name"), + PublicKey: pulumi.String("ssh-dss key-value"), + Type: pulumi.String("DSA"), + }) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "bluecatBddsHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-bluecat-bdds-p"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("BLUECAT"), + SelfManaged: pulumi.Bool(true), + Connectivity: pulumi.String("PRIVATE"), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("STD"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("9.6.0"), + CoreCount: pulumi.Int(2), + TermLength: pulumi.Int(12), + VendorConfiguration: pulumi.StringMap{ + "hostname": pulumi.String("test"), + "privateAddress": pulumi.String("x.x.x.x"), + "privateCidrMask": pulumi.String("24"), + "privateGateway": pulumi.String("x.x.x.x"), + "licenseKey": pulumi.String("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + "licenseId": pulumi.String("xxxxxxxxxxxxxxx"), + }, + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test-username"), + KeyName: testPublicKey.Name, + }, + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-bluecat-bdds-s"), + MetroCode: pulumi.String(sv.MetroCode), + Notifications: pulumi.StringArray{ + pulumi.String("test@eq.com"), + }, + AccountNumber: pulumi.String(sv.Number), + VendorConfiguration: pulumi.StringMap{ + "hostname": pulumi.String("test"), + "privateAddress": pulumi.String("x.x.x.x"), + "privateCidrMask": pulumi.String("24"), + "privateGateway": pulumi.String("x.x.x.x"), + "licenseKey": pulumi.String("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + "licenseId": pulumi.String("xxxxxxxxxxxxxxx"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var testPublicKey = new Equinix.NetworkEdge.SshKey("testPublicKey", new() + { + Name = "key-name", + PublicKey = "ssh-dss key-value", + Type = "DSA", + }); + + var bluecatBddsHa = new Equinix.NetworkEdge.Device("bluecatBddsHa", new() + { + Name = "tf-bluecat-bdds-p", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "BLUECAT", + SelfManaged = true, + Connectivity = "PRIVATE", + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "test@equinix.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "9.6.0", + CoreCount = 2, + TermLength = 12, + VendorConfiguration = + { + { "hostname", "test" }, + { "privateAddress", "x.x.x.x" }, + { "privateCidrMask", "24" }, + { "privateGateway", "x.x.x.x" }, + { "licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" }, + { "licenseId", "xxxxxxxxxxxxxxx" }, + }, + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test-username", + KeyName = testPublicKey.Name, + }, + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-bluecat-bdds-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Notifications = new[] + { + "test@eq.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + VendorConfiguration = + { + { "hostname", "test" }, + { "privateAddress", "x.x.x.x" }, + { "privateCidrMask", "24" }, + { "privateGateway", "x.x.x.x" }, + { "licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" }, + { "licenseId", "xxxxxxxxxxxxxxx" }, + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.SshKey; +import com.pulumi.equinix.networkedge.SshKeyArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var testPublicKey = new SshKey("testPublicKey", SshKeyArgs.builder() + .name("key-name") + .publicKey("ssh-dss key-value") + .type("DSA") + .build()); + + var bluecatBddsHa = new Device("bluecatBddsHa", DeviceArgs.builder() + .name("tf-bluecat-bdds-p") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("BLUECAT") + .selfManaged(true) + .connectivity("PRIVATE") + .byol(true) + .packageCode("STD") + .notifications("test@equinix.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("9.6.0") + .coreCount(2) + .termLength(12) + .vendorConfiguration(Map.ofEntries( + Map.entry("hostname", "test"), + Map.entry("privateAddress", "x.x.x.x"), + Map.entry("privateCidrMask", "24"), + Map.entry("privateGateway", "x.x.x.x"), + Map.entry("licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + Map.entry("licenseId", "xxxxxxxxxxxxxxx") + )) + .sshKey(DeviceSshKeyArgs.builder() + .username("test-username") + .keyName(testPublicKey.name()) + .build()) + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-bluecat-bdds-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .notifications("test@eq.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .vendorConfiguration(Map.ofEntries( + Map.entry("hostname", "test"), + Map.entry("privateAddress", "x.x.x.x"), + Map.entry("privateCidrMask", "24"), + Map.entry("privateGateway", "x.x.x.x"), + Map.entry("licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + Map.entry("licenseId", "xxxxxxxxxxxxxxx") + )) + .build()) + .build()); + + } +} +``` +```yaml + testPublicKey: + type: equinix:networkedge:SshKey + name: test_public_key + properties: + name: key-name + publicKey: ssh-dss key-value + type: DSA + bluecatBddsHa: + type: equinix:networkedge:Device + name: bluecat_bdds_ha + properties: + name: tf-bluecat-bdds-p + metroCode: ${sv.metroCode} + typeCode: BLUECAT + selfManaged: true + connectivity: PRIVATE + byol: true + packageCode: STD + notifications: + - test@equinix.com + accountNumber: ${sv.number} + version: 9.6.0 + coreCount: 2 + termLength: 12 + vendorConfiguration: + hostname: test + privateAddress: x.x.x.x + privateCidrMask: '24' + privateGateway: x.x.x.x + licenseKey: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx + licenseId: xxxxxxxxxxxxxxx + sshKey: + username: test-username + keyName: ${testPublicKey.name} + secondaryDevice: + name: tf-bluecat-bdds-s + metroCode: ${sv.metroCode} + notifications: + - test@eq.com + accountNumber: ${sv.number} + vendorConfiguration: + hostname: test + privateAddress: x.x.x.x + privateCidrMask: '24' + privateGateway: x.x.x.x + licenseKey: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx + licenseId: xxxxxxxxxxxxxxx +variables: + # Create self configured redundant BlueCat DNS and DHCP Server + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 2 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + metroCode: "SV", +}); +const panwCluster = new equinix.networkedge.Device("panwCluster", { + name: "tf-panw", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "PA-VM", + selfManaged: true, + byol: true, + packageCode: "VM100", + notifications: [ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + termLength: 12, + accountNumber: sv.apply(sv => sv.number), + version: "10.1.3", + interfaceCount: 10, + coreCount: 2, + sshKey: { + username: "test", + keyName: "test-key", + }, + aclTemplateId: "0bff6e05-f0e7-44cd-804a-25b92b835f8b", + clusterDetails: { + clusterName: "tf-panw-cluster", + node0: { + vendorConfiguration: { + hostname: "panw-node0", + }, + licenseToken: "licenseToken", + }, + node1: { + vendorConfiguration: { + hostname: "panw-node1", + }, + licenseToken: "licenseToken", + }, + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(metro_code="SV") +panw_cluster = equinix.networkedge.Device("panwCluster", + name="tf-panw", + metro_code=sv.metro_code, + type_code="PA-VM", + self_managed=True, + byol=True, + package_code="VM100", + notifications=[ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + term_length=12, + account_number=sv.number, + version="10.1.3", + interface_count=10, + core_count=2, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test", + key_name="test-key", + ), + acl_template_id="0bff6e05-f0e7-44cd-804a-25b92b835f8b", + cluster_details=equinix.networkedge.DeviceClusterDetailsArgs( + cluster_name="tf-panw-cluster", + node0=equinix.networkedge.DeviceClusterDetailsNode0Args( + vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs( + hostname="panw-node0", + ), + license_token="licenseToken", + ), + node1=equinix.networkedge.DeviceClusterDetailsNode1Args( + vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs( + hostname="panw-node1", + ), + license_token="licenseToken", + ), + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "panwCluster", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-panw"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("PA-VM"), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("VM100"), + Notifications: pulumi.StringArray{ + pulumi.String("john@equinix.com"), + pulumi.String("marry@equinix.com"), + pulumi.String("fred@equinix.com"), + }, + TermLength: pulumi.Int(12), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("10.1.3"), + InterfaceCount: pulumi.Int(10), + CoreCount: pulumi.Int(2), + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test"), + KeyName: pulumi.String("test-key"), + }, + AclTemplateId: pulumi.String("0bff6e05-f0e7-44cd-804a-25b92b835f8b"), + ClusterDetails: &networkedge.DeviceClusterDetailsArgs{ + ClusterName: pulumi.String("tf-panw-cluster"), + Node0: &networkedge.DeviceClusterDetailsNode0Args{ + VendorConfiguration: &networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs{ + Hostname: pulumi.String("panw-node0"), + }, + LicenseToken: pulumi.String("licenseToken"), + }, + Node1: &networkedge.DeviceClusterDetailsNode1Args{ + VendorConfiguration: &networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs{ + Hostname: pulumi.String("panw-node1"), + }, + LicenseToken: pulumi.String("licenseToken"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "SV", + }); + + var panwCluster = new Equinix.NetworkEdge.Device("panwCluster", new() + { + Name = "tf-panw", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "PA-VM", + SelfManaged = true, + Byol = true, + PackageCode = "VM100", + Notifications = new[] + { + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + }, + TermLength = 12, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "10.1.3", + InterfaceCount = 10, + CoreCount = 2, + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test", + KeyName = "test-key", + }, + AclTemplateId = "0bff6e05-f0e7-44cd-804a-25b92b835f8b", + ClusterDetails = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsArgs + { + ClusterName = "tf-panw-cluster", + Node0 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0Args + { + VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0VendorConfigurationArgs + { + Hostname = "panw-node0", + }, + LicenseToken = "licenseToken", + }, + Node1 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1Args + { + VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1VendorConfigurationArgs + { + Hostname = "panw-node1", + }, + LicenseToken = "licenseToken", + }, + }, + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0Args; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0VendorConfigurationArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1Args; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1VendorConfigurationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("SV") + .build()); + + var panwCluster = new Device("panwCluster", DeviceArgs.builder() + .name("tf-panw") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("PA-VM") + .selfManaged(true) + .byol(true) + .packageCode("VM100") + .notifications( + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com") + .termLength(12) + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("10.1.3") + .interfaceCount(10) + .coreCount(2) + .sshKey(DeviceSshKeyArgs.builder() + .username("test") + .keyName("test-key") + .build()) + .aclTemplateId("0bff6e05-f0e7-44cd-804a-25b92b835f8b") + .clusterDetails(DeviceClusterDetailsArgs.builder() + .clusterName("tf-panw-cluster") + .node0(DeviceClusterDetailsNode0Args.builder() + .vendorConfiguration(DeviceClusterDetailsNode0VendorConfigurationArgs.builder() + .hostname("panw-node0") + .build()) + .licenseToken("licenseToken") + .build()) + .node1(DeviceClusterDetailsNode1Args.builder() + .vendorConfiguration(DeviceClusterDetailsNode1VendorConfigurationArgs.builder() + .hostname("panw-node1") + .build()) + .licenseToken("licenseToken") + .build()) + .build()) + .build()); + + } +} +``` +```yaml + panwCluster: + type: equinix:networkedge:Device + name: panw_cluster + properties: + name: tf-panw + metroCode: ${sv.metroCode} + typeCode: PA-VM + selfManaged: true + byol: true + packageCode: VM100 + notifications: + - john@equinix.com + - marry@equinix.com + - fred@equinix.com + termLength: 12 + accountNumber: ${sv.number} + version: 10.1.3 + interfaceCount: 10 + coreCount: 2 + sshKey: + username: test + keyName: test-key + aclTemplateId: 0bff6e05-f0e7-44cd-804a-25b92b835f8b + clusterDetails: + clusterName: tf-panw-cluster + node0: + vendorConfiguration: + hostname: panw-node0 + licenseToken: licenseToken + node1: + vendorConfiguration: + hostname: panw-node1 + licenseToken: licenseToken +variables: + # Create self configured PANW cluster with BYOL license + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: SV +``` +{{% /example %}} + {{% example %}} +### example 5 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const vsrxSingle = new equinix.networkedge.Device("vsrxSingle", { + name: "tf-c8kv-sdwan", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "VSRX", + selfManaged: true, + byol: true, + packageCode: "STD", + notifications: ["test@equinix.com"], + hostname: "VSRX", + accountNumber: sv.apply(sv => sv.number), + version: "23.2R1.13", + coreCount: 2, + termLength: 12, + additionalBandwidth: 5, + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", + diverseDeviceId: "ed7891bd-15b4-4f72-ac56-d96cfdacddcc", + sshKey: { + username: "test-username", + keyName: "valid-key-name", + }, + aclTemplateId: "3e548c02-9164-4197-aa23-05b1f644883c", +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +vsrx_single = equinix.networkedge.Device("vsrxSingle", + name="tf-c8kv-sdwan", + metro_code=sv.metro_code, + type_code="VSRX", + self_managed=True, + byol=True, + package_code="STD", + notifications=["test@equinix.com"], + hostname="VSRX", + account_number=sv.number, + version="23.2R1.13", + core_count=2, + term_length=12, + additional_bandwidth=5, + project_id="a86d7112-d740-4758-9c9c-31e66373746b", + diverse_device_id="ed7891bd-15b4-4f72-ac56-d96cfdacddcc", + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name="valid-key-name", + ), + acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c") +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "vsrxSingle", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-c8kv-sdwan"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("VSRX"), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("STD"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + Hostname: pulumi.String("VSRX"), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("23.2R1.13"), + CoreCount: pulumi.Int(2), + TermLength: pulumi.Int(12), + AdditionalBandwidth: pulumi.Int(5), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), + DiverseDeviceId: pulumi.String("ed7891bd-15b4-4f72-ac56-d96cfdacddcc"), + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test-username"), + KeyName: pulumi.String("valid-key-name"), + }, + AclTemplateId: pulumi.String("3e548c02-9164-4197-aa23-05b1f644883c"), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var vsrxSingle = new Equinix.NetworkEdge.Device("vsrxSingle", new() + { + Name = "tf-c8kv-sdwan", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "VSRX", + SelfManaged = true, + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "test@equinix.com", + }, + Hostname = "VSRX", + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "23.2R1.13", + CoreCount = 2, + TermLength = 12, + AdditionalBandwidth = 5, + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", + DiverseDeviceId = "ed7891bd-15b4-4f72-ac56-d96cfdacddcc", + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test-username", + KeyName = "valid-key-name", + }, + AclTemplateId = "3e548c02-9164-4197-aa23-05b1f644883c", + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var vsrxSingle = new Device("vsrxSingle", DeviceArgs.builder() + .name("tf-c8kv-sdwan") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("VSRX") + .selfManaged(true) + .byol(true) + .packageCode("STD") + .notifications("test@equinix.com") + .hostname("VSRX") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("23.2R1.13") + .coreCount(2) + .termLength(12) + .additionalBandwidth(5) + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") + .diverseDeviceId("ed7891bd-15b4-4f72-ac56-d96cfdacddcc") + .sshKey(DeviceSshKeyArgs.builder() + .username("test-username") + .keyName("valid-key-name") + .build()) + .aclTemplateId("3e548c02-9164-4197-aa23-05b1f644883c") + .build()); + + } +} +``` +```yaml + vsrxSingle: + type: equinix:networkedge:Device + name: vsrx_single + properties: + name: tf-c8kv-sdwan + metroCode: ${sv.metroCode} + typeCode: VSRX + selfManaged: true + byol: true + packageCode: STD + notifications: + - test@equinix.com + hostname: VSRX + accountNumber: ${sv.number} + version: 23.2R1.13 + coreCount: 2 + termLength: 12 + additionalBandwidth: 5 + projectId: a86d7112-d740-4758-9c9c-31e66373746b + diverseDeviceId: ed7891bd-15b4-4f72-ac56-d96cfdacddcc + sshKey: + username: test-username + keyName: valid-key-name + aclTemplateId: 3e548c02-9164-4197-aa23-05b1f644883c +variables: + # Create self configured single VSRX device with BYOL License + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV +``` +{{% /example %}} +{{% example %}} +### example 3 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; +import * as std from "@pulumi/std"; const config = new pulumi.Config(); -const accountName = config.require("accountName"); -const licenseToken = config.require("licenseToken"); -const sshUserName = config.require("sshUserName"); -const sshKeyName = config.require("sshKeyName"); -const aclTemplateId = config.require("aclTemplateId"); -const metro = config.get("metro") || "SV"; -const devicePackageCode = config.get("devicePackageCode") || "network-essentials"; -const deviceVersion = config.get("deviceVersion") || "17.06.01a"; -const sizeInCores = config.getNumber("sizeInCores") || 2; -const termLength = config.getNumber("termLength") || 6; -const additionalBandwidth = config.getNumber("additionalBandwidth") || 5; -const accountNum = equinix.networkedge.getAccount({ - name: accountName, - metroCode: metro, -}).then(invoke => invoke.number); -const c8KRouter = new equinix.networkedge.Device("c8kRouter", { - name: "catalystRouter", - metroCode: metro, - typeCode: "C8000V", +const filepath = config.get("filepath") || "cloudInitFileFolder/TF-AVX-cloud-init-file.txt"; +const sv = equinix.networkedge.getAccountOutput({ + metroCode: "SV", +}); +const aviatrixCloudinitFile = new equinix.networkedge.NetworkFile("aviatrixCloudinitFile", { + fileName: "TF-AVX-cloud-init-file.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]), + deviceTypeCode: "AVIATRIX_EDGE", + processType: equinix.networkedge.FileType.CloudInit, selfManaged: true, byol: true, - packageCode: devicePackageCode, - notifications: ["example@equinix.com"], - hostname: "C8KV", - accountNumber: accountNum, - version: deviceVersion, - coreCount: sizeInCores, - termLength: termLength, - licenseToken: licenseToken, - additionalBandwidth: additionalBandwidth, - sshKey: { - username: sshUserName, - keyName: sshKeyName, - }, - aclTemplateId: aclTemplateId, }); -export const routerId = c8KRouter.id; -export const provisionStatus = c8KRouter.status; -export const licenseStatus = c8KRouter.licenseStatus; -export const sshIpAddress = c8KRouter.sshIpAddress; +const aviatrixSingle = new equinix.networkedge.Device("aviatrixSingle", { + name: "tf-aviatrix", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "AVIATRIX_EDGE", + selfManaged: true, + byol: true, + packageCode: "STD", + notifications: ["john@equinix.com"], + termLength: 12, + accountNumber: sv.apply(sv => sv.number), + version: "6.9", + coreCount: 2, + cloudInitFileId: aviatrixCloudinitFile.uuid, + aclTemplateId: "c06150ea-b604-4ad1-832a-d63936e9b938", +}); ``` ```python import pulumi import pulumi_equinix as equinix +import pulumi_std as std config = pulumi.Config() -account_name = config.require("accountName") -license_token = config.require("licenseToken") -ssh_user_name = config.require("sshUserName") -ssh_key_name = config.require("sshKeyName") -acl_template_id = config.require("aclTemplateId") -metro = config.get("metro") -if metro is None: - metro = "SV" -device_package_code = config.get("devicePackageCode") -if device_package_code is None: - device_package_code = "network-essentials" -device_version = config.get("deviceVersion") -if device_version is None: - device_version = "17.06.01a" -size_in_cores = config.get_int("sizeInCores") -if size_in_cores is None: - size_in_cores = 2 -term_length = config.get_int("termLength") -if term_length is None: - term_length = 6 -additional_bandwidth = config.get_int("additionalBandwidth") -if additional_bandwidth is None: - additional_bandwidth = 5 -account_num = equinix.networkedge.get_account(name=account_name, - metro_code=metro).number -c8_k_router = equinix.networkedge.Device("c8kRouter", - name="catalystRouter", - metro_code=metro, - type_code="C8000V", +filepath = config.get("filepath") +if filepath is None: + filepath = "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" +sv = equinix.networkedge.get_account_output(metro_code="SV") +aviatrix_cloudinit_file = equinix.networkedge.NetworkFile("aviatrixCloudinitFile", + file_name="TF-AVX-cloud-init-file.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)), + device_type_code="AVIATRIX_EDGE", + process_type=equinix.networkedge.FileType.CLOUD_INIT, + self_managed=True, + byol=True) +aviatrix_single = equinix.networkedge.Device("aviatrixSingle", + name="tf-aviatrix", + metro_code=sv.metro_code, + type_code="AVIATRIX_EDGE", self_managed=True, byol=True, - package_code=device_package_code, - notifications=["example@equinix.com"], - hostname="C8KV", - account_number=account_num, - version=device_version, - core_count=size_in_cores, - term_length=term_length, - license_token=license_token, - additional_bandwidth=additional_bandwidth, - ssh_key=equinix.networkedge.DeviceSshKeyArgs( - username=ssh_user_name, - key_name=ssh_key_name, - ), - acl_template_id=acl_template_id) -pulumi.export("routerId", c8_k_router.id) -pulumi.export("provisionStatus", c8_k_router.status) -pulumi.export("licenseStatus", c8_k_router.license_status) -pulumi.export("sshIpAddress", c8_k_router.ssh_ip_address) + package_code="STD", + notifications=["john@equinix.com"], + term_length=12, + account_number=sv.number, + version="6.9", + core_count=2, + cloud_init_file_id=aviatrix_cloudinit_file.uuid, + acl_template_id="c06150ea-b604-4ad1-832a-d63936e9b938") ``` ```go package main import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi-std/sdk/go/std" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) @@ -114,132 +2029,431 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { cfg := config.New(ctx, "") - accountName := cfg.Require("accountName") - licenseToken := cfg.Require("licenseToken") - sshUserName := cfg.Require("sshUserName") - sshKeyName := cfg.Require("sshKeyName") - aclTemplateId := cfg.Require("aclTemplateId") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param - } - devicePackageCode := "network-essentials" - if param := cfg.Get("devicePackageCode"); param != "" { - devicePackageCode = param - } - deviceVersion := "17.06.01a" - if param := cfg.Get("deviceVersion"); param != "" { - deviceVersion = param + filepath := "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" + if param := cfg.Get("filepath"); param != "" { + filepath = param } - sizeInCores := 2 - if param := cfg.GetInt("sizeInCores"); param != 0 { - sizeInCores = param + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "SV", + }, nil) + if err != nil { + return err } - termLength := 6 - if param := cfg.GetInt("termLength"); param != 0 { - termLength = param + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err } - additionalBandwidth := 5 - if param := cfg.GetInt("additionalBandwidth"); param != 0 { - additionalBandwidth = param + aviatrixCloudinitFile, err := networkedge.NewNetworkFile(ctx, "aviatrixCloudinitFile", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("TF-AVX-cloud-init-file.txt"), + Content: invokeFile.Result, + MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), + DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + }) + if err != nil { + return err } - accountNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ - Name: pulumi.StringRef(accountName), - MetroCode: metro, - }, nil).Number - c8KRouter, err := networkedge.NewDevice(ctx, "c8kRouter", &networkedge.DeviceArgs{ - Name: pulumi.String("catalystRouter"), - MetroCode: pulumi.String(metro), - TypeCode: pulumi.String("C8000V"), + _, err = networkedge.NewDevice(ctx, "aviatrixSingle", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-aviatrix"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("AVIATRIX_EDGE"), SelfManaged: pulumi.Bool(true), Byol: pulumi.Bool(true), - PackageCode: pulumi.String(devicePackageCode), + PackageCode: pulumi.String("STD"), Notifications: pulumi.StringArray{ - pulumi.String("example@equinix.com"), + pulumi.String("john@equinix.com"), }, - Hostname: pulumi.String("C8KV"), - AccountNumber: *pulumi.String(accountNum), - Version: pulumi.Any(deviceVersion), - CoreCount: pulumi.Int(sizeInCores), - TermLength: pulumi.Int(termLength), - LicenseToken: pulumi.String(licenseToken), - AdditionalBandwidth: pulumi.Int(additionalBandwidth), + TermLength: pulumi.Int(12), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("6.9"), + CoreCount: pulumi.Int(2), + CloudInitFileId: aviatrixCloudinitFile.Uuid, + AclTemplateId: pulumi.String("c06150ea-b604-4ad1-832a-d63936e9b938"), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; + +return await Deployment.RunAsync(() => +{ + var config = new Config(); + var filepath = config.Get("filepath") ?? "cloudInitFileFolder/TF-AVX-cloud-init-file.txt"; + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "SV", + }); + + var aviatrixCloudinitFile = new Equinix.NetworkEdge.NetworkFile("aviatrixCloudinitFile", new() + { + FileName = "TF-AVX-cloud-init-file.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse), + DeviceTypeCode = "AVIATRIX_EDGE", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + SelfManaged = true, + Byol = true, + }); + + var aviatrixSingle = new Equinix.NetworkEdge.Device("aviatrixSingle", new() + { + Name = "tf-aviatrix", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "AVIATRIX_EDGE", + SelfManaged = true, + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "john@equinix.com", + }, + TermLength = 12, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "6.9", + CoreCount = 2, + CloudInitFileId = aviatrixCloudinitFile.Uuid, + AclTemplateId = "c06150ea-b604-4ad1-832a-d63936e9b938", + }); + +}); +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.NetworkFile; +import com.pulumi.equinix.networkedge.NetworkFileArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var config = ctx.config(); + final var filepath = config.get("filepath").orElse("cloudInitFileFolder/TF-AVX-cloud-init-file.txt"); + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("SV") + .build()); + + var aviatrixCloudinitFile = new NetworkFile("aviatrixCloudinitFile", NetworkFileArgs.builder() + .fileName("TF-AVX-cloud-init-file.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .deviceTypeCode("AVIATRIX_EDGE") + .processType("CLOUD_INIT") + .selfManaged(true) + .byol(true) + .build()); + + var aviatrixSingle = new Device("aviatrixSingle", DeviceArgs.builder() + .name("tf-aviatrix") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("AVIATRIX_EDGE") + .selfManaged(true) + .byol(true) + .packageCode("STD") + .notifications("john@equinix.com") + .termLength(12) + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("6.9") + .coreCount(2) + .cloudInitFileId(aviatrixCloudinitFile.uuid()) + .aclTemplateId("c06150ea-b604-4ad1-832a-d63936e9b938") + .build()); + + } +} +``` +```yaml + filepath: + type: string + default: cloudInitFileFolder/TF-AVX-cloud-init-file.txt +resources: + aviatrixCloudinitFile: + type: equinix:networkedge:NetworkFile + name: aviatrix_cloudinit_file + properties: + fileName: TF-AVX-cloud-init-file.txt + content: + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: ${sv.metroCode} + deviceTypeCode: AVIATRIX_EDGE + processType: CLOUD_INIT + selfManaged: true + byol: true + aviatrixSingle: + type: equinix:networkedge:Device + name: aviatrix_single + properties: + name: tf-aviatrix + metroCode: ${sv.metroCode} + typeCode: AVIATRIX_EDGE + selfManaged: true + byol: true + packageCode: STD + notifications: + - john@equinix.com + termLength: 12 + accountNumber: ${sv.number} + version: '6.9' + coreCount: 2 + cloudInitFileId: ${aviatrixCloudinitFile.uuid} + aclTemplateId: c06150ea-b604-4ad1-832a-d63936e9b938 +variables: + # Create self configured single Aviatrix device with cloud init file + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: SV +``` +{{% /example %}} + +{{% example %}} +### example 6 +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const testPublicKey = new equinix.networkedge.SshKey("testPublicKey", { + name: "key-name", + publicKey: "ssh-dss key-value", + type: "DSA", +}); +const aristaHa = new equinix.networkedge.Device("aristaHa", { + name: "tf-arista-p", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "ARISTA-ROUTER", + selfManaged: true, + connectivity: "PRIVATE", + byol: true, + packageCode: "CloudEOS", + notifications: ["test@equinix.com"], + hostname: "arista-p", + accountNumber: sv.apply(sv => sv.number), + version: "4.29.0", + coreCount: 4, + termLength: 12, + additionalBandwidth: 5, + sshKey: { + username: "test-username", + keyName: testPublicKey.name, + }, + aclTemplateId: "c637a17b-7a6a-4486-924b-30e6c36904b0", + secondaryDevice: { + name: "tf-arista-s", + metroCode: sv.apply(sv => sv.metroCode), + hostname: "arista-s", + notifications: ["test@eq.com"], + accountNumber: sv.apply(sv => sv.number), + aclTemplateId: "fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138", + }, +}); +``` +```python +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +test_public_key = equinix.networkedge.SshKey("testPublicKey", + name="key-name", + public_key="ssh-dss key-value", + type="DSA") +arista_ha = equinix.networkedge.Device("aristaHa", + name="tf-arista-p", + metro_code=sv.metro_code, + type_code="ARISTA-ROUTER", + self_managed=True, + connectivity="PRIVATE", + byol=True, + package_code="CloudEOS", + notifications=["test@equinix.com"], + hostname="arista-p", + account_number=sv.number, + version="4.29.0", + core_count=4, + term_length=12, + additional_bandwidth=5, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name=test_public_key.name, + ), + acl_template_id="c637a17b-7a6a-4486-924b-30e6c36904b0", + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-arista-s", + metro_code=sv.metro_code, + hostname="arista-s", + notifications=["test@eq.com"], + account_number=sv.number, + acl_template_id="fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138", + )) +``` +```go +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + testPublicKey, err := networkedge.NewSshKey(ctx, "testPublicKey", &networkedge.SshKeyArgs{ + Name: pulumi.String("key-name"), + PublicKey: pulumi.String("ssh-dss key-value"), + Type: pulumi.String("DSA"), + }) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "aristaHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-arista-p"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("ARISTA-ROUTER"), + SelfManaged: pulumi.Bool(true), + Connectivity: pulumi.String("PRIVATE"), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("CloudEOS"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + Hostname: pulumi.String("arista-p"), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("4.29.0"), + CoreCount: pulumi.Int(4), + TermLength: pulumi.Int(12), + AdditionalBandwidth: pulumi.Int(5), SshKey: &networkedge.DeviceSshKeyArgs{ - Username: pulumi.String(sshUserName), - KeyName: pulumi.String(sshKeyName), + Username: pulumi.String("test-username"), + KeyName: testPublicKey.Name, + }, + AclTemplateId: pulumi.String("c637a17b-7a6a-4486-924b-30e6c36904b0"), + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-arista-s"), + MetroCode: pulumi.String(sv.MetroCode), + Hostname: pulumi.String("arista-s"), + Notifications: pulumi.StringArray{ + pulumi.String("test@eq.com"), + }, + AccountNumber: pulumi.String(sv.Number), + AclTemplateId: pulumi.String("fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138"), }, - AclTemplateId: pulumi.String(aclTemplateId), }) if err != nil { return err } - ctx.Export("routerId", c8KRouter.ID()) - ctx.Export("provisionStatus", c8KRouter.Status) - ctx.Export("licenseStatus", c8KRouter.LicenseStatus) - ctx.Export("sshIpAddress", c8KRouter.SshIpAddress) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var accountName = config.Require("accountName"); - var licenseToken = config.Require("licenseToken"); - var sshUserName = config.Require("sshUserName"); - var sshKeyName = config.Require("sshKeyName"); - var aclTemplateId = config.Require("aclTemplateId"); - var metro = config.Get("metro") ?? "SV"; - var devicePackageCode = config.Get("devicePackageCode") ?? "network-essentials"; - var deviceVersion = config.Get("deviceVersion") ?? "17.06.01a"; - var sizeInCores = config.GetNumber("sizeInCores") ?? 2; - var termLength = config.GetNumber("termLength") ?? 6; - var additionalBandwidth = config.GetNumber("additionalBandwidth") ?? 5; - var accountNum = Equinix.NetworkEdge.GetAccount.Invoke(new() + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() { - Name = accountName, - MetroCode = metro, - }).Apply(invoke => invoke.Number); + Name = "account-name", + MetroCode = "SV", + }); - var c8KRouter = new Equinix.NetworkEdge.Device("c8kRouter", new() + var testPublicKey = new Equinix.NetworkEdge.SshKey("testPublicKey", new() { - Name = "catalystRouter", - MetroCode = metro, - TypeCode = "C8000V", + Name = "key-name", + PublicKey = "ssh-dss key-value", + Type = "DSA", + }); + + var aristaHa = new Equinix.NetworkEdge.Device("aristaHa", new() + { + Name = "tf-arista-p", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "ARISTA-ROUTER", SelfManaged = true, + Connectivity = "PRIVATE", Byol = true, - PackageCode = devicePackageCode, + PackageCode = "CloudEOS", Notifications = new[] { - "example@equinix.com", + "test@equinix.com", }, - Hostname = "C8KV", - AccountNumber = accountNum, - Version = deviceVersion, - CoreCount = sizeInCores, - TermLength = termLength, - LicenseToken = licenseToken, - AdditionalBandwidth = additionalBandwidth, + Hostname = "arista-p", + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "4.29.0", + CoreCount = 4, + TermLength = 12, + AdditionalBandwidth = 5, SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs { - Username = sshUserName, - KeyName = sshKeyName, + Username = "test-username", + KeyName = testPublicKey.Name, + }, + AclTemplateId = "c637a17b-7a6a-4486-924b-30e6c36904b0", + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-arista-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Hostname = "arista-s", + Notifications = new[] + { + "test@eq.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + AclTemplateId = "fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138", }, - AclTemplateId = aclTemplateId, }); - return new Dictionary - { - ["routerId"] = c8KRouter.Id, - ["provisionStatus"] = c8KRouter.Status, - ["licenseStatus"] = c8KRouter.LicenseStatus, - ["sshIpAddress"] = c8KRouter.SshIpAddress, - }; }); ``` ```java @@ -248,11 +2462,14 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.Device; -import com.equinix.pulumi.networkedge.DeviceArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceSshKeyArgs; -import com.equinix.pulumi.networkedge.inputs.GetAccountArgs; -import com.equinix.pulumi.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.SshKey; +import com.pulumi.equinix.networkedge.SshKeyArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -266,117 +2483,98 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var accountName = config.get("accountName").get(); - final var licenseToken = config.get("licenseToken").get(); - final var sshUserName = config.get("sshUserName").get(); - final var sshKeyName = config.get("sshKeyName").get(); - final var aclTemplateId = config.get("aclTemplateId").get(); - final var metro = config.get("metro").orElse("SV"); - final var devicePackageCode = config.get("devicePackageCode").orElse("network-essentials"); - final var deviceVersion = config.get("deviceVersion").orElse("17.06.01a"); - final var sizeInCores = Integer.parseInt(config.get("sizeInCores").orElse("2")); - final var termLength = Integer.parseInt(config.get("termLength").orElse("6")); - final var additionalBandwidth = Integer.parseInt(config.get("additionalBandwidth").orElse("5")); - final var accountNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() - .name(accountName) - .metroCode(metro) - .build()).applyValue(account -> account.number()); - - var c8KRouter = new Device("c8KRouter", DeviceArgs.builder() - .name("catalystRouter") - .metroCode(metro) - .typeCode("C8000V") + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var testPublicKey = new SshKey("testPublicKey", SshKeyArgs.builder() + .name("key-name") + .publicKey("ssh-dss key-value") + .type("DSA") + .build()); + + var aristaHa = new Device("aristaHa", DeviceArgs.builder() + .name("tf-arista-p") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("ARISTA-ROUTER") .selfManaged(true) + .connectivity("PRIVATE") .byol(true) - .packageCode(devicePackageCode) - .notifications("example@equinix.com") - .hostname("C8KV") - .accountNumber(accountNum) - .version(deviceVersion) - .coreCount(sizeInCores) - .termLength(termLength) - .licenseToken(licenseToken) - .additionalBandwidth(additionalBandwidth) + .packageCode("CloudEOS") + .notifications("test@equinix.com") + .hostname("arista-p") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("4.29.0") + .coreCount(4) + .termLength(12) + .additionalBandwidth(5) .sshKey(DeviceSshKeyArgs.builder() - .username(sshUserName) - .keyName(sshKeyName) + .username("test-username") + .keyName(testPublicKey.name()) + .build()) + .aclTemplateId("c637a17b-7a6a-4486-924b-30e6c36904b0") + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-arista-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .hostname("arista-s") + .notifications("test@eq.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .aclTemplateId("fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138") .build()) - .aclTemplateId(aclTemplateId) .build()); - ctx.export("routerId", c8KRouter.id()); - ctx.export("provisionStatus", c8KRouter.status()); - ctx.export("licenseStatus", c8KRouter.licenseStatus()); - ctx.export("sshIpAddress", c8KRouter.sshIpAddress()); } } ``` ```yaml -config: - accountName: - type: string - licenseToken: - type: string - sshUserName: - type: string - sshKeyName: - type: string - aclTemplateId: - type: string - metro: - type: string - default: SV - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - sizeInCores: - type: integer - default: 2 - termLength: - type: integer - default: 6 - additionalBandwidth: - type: integer - default: 5 -variables: - accountNum: - fn::invoke: - function: equinix:networkedge:getAccount - arguments: - name: ${accountName} - metroCode: ${metro} - return: number -resources: - c8kRouter: + testPublicKey: + type: equinix:networkedge:SshKey + name: test_public_key + properties: + name: key-name + publicKey: ssh-dss key-value + type: DSA + aristaHa: type: equinix:networkedge:Device + name: arista_ha properties: - name: catalystRouter - metroCode: ${metro} - typeCode: C8000V + name: tf-arista-p + metroCode: ${sv.metroCode} + typeCode: ARISTA-ROUTER selfManaged: true + connectivity: PRIVATE byol: true - packageCode: ${devicePackageCode} + packageCode: CloudEOS notifications: - - "example@equinix.com" - hostname: C8KV - accountNumber: ${accountNum} - version: ${deviceVersion} - coreCount: ${sizeInCores} - termLength: ${termLength} - licenseToken: ${licenseToken} - additionalBandwidth: ${additionalBandwidth} + - test@equinix.com + hostname: arista-p + accountNumber: ${sv.number} + version: 4.29.0 + coreCount: 4 + termLength: 12 + additionalBandwidth: 5 sshKey: - username: ${sshUserName} - keyName: ${sshKeyName} - aclTemplateId: ${aclTemplateId} -outputs: - routerId: ${c8kRouter.id} - provisionStatus: ${c8kRouter.status} - licenseStatus: ${c8kRouter.licenseStatus} - sshIpAddress: ${c8kRouter.sshIpAddress} + username: test-username + keyName: ${testPublicKey.name} + aclTemplateId: c637a17b-7a6a-4486-924b-30e6c36904b0 + secondaryDevice: + name: tf-arista-s + metroCode: ${sv.metroCode} + hostname: arista-s + notifications: + - test@eq.com + accountNumber: ${sv.number} + aclTemplateId: fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138 +variables: + # Create self configured redundant Arista router with DSA key + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV ``` {{% /example %}} + + diff --git a/docs/resource/equinix_network_device_link.examples.md b/docs/resource/equinix_network_device_link.examples.md index 647ce93f..a4ab039b 100644 --- a/docs/resource/equinix_network_device_link.examples.md +++ b/docs/resource/equinix_network_device_link.examples.md @@ -1,88 +1,61 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const accountName = config.require("accountName"); -const accountMetro = config.require("accountMetro"); -const device1Id = config.require("device1Id"); -const device2Id = config.require("device2Id"); -const accountfNum = equinix.networkedge.getAccount({ - name: accountName, - metroCode: accountMetro, -}).then(invoke => invoke.number); -const device1Metro = equinix.networkedge.getDevice({ - uuid: device1Id, -}).then(invoke => invoke.metroCode); -const device2Metro = equinix.networkedge.getDevice({ - uuid: device2Id, -}).then(invoke => invoke.metroCode); -const deviceLink = new equinix.networkedge.DeviceLink("deviceLink", { +const test = new equinix.networkedge.DeviceLink("test", { name: "test-link", subnet: "192.168.40.64/27", + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", devices: [ { - id: "device1Id", + id: testEquinixNetworkDevice.uuid, asn: 22111, interfaceId: 6, }, { - id: "device2Id", + id: testEquinixNetworkDevice.secondaryDevice[0].uuid, asn: 22333, interfaceId: 7, }, ], links: [{ - accountNumber: accountfNum, - srcMetroCode: device1Metro, - dstMetroCode: device2Metro, + accountNumber: testEquinixNetworkDevice.accountNumber, + srcMetroCode: testEquinixNetworkDevice.metroCode, + dstMetroCode: testEquinixNetworkDevice.secondaryDevice[0].metroCode, throughput: "50", throughputUnit: "Mbps", }], }); -export const status = deviceLink.status; -export const devices = deviceLink.devices; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -account_name = config.require("accountName") -account_metro = config.require("accountMetro") -device1_id = config.require("device1Id") -device2_id = config.require("device2Id") -accountf_num = equinix.networkedge.get_account(name=account_name, - metro_code=account_metro).number -device1_metro = equinix.networkedge.get_device(uuid=device1_id).metro_code -device2_metro = equinix.networkedge.get_device(uuid=device2_id).metro_code -device_link = equinix.networkedge.DeviceLink("deviceLink", +test = equinix.networkedge.DeviceLink("test", name="test-link", subnet="192.168.40.64/27", + project_id="a86d7112-d740-4758-9c9c-31e66373746b", devices=[ equinix.networkedge.DeviceLinkDeviceArgs( - id="device1Id", + id=test_equinix_network_device["uuid"], asn=22111, interface_id=6, ), equinix.networkedge.DeviceLinkDeviceArgs( - id="device2Id", + id=test_equinix_network_device["secondaryDevice"][0]["uuid"], asn=22333, interface_id=7, ), ], links=[equinix.networkedge.DeviceLinkLinkArgs( - account_number=accountf_num, - src_metro_code=device1_metro, - dst_metro_code=device2_metro, + account_number=test_equinix_network_device["accountNumber"], + src_metro_code=test_equinix_network_device["metroCode"], + dst_metro_code=test_equinix_network_device["secondaryDevice"][0]["metroCode"], throughput="50", throughput_unit="Mbps", )]) -pulumi.export("status", device_link.status) -pulumi.export("devices", device_link.devices) ``` ```go package main @@ -90,46 +63,31 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - accountName := cfg.Require("accountName") - accountMetro := cfg.Require("accountMetro") - device1Id := cfg.Require("device1Id") - device2Id := cfg.Require("device2Id") - accountfNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ - Name: pulumi.StringRef(accountName), - MetroCode: accountMetro, - }, nil).Number - device1Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ - Uuid: pulumi.StringRef(device1Id), - }, nil).MetroCode - device2Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ - Uuid: pulumi.StringRef(device2Id), - }, nil).MetroCode - deviceLink, err := networkedge.NewDeviceLink(ctx, "deviceLink", &networkedge.DeviceLinkArgs{ - Name: pulumi.String("test-link"), - Subnet: pulumi.String("192.168.40.64/27"), + _, err := networkedge.NewDeviceLink(ctx, "test", &networkedge.DeviceLinkArgs{ + Name: pulumi.String("test-link"), + Subnet: pulumi.String("192.168.40.64/27"), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), Devices: networkedge.DeviceLinkDeviceArray{ &networkedge.DeviceLinkDeviceArgs{ - Id: pulumi.String("device1Id"), + Id: pulumi.Any(testEquinixNetworkDevice.Uuid), Asn: pulumi.Int(22111), InterfaceId: pulumi.Int(6), }, &networkedge.DeviceLinkDeviceArgs{ - Id: pulumi.String("device2Id"), + Id: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].Uuid), Asn: pulumi.Int(22333), InterfaceId: pulumi.Int(7), }, }, Links: networkedge.DeviceLinkLinkArray{ &networkedge.DeviceLinkLinkArgs{ - AccountNumber: *pulumi.String(accountfNum), - SrcMetroCode: *pulumi.String(device1Metro), - DstMetroCode: *pulumi.String(device2Metro), + AccountNumber: pulumi.Any(testEquinixNetworkDevice.AccountNumber), + SrcMetroCode: pulumi.Any(testEquinixNetworkDevice.MetroCode), + DstMetroCode: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].MetroCode), Throughput: pulumi.String("50"), ThroughputUnit: pulumi.String("Mbps"), }, @@ -138,55 +96,34 @@ func main() { if err != nil { return err } - ctx.Export("status", deviceLink.Status) - ctx.Export("devices", deviceLink.Devices) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var accountName = config.Require("accountName"); - var accountMetro = config.Require("accountMetro"); - var device1Id = config.Require("device1Id"); - var device2Id = config.Require("device2Id"); - var accountfNum = Equinix.NetworkEdge.GetAccount.Invoke(new() - { - Name = accountName, - MetroCode = accountMetro, - }).Apply(invoke => invoke.Number); - - var device1Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - { - Uuid = device1Id, - }).Apply(invoke => invoke.MetroCode); - - var device2Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - { - Uuid = device2Id, - }).Apply(invoke => invoke.MetroCode); - - var deviceLink = new Equinix.NetworkEdge.DeviceLink("deviceLink", new() + var test = new Equinix.NetworkEdge.DeviceLink("test", new() { Name = "test-link", Subnet = "192.168.40.64/27", + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", Devices = new[] { new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs { - Id = "device1Id", + Id = testEquinixNetworkDevice.Uuid, Asn = 22111, InterfaceId = 6, }, new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs { - Id = "device2Id", + Id = testEquinixNetworkDevice.SecondaryDevice[0].Uuid, Asn = 22333, InterfaceId = 7, }, @@ -195,20 +132,15 @@ return await Deployment.RunAsync(() => { new Equinix.NetworkEdge.Inputs.DeviceLinkLinkArgs { - AccountNumber = accountfNum, - SrcMetroCode = device1Metro, - DstMetroCode = device2Metro, + AccountNumber = testEquinixNetworkDevice.AccountNumber, + SrcMetroCode = testEquinixNetworkDevice.MetroCode, + DstMetroCode = testEquinixNetworkDevice.SecondaryDevice[0].MetroCode, Throughput = "50", ThroughputUnit = "Mbps", }, }, }); - return new Dictionary - { - ["status"] = deviceLink.Status, - ["devices"] = deviceLink.Devices, - }; }); ``` ```java @@ -217,13 +149,10 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.DeviceLink; -import com.equinix.pulumi.networkedge.DeviceLinkArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceLinkDeviceArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceLinkLinkArgs; -import com.equinix.pulumi.networkedge.inputs.GetAccountArgs; -import com.equinix.pulumi.networkedge.inputs.GetDeviceArgs; -import com.equinix.pulumi.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.DeviceLink; +import com.pulumi.equinix.networkedge.DeviceLinkArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceLinkDeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceLinkLinkArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -237,103 +166,54 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var accountName = config.get("accountName").get(); - final var accountMetro = config.get("accountMetro").get(); - final var device1Id = config.get("device1Id").get(); - final var device2Id = config.get("device2Id").get(); - final var accountfNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() - .name(accountName) - .metroCode(accountMetro) - .build()).applyValue(account -> account.number()); - - final var device1Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder() - .uuid(device1Id) - .build()).applyValue(device -> device.metroCode()); - - final var device2Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder() - .uuid(device2Id) - .build()).applyValue(device -> device.metroCode()); - - var deviceLink = new DeviceLink("deviceLink", DeviceLinkArgs.builder() + var test = new DeviceLink("test", DeviceLinkArgs.builder() .name("test-link") .subnet("192.168.40.64/27") + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") .devices( DeviceLinkDeviceArgs.builder() - .id("device1Id") + .id(testEquinixNetworkDevice.uuid()) .asn(22111) .interfaceId(6) .build(), DeviceLinkDeviceArgs.builder() - .id("device2Id") + .id(testEquinixNetworkDevice.secondaryDevice()[0].uuid()) .asn(22333) .interfaceId(7) .build()) .links(DeviceLinkLinkArgs.builder() - .accountNumber(accountfNum) - .srcMetroCode(device1Metro) - .dstMetroCode(device2Metro) + .accountNumber(testEquinixNetworkDevice.accountNumber()) + .srcMetroCode(testEquinixNetworkDevice.metroCode()) + .dstMetroCode(testEquinixNetworkDevice.secondaryDevice()[0].metroCode()) .throughput("50") .throughputUnit("Mbps") .build()) .build()); - ctx.export("status", deviceLink.status()); - ctx.export("devices", deviceLink.devices()); } } ``` ```yaml -config: - accountName: - type: string - accountMetro: - type: string - device1Id: - type: string - device2Id: - type: string -variables: - accountfNum: - fn::invoke: - function: equinix:networkedge:getAccount - arguments: - name: ${accountName} - metroCode: ${accountMetro} - return: number - device1Metro: - fn::invoke: - function: equinix:networkedge:getDevice - arguments: - uuid: ${device1Id} - return: metroCode - device2Metro: - fn::invoke: - function: equinix:networkedge:getDevice - arguments: - uuid: ${device2Id} - return: metroCode -resources: - deviceLink: + # Example of device link with HA device pair + # where each device is in different metro + test: type: equinix:networkedge:DeviceLink properties: name: test-link subnet: 192.168.40.64/27 + projectId: a86d7112-d740-4758-9c9c-31e66373746b devices: - - id: device1Id - asn: 22111 - interfaceId: 6 - - id: device2Id - asn: 22333 - interfaceId: 7 + - id: ${testEquinixNetworkDevice.uuid} + asn: 22111 + interfaceId: 6 + - id: ${testEquinixNetworkDevice.secondaryDevice[0].uuid} + asn: 22333 + interfaceId: 7 links: - - accountNumber: ${accountfNum} - srcMetroCode: ${device1Metro} - dstMetroCode: ${device2Metro} - throughput: 50 - throughputUnit: Mbps -outputs: - status: ${deviceLink.status} - devices: ${deviceLink.devices} + - accountNumber: ${testEquinixNetworkDevice.accountNumber} + srcMetroCode: ${testEquinixNetworkDevice.metroCode} + dstMetroCode: ${testEquinixNetworkDevice.secondaryDevice[0].metroCode} + throughput: '50' + throughputUnit: Mbps ``` {{% /example %}} diff --git a/docs/resource/equinix_network_file.examples.md b/docs/resource/equinix_network_file.examples.md index 828943ac..d8d71bb7 100644 --- a/docs/resource/equinix_network_file.examples.md +++ b/docs/resource/equinix_network_file.examples.md @@ -1,114 +1,107 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; +import * as std from "@pulumi/std"; const config = new pulumi.Config(); -const metro = config.get("metro") || "SV"; -const networkFile = new equinix.networkedge.NetworkFile("networkFile", { - fileName: "Aviatrix-ZTP-file", - content: fs.readFileSync("./../assets/aviatrix-cloud-init.txt"), - metroCode: metro, +const filepath = config.get("filepath") || "fileFolder/fileName.txt"; +const testFile = new equinix.networkedge.NetworkFile("test-file", { + fileName: "fileName.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: equinix.index.Metro.SiliconValley, deviceTypeCode: "AVIATRIX_EDGE", - processType: "CLOUD_INIT", + processType: equinix.networkedge.FileType.CloudInit, selfManaged: true, byol: true, }); -export const networkFileId = networkFile.id; -export const networkFileStatus = networkFile.status; ``` ```python import pulumi import pulumi_equinix as equinix +import pulumi_std as std config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "SV" -network_file = equinix.networkedge.NetworkFile("networkFile", - file_name="Aviatrix-ZTP-file", - content=(lambda path: open(path).read())("./../assets/aviatrix-cloud-init.txt"), - metro_code=metro, +filepath = config.get("filepath") +if filepath is None: + filepath = "fileFolder/fileName.txt" +test_file = equinix.networkedge.NetworkFile("test-file", + file_name="fileName.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=equinix.Metro.SILICON_VALLEY, device_type_code="AVIATRIX_EDGE", - process_type="CLOUD_INIT", + process_type=equinix.networkedge.FileType.CLOUD_INIT, self_managed=True, byol=True) -pulumi.export("networkFileId", network_file.id) -pulumi.export("networkFileStatus", network_file.status) ``` ```go package main import ( - "os" - + "github.com/equinix/pulumi-equinix/sdk/go/equinix" "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi-std/sdk/go/std" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - func main() { pulumi.Run(func(ctx *pulumi.Context) error { cfg := config.New(ctx, "") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param + filepath := "fileFolder/fileName.txt" + if param := cfg.Get("filepath"); param != "" { + filepath = param + } + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err } - networkFile, err := networkedge.NewNetworkFile(ctx, "networkFile", &networkedge.NetworkFileArgs{ - FileName: pulumi.String("Aviatrix-ZTP-file"), - Content: readFileOrPanic("./../assets/aviatrix-cloud-init.txt"), - MetroCode: pulumi.String(metro), + _, err = networkedge.NewNetworkFile(ctx, "test-file", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("fileName.txt"), + Content: invokeFile.Result, + MetroCode: pulumi.String(equinix.MetroSiliconValley), DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), - ProcessType: pulumi.String("CLOUD_INIT"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), SelfManaged: pulumi.Bool(true), Byol: pulumi.Bool(true), }) if err != nil { return err } - ctx.Export("networkFileId", networkFile.ID()) - ctx.Export("networkFileStatus", networkFile.Status) return nil }) } ``` ```csharp using System.Collections.Generic; -using System.IO; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; return await Deployment.RunAsync(() => { var config = new Config(); - var metro = config.Get("metro") ?? "SV"; - var networkFile = new Equinix.NetworkEdge.NetworkFile("networkFile", new() + var filepath = config.Get("filepath") ?? "fileFolder/fileName.txt"; + var testFile = new Equinix.NetworkEdge.NetworkFile("test-file", new() { - FileName = "Aviatrix-ZTP-file", - Content = File.ReadAllText("./../assets/aviatrix-cloud-init.txt"), - MetroCode = metro, + FileName = "fileName.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = Equinix.Metro.SiliconValley, DeviceTypeCode = "AVIATRIX_EDGE", - ProcessType = "CLOUD_INIT", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, SelfManaged = true, Byol = true, }); - return new Dictionary - { - ["networkFileId"] = networkFile.Id, - ["networkFileStatus"] = networkFile.Status, - }; }); ``` ```java @@ -117,12 +110,11 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.NetworkFile; -import com.equinix.pulumi.networkedge.NetworkFileArgs; +import com.pulumi.equinix.networkedge.NetworkFile; +import com.pulumi.equinix.networkedge.NetworkFileArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; -import java.io.IOException; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -134,49 +126,41 @@ public class App { public static void stack(Context ctx) { final var config = ctx.config(); - final var metro = config.get("metro").orElse("SV"); - - String content = null; - try { - content = Files.readString(Paths.get("./../assets/aviatrix-cloud-init.txt")); - } catch (IOException e) { - e.printStackTrace(); - } - - var networkFile = new NetworkFile("networkFile", NetworkFileArgs.builder() - .fileName("Aviatrix-ZTP-file") - .content(content) - .metroCode(metro) + final var filepath = config.get("filepath").orElse("fileFolder/fileName.txt"); + var testFile = new NetworkFile("testFile", NetworkFileArgs.builder() + .fileName("fileName.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode("SV") .deviceTypeCode("AVIATRIX_EDGE") .processType("CLOUD_INIT") .selfManaged(true) .byol(true) .build()); - ctx.export("networkFileId", networkFile.id()); - ctx.export("networkFileStatus", networkFile.status()); } } ``` ```yaml -config: - metro: + filepath: type: string - default: SV + default: fileFolder/fileName.txt resources: - networkFile: + test-file: type: equinix:networkedge:NetworkFile properties: - fileName: Aviatrix-ZTP-file + fileName: fileName.txt content: - fn::readFile: ./../assets/aviatrix-cloud-init.txt - metroCode: ${metro} + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: SV deviceTypeCode: AVIATRIX_EDGE processType: CLOUD_INIT selfManaged: true byol: true -outputs: - networkFileId: ${networkFile.id} - networkFileStatus: ${networkFile.status} ``` {{% /example %}} diff --git a/docs/resource/equinix_network_ssh_key.examples.md b/docs/resource/equinix_network_ssh_key.examples.md index 333820c3..a209b673 100644 --- a/docs/resource/equinix_network_ssh_key.examples.md +++ b/docs/resource/equinix_network_ssh_key.examples.md @@ -1,76 +1,105 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; -const sshKey = new equinix.networkedge.SshKey("sshKey", { +const john = new equinix.networkedge.SshKey("john", { name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/ne_rsa.pub"), + publicKey: ` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +`, + type: "RSA", + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", }); -export const sshKeyId = sshKey.id; ``` ```python import pulumi import pulumi_equinix as equinix -ssh_key = equinix.networkedge.SshKey("sshKey", +john = equinix.networkedge.SshKey("john", name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/ne_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) + public_key=""" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +""", + type="RSA", + project_id="a86d7112-d740-4758-9c9c-31e66373746b") ``` ```go package main import ( - "os" - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - func main() { pulumi.Run(func(ctx *pulumi.Context) error { - sshKey, err := networkedge.NewSshKey(ctx, "sshKey", &networkedge.SshKeyArgs{ - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/ne_rsa.pub"), + _, err := networkedge.NewSshKey(ctx, "john", &networkedge.SshKeyArgs{ + Name: pulumi.String("johnKent"), + PublicKey: pulumi.String(` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +`), + Type: pulumi.String("RSA"), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), }) if err != nil { return err } - ctx.Export("sshKeyId", sshKey.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; -using System.IO; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var sshKey = new Equinix.NetworkEdge.SshKey("sshKey", new() + var john = new Equinix.NetworkEdge.SshKey("john", new() { Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/ne_rsa.pub"), + PublicKey = @" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +", + Type = "RSA", + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", }); - return new Dictionary - { - ["sshKeyId"] = sshKey.Id, - }; }); ``` ```java @@ -79,12 +108,11 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.SshKey; -import com.equinix.pulumi.networkedge.SshKeyArgs; +import com.pulumi.equinix.networkedge.SshKey; +import com.pulumi.equinix.networkedge.SshKeyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; -import java.io.IOException; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -95,31 +123,44 @@ public class App { } public static void stack(Context ctx) { - String key = null; - try { - key = Files.readString(Paths.get("/Users/John/.ssh/ne_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } - - var sshKey = new SshKey("sshKey", SshKeyArgs.builder() + var john = new SshKey("john", SshKeyArgs.builder() .name("johnKent") - .publicKey(key) + .publicKey(""" + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com + """) + .type("RSA") + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") .build()); - ctx.export("sshKeyId", sshKey.id()); } } ``` ```yaml -resources: - sshKey: + john: type: equinix:networkedge:SshKey properties: name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/ne_rsa.pub -outputs: - sshKeyId: ${sshKey.id} + publicKey: |2 + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com + type: RSA + projectId: a86d7112-d740-4758-9c9c-31e66373746b ``` {{% /example %}} diff --git a/docs/resource/equinix_network_ssh_user.examples.md b/docs/resource/equinix_network_ssh_user.examples.md index 08c36856..b6395bb6 100644 --- a/docs/resource/equinix_network_ssh_user.examples.md +++ b/docs/resource/equinix_network_ssh_user.examples.md @@ -1,36 +1,29 @@ ## Example Usage {{% example %}} - ```typescript import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const device1Id = config.require("device1Id"); -const device2Id = config.require("device2Id"); -const sshUser = new equinix.networkedge.SshUser("sshUser", { - username: "johnKent", +const john = new equinix.networkedge.SshUser("john", { + username: "john", + password: "secret", deviceIds: [ - device1Id, - device2Id, + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid", ], }); -export const sshUserId = sshUser.id; ``` ```python import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -device1_id = config.require("device1Id") -device2_id = config.require("device2Id") -ssh_user = equinix.networkedge.SshUser("sshUser", - username="johnKent", +john = equinix.networkedge.SshUser("john", + username="john", + password="secret", device_ids=[ - device1_id, - device2_id, + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid", ]) -pulumi.export("sshUserId", ssh_user.id) ``` ```go package main @@ -38,53 +31,44 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - device1Id := cfg.Require("device1Id") - device2Id := cfg.Require("device2Id") - sshUser, err := networkedge.NewSshUser(ctx, "sshUser", &networkedge.SshUserArgs{ - Username: pulumi.String("johnKent"), + _, err := networkedge.NewSshUser(ctx, "john", &networkedge.SshUserArgs{ + Username: pulumi.String("john"), + Password: pulumi.String("secret"), DeviceIds: pulumi.StringArray{ - pulumi.String(device1Id), - pulumi.String(device2Id), + pulumi.String("csr1000v-ha-uuid"), + pulumi.String("csr1000v-ha-redundant-uuid"), }, }) if err != nil { return err } - ctx.Export("sshUserId", sshUser.ID()) return nil }) } ``` ```csharp using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var device1Id = config.Require("device1Id"); - var device2Id = config.Require("device2Id"); - var sshUser = new Equinix.NetworkEdge.SshUser("sshUser", new() + var john = new Equinix.NetworkEdge.SshUser("john", new() { - Username = "johnKent", + Username = "john", + Password = "secret", DeviceIds = new[] { - device1Id, - device2Id, + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid", }, }); - return new Dictionary - { - ["sshUserId"] = sshUser.Id, - }; }); ``` ```java @@ -93,8 +77,8 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.SshUser; -import com.equinix.pulumi.networkedge.SshUserArgs; +import com.pulumi.equinix.networkedge.SshUser; +import com.pulumi.equinix.networkedge.SshUserArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -108,35 +92,27 @@ public class App { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var device1Id = config.get("device1Id").get(); - final var device2Id = config.get("device2Id").get(); - var sshUser = new SshUser("sshUser", SshUserArgs.builder() - .username("johnKent") + var john = new SshUser("john", SshUserArgs.builder() + .username("john") + .password("secret") .deviceIds( - device1Id, - device2Id) + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid") .build()); - ctx.export("sshUserId", sshUser.id()); } } ``` ```yaml -config: - device1Id: - type: string - device2Id: - type: string -resources: - sshUser: + # Create SSH user with password auth method and associate it with + # two virtual network devices + john: type: equinix:networkedge:SshUser properties: - username: johnKent + username: john + password: secret deviceIds: - - ${device1Id} - - ${device2Id} -outputs: - sshUserId: ${sshUser.id} + - csr1000v-ha-uuid + - csr1000v-ha-redundant-uuid ``` {{% /example %}} diff --git a/examples/example.md b/examples/example.md deleted file mode 100644 index aacf5405..00000000 --- a/examples/example.md +++ /dev/null @@ -1,49 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript - -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python - -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go - -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp - -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java - -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml - -``` - -{{% /choosable %}} diff --git a/examples/fabric/cloud_router/Pulumi.yaml b/examples/fabric/cloud_router/Pulumi.yaml new file mode 100644 index 00000000..1c690e69 --- /dev/null +++ b/examples/fabric/cloud_router/Pulumi.yaml @@ -0,0 +1,24 @@ +name: equinix-fabric-cloud_router +runtime: yaml +resources: + newCloudRouter: + type: equinix:fabric:CloudRouter + name: new_cloud_router + properties: + name: Router-SV + type: XF_ROUTER + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + order: + purchaseOrderNumber: 1-323292 + location: + metroCode: SV + package: + code: STANDARD + project: + projectId: '776847000642406' + account: + accountNumber: '203612' diff --git a/examples/fabric/cloud_router/csharp/Program.cs b/examples/fabric/cloud_router/csharp/Program.cs index bac67fa9..f8a07152 100644 --- a/examples/fabric/cloud_router/csharp/Program.cs +++ b/examples/fabric/cloud_router/csharp/Program.cs @@ -5,21 +5,10 @@ return await Deployment.RunAsync(() => { - var config = new Config(); - var metro = config.Get("metro") ?? "FR"; - var accountNum = config.RequireInt32("accountNum"); - var router = new Equinix.Fabric.CloudRouter("router", new() + var newCloudRouter = new Equinix.Fabric.CloudRouter("newCloudRouter", new() { - Name = "My-Fabric-Cloud-Router", + Name = "Router-SV", Type = "XF_ROUTER", - Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs - { - MetroCode = metro, - }, - Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs - { - Code = "BASIC", - }, Notifications = new[] { new Equinix.Fabric.Inputs.CloudRouterNotificationArgs @@ -28,18 +17,31 @@ Emails = new[] { "example@equinix.com", + "test1@equinix.com", }, }, }, + Order = new Equinix.Fabric.Inputs.CloudRouterOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs + { + MetroCode = "SV", + }, + Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs + { + Code = "STANDARD", + }, + Project = new Equinix.Fabric.Inputs.CloudRouterProjectArgs + { + ProjectId = "776847000642406", + }, Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs { - AccountNumber = 272010, + AccountNumber = 203612, }, }); - return new Dictionary - { - ["routerId"] = router.Id, - }; }); diff --git a/examples/fabric/cloud_router/csharp/Pulumi.yaml b/examples/fabric/cloud_router/csharp/Pulumi.yaml index 90872306..230b149d 100644 --- a/examples/fabric/cloud_router/csharp/Pulumi.yaml +++ b/examples/fabric/cloud_router/csharp/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-fabric-cloud-router +name: equinix-fabric-cloud_router runtime: dotnet -description: An Equinix Fabric Cloud Router instance -config: - accountNum: - type: integer - metro: - type: string - default: FR diff --git a/examples/fabric/cloud_router/csharp/equinix-fabric-cloud-router.csproj b/examples/fabric/cloud_router/csharp/equinix-fabric-cloud-router.csproj deleted file mode 100644 index a70e40d7..00000000 --- a/examples/fabric/cloud_router/csharp/equinix-fabric-cloud-router.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/fabric/cloud_router/csharp/equinix-fabric-cloud_router.csproj b/examples/fabric/cloud_router/csharp/equinix-fabric-cloud_router.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/cloud_router/csharp/equinix-fabric-cloud_router.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/cloud_router/example.md b/examples/fabric/cloud_router/example.md deleted file mode 100644 index 80bf601c..00000000 --- a/examples/fabric/cloud_router/example.md +++ /dev/null @@ -1,252 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const metro = config.get("metro") || "FR"; -const accountNum = config.requireNumber("accountNum"); -const router = new equinix.fabric.CloudRouter("router", { - name: "My-Fabric-Cloud-Router", - type: "XF_ROUTER", - location: { - metroCode: metro, - }, - "package": { - code: "BASIC", - }, - notifications: [{ - type: "ALL", - emails: ["example@equinix.com"], - }], - account: { - accountNumber: 272010, - }, -}); -export const routerId = router.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "FR" -account_num = config.require_int("accountNum") -router = equinix.fabric.CloudRouter("router", - name="My-Fabric-Cloud-Router", - type="XF_ROUTER", - location=equinix.fabric.CloudRouterLocationArgs( - metro_code=metro, - ), - package=equinix.fabric.CloudRouterPackageArgs( - code="BASIC", - ), - notifications=[equinix.fabric.CloudRouterNotificationArgs( - type="ALL", - emails=["example@equinix.com"], - )], - account=equinix.fabric.CloudRouterAccountArgs( - account_number=272010, - )) -pulumi.export("routerId", router.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - accountNum := cfg.RequireInt("accountNum") - router, err := fabric.NewCloudRouter(ctx, "router", &fabric.CloudRouterArgs{ - Name: pulumi.String("My-Fabric-Cloud-Router"), - Type: pulumi.String("XF_ROUTER"), - Location: &fabric.CloudRouterLocationArgs{ - MetroCode: pulumi.String(metro), - }, - Package: &fabric.CloudRouterPackageArgs{ - Code: pulumi.String("BASIC"), - }, - Notifications: fabric.CloudRouterNotificationArray{ - &fabric.CloudRouterNotificationArgs{ - Type: pulumi.String("ALL"), - Emails: pulumi.StringArray{ - pulumi.String("example@equinix.com"), - }, - }, - }, - Account: &fabric.CloudRouterAccountArgs{ - AccountNumber: pulumi.Int(272010), - }, - }) - if err != nil { - return err - } - ctx.Export("routerId", router.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using System.Linq; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var metro = config.Get("metro") ?? "FR"; - var accountNum = config.RequireInt32("accountNum"); - var router = new Equinix.Fabric.CloudRouter("router", new() - { - Name = "My-Fabric-Cloud-Router", - Type = "XF_ROUTER", - Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs - { - MetroCode = metro, - }, - Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs - { - Code = "BASIC", - }, - Notifications = new[] - { - new Equinix.Fabric.Inputs.CloudRouterNotificationArgs - { - Type = "ALL", - Emails = new[] - { - "example@equinix.com", - }, - }, - }, - Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs - { - AccountNumber = 272010, - }, - }); - - return new Dictionary - { - ["routerId"] = router.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.pulumi.equinix.fabric.CloudRouter; -import com.pulumi.equinix.fabric.CloudRouterArgs; -import com.pulumi.equinix.fabric.inputs.CloudRouterLocationArgs; -import com.pulumi.equinix.fabric.inputs.CloudRouterPackageArgs; -import com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs; -import com.pulumi.equinix.fabric.inputs.CloudRouterAccountArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("FR"); - final var accountNum = config.get("accountNum"); - var router = new CloudRouter("router", CloudRouterArgs.builder() - .name("My-Fabric-Cloud-Router") - .type("XF_ROUTER") - .location(CloudRouterLocationArgs.builder() - .metroCode(metro) - .build()) - .package_(CloudRouterPackageArgs.builder() - .code("BASIC") - .build()) - .notifications(CloudRouterNotificationArgs.builder() - .type("ALL") - .emails("example@equinix.com") - .build()) - .account(CloudRouterAccountArgs.builder() - .accountNumber(272010) - .build()) - .build()); - - ctx.export("routerId", router.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - metro: - type: string - default: FR - accountNum: - type: integer -resources: - router: - type: equinix:fabric:CloudRouter - properties: - name: My-Fabric-Cloud-Router - type: XF_ROUTER - location: - metroCode: ${metro} - package: - code: BASIC - notifications: - - type: ALL - emails: - - example@equinix.com - account: - accountNumber: 272010 -outputs: - routerId: ${router.id} -``` - -{{% /choosable %}} diff --git a/examples/fabric/cloud_router/generate.sh b/examples/fabric/cloud_router/generate.sh deleted file mode 100755 index 8f8b0930..00000000 --- a/examples/fabric/cloud_router/generate.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -pulumi convert --language python --out python --generate-only || true -pulumi convert --language typescript --out typescript --generate-only || true -pulumi convert --language java --out java --generate-only || true -pulumi convert --language go --out go || true -pulumi convert --language csharp --out csharp || true - -# Read each source file -TS_SRC=$(cat typescript/index.ts) -PY_SRC=$(cat python/__main__.py) -GO_SRC=$(cat go/main.go) -CS_SRC=$(cat csharp/Program.cs) -JAVA_SRC=$(cat java/src/main/java/generated_program/App.java) -## Skip first 3 lines -YAML_SRC=$(cat Pulumi.yaml | tail -n +4) - -CHOOSER='{{< chooser language "typescript,python,go,csharp,java,yaml" / >}}' -TS_BLOCK=$(printf "%s\n" '{{% choosable language "javascript,typescript" %}}' '' '```typescript' "$TS_SRC" '```' '' '{{% /choosable %}}') -PY_BLOCK=$(printf "%s\n" '{{% choosable language python %}}' '' '```python' "$PY_SRC" '```' '' '{{% /choosable %}}') -GO_BLOCK=$(printf "%s\n" '{{% choosable language go %}}' '' '```go' "$GO_SRC" '```' '' '{{% /choosable %}}') -CS_BLOCK=$(printf "%s\n" '{{% choosable language csharp %}}' '' '```csharp' "$CS_SRC" '```' '' '{{% /choosable %}}') -JAVA_BLOCK=$(printf "%s\n" '{{% choosable language java %}}' '' '```java' "$JAVA_SRC" '```' '' '{{% /choosable %}}') -YAML_BLOCK=$(printf "%s\n" '{{% choosable language yaml %}}' '' '```yaml' "$YAML_SRC" '```' '' '{{% /choosable %}}') - -# Write out to a file -printf "%s\n" "$CHOOSER" "" "$TS_BLOCK" "" "$PY_BLOCK" "" "$GO_BLOCK" "" "$CS_BLOCK" "" "$JAVA_BLOCK" "" "$YAML_BLOCK" > example.md diff --git a/examples/fabric/cloud_router/go/Pulumi.yaml b/examples/fabric/cloud_router/go/Pulumi.yaml index 4d2799a7..736a0bf5 100644 --- a/examples/fabric/cloud_router/go/Pulumi.yaml +++ b/examples/fabric/cloud_router/go/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-fabric-cloud-router +name: equinix-fabric-cloud_router runtime: go -description: An Equinix Fabric Cloud Router instance -config: - accountNum: - type: integer - metro: - type: string - default: FR diff --git a/examples/fabric/cloud_router/go/go.mod b/examples/fabric/cloud_router/go/go.mod index efbc6091..11cd1fae 100644 --- a/examples/fabric/cloud_router/go/go.mod +++ b/examples/fabric/cloud_router/go/go.mod @@ -1,7 +1,94 @@ -module equinix-fabric-cloud-router +module equinix-fabric-cloud_router -go 1.20 +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.0 +) require ( - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) \ No newline at end of file + 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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/cloud_router/go/main.go b/examples/fabric/cloud_router/go/main.go index 145e836b..04b9cccb 100644 --- a/examples/fabric/cloud_router/go/main.go +++ b/examples/fabric/cloud_router/go/main.go @@ -3,42 +3,41 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - accountNum := cfg.RequireInt("accountNum") - router, err := fabric.NewCloudRouter(ctx, "router", &fabric.CloudRouterArgs{ - Name: pulumi.String("My-Fabric-Cloud-Router"), + _, err := fabric.NewCloudRouter(ctx, "newCloudRouter", &fabric.CloudRouterArgs{ + Name: pulumi.String("Router-SV"), Type: pulumi.String("XF_ROUTER"), - Location: &fabric.CloudRouterLocationArgs{ - MetroCode: pulumi.String(metro), - }, - Package: &fabric.CloudRouterPackageArgs{ - Code: pulumi.String("BASIC"), - }, Notifications: fabric.CloudRouterNotificationArray{ &fabric.CloudRouterNotificationArgs{ Type: pulumi.String("ALL"), Emails: pulumi.StringArray{ pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), }, }, }, + Order: &fabric.CloudRouterOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + Location: &fabric.CloudRouterLocationArgs{ + MetroCode: pulumi.String("SV"), + }, + Package: &fabric.CloudRouterPackageArgs{ + Code: pulumi.String("STANDARD"), + }, + Project: &fabric.CloudRouterProjectArgs{ + ProjectId: pulumi.String("776847000642406"), + }, Account: &fabric.CloudRouterAccountArgs{ - AccountNumber: pulumi.Int(272010), + AccountNumber: pulumi.Int(203612), }, }) if err != nil { return err } - ctx.Export("routerId", router.ID()) return nil }) } diff --git a/examples/fabric/cloud_router/java/Pulumi.yaml b/examples/fabric/cloud_router/java/Pulumi.yaml index ebdbbd5c..771b613b 100644 --- a/examples/fabric/cloud_router/java/Pulumi.yaml +++ b/examples/fabric/cloud_router/java/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-fabric-cloud-router +name: equinix-fabric-cloud_router runtime: java -description: An Equinix Fabric Cloud Router instance -config: - accountNum: - type: integer - metro: - type: string - default: FR diff --git a/examples/fabric/cloud_router/java/pom.xml b/examples/fabric/cloud_router/java/pom.xml index 06b4c4ae..b6cab8eb 100644 --- a/examples/fabric/cloud_router/java/pom.xml +++ b/examples/fabric/cloud_router/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-fabric-cloud-router + equinix-fabric-cloud_router 1.0-SNAPSHOT @@ -26,7 +26,7 @@ com.pulumi equinix - 0.2.2-alpha.1697554924+b109f1f4.dirty + (,1.0) diff --git a/examples/fabric/cloud_router/java/src/main/java/generated_program/App.java b/examples/fabric/cloud_router/java/src/main/java/generated_program/App.java index 58697635..635ffed8 100644 --- a/examples/fabric/cloud_router/java/src/main/java/generated_program/App.java +++ b/examples/fabric/cloud_router/java/src/main/java/generated_program/App.java @@ -5,9 +5,11 @@ import com.pulumi.core.Output; import com.pulumi.equinix.fabric.CloudRouter; import com.pulumi.equinix.fabric.CloudRouterArgs; +import com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs; +import com.pulumi.equinix.fabric.inputs.CloudRouterOrderArgs; import com.pulumi.equinix.fabric.inputs.CloudRouterLocationArgs; import com.pulumi.equinix.fabric.inputs.CloudRouterPackageArgs; -import com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs; +import com.pulumi.equinix.fabric.inputs.CloudRouterProjectArgs; import com.pulumi.equinix.fabric.inputs.CloudRouterAccountArgs; import java.util.List; import java.util.ArrayList; @@ -22,27 +24,31 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("FR"); - final var accountNum = config.get("accountNum"); - var router = new CloudRouter("router", CloudRouterArgs.builder() - .name("My-Fabric-Cloud-Router") + var newCloudRouter = new CloudRouter("newCloudRouter", CloudRouterArgs.builder() + .name("Router-SV") .type("XF_ROUTER") + .notifications(CloudRouterNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .order(CloudRouterOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) .location(CloudRouterLocationArgs.builder() - .metroCode(metro) + .metroCode("SV") .build()) .package_(CloudRouterPackageArgs.builder() - .code("BASIC") + .code("STANDARD") .build()) - .notifications(CloudRouterNotificationArgs.builder() - .type("ALL") - .emails("example@equinix.com") + .project(CloudRouterProjectArgs.builder() + .projectId("776847000642406") .build()) .account(CloudRouterAccountArgs.builder() - .accountNumber(272010) + .accountNumber("203612") .build()) .build()); - ctx.export("routerId", router.id()); } } diff --git a/examples/fabric/cloud_router/python/Pulumi.yaml b/examples/fabric/cloud_router/python/Pulumi.yaml index 622317ca..232844e4 100644 --- a/examples/fabric/cloud_router/python/Pulumi.yaml +++ b/examples/fabric/cloud_router/python/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-fabric-cloud-router +name: equinix-fabric-cloud_router runtime: python -description: An Equinix Fabric Cloud Router instance -config: - accountNum: - type: integer - metro: - type: string - default: FR diff --git a/examples/fabric/cloud_router/python/__main__.py b/examples/fabric/cloud_router/python/__main__.py index f0964647..8eb768ee 100644 --- a/examples/fabric/cloud_router/python/__main__.py +++ b/examples/fabric/cloud_router/python/__main__.py @@ -1,25 +1,28 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "FR" -account_num = config.require_int("accountNum") -router = equinix.fabric.CloudRouter("router", - name="My-Fabric-Cloud-Router", +new_cloud_router = equinix.fabric.CloudRouter("newCloudRouter", + name="Router-SV", type="XF_ROUTER", + notifications=[equinix.fabric.CloudRouterNotificationArgs( + type="ALL", + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + order=equinix.fabric.CloudRouterOrderArgs( + purchase_order_number="1-323292", + ), location=equinix.fabric.CloudRouterLocationArgs( - metro_code=metro, + metro_code="SV", ), package=equinix.fabric.CloudRouterPackageArgs( - code="BASIC", + code="STANDARD", + ), + project=equinix.fabric.CloudRouterProjectArgs( + project_id="776847000642406", ), - notifications=[equinix.fabric.CloudRouterNotificationArgs( - type="ALL", - emails=["example@equinix.com"], - )], account=equinix.fabric.CloudRouterAccountArgs( - account_number=272010, + account_number=203612, )) -pulumi.export("routerId", router.id) diff --git a/examples/fabric/cloud_router/python/requirements.txt b/examples/fabric/cloud_router/python/requirements.txt index e08857f6..317d94a1 100644 --- a/examples/fabric/cloud_router/python/requirements.txt +++ b/examples/fabric/cloud_router/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix==0.2.2-alpha.1697554924+b109f1f4.dirty +pulumi_equinix==<1.0.0 diff --git a/examples/fabric/cloud_router/typescript/Pulumi.yaml b/examples/fabric/cloud_router/typescript/Pulumi.yaml index 8d562e64..48e20da2 100644 --- a/examples/fabric/cloud_router/typescript/Pulumi.yaml +++ b/examples/fabric/cloud_router/typescript/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-fabric-cloud-router +name: equinix-fabric-cloud_router runtime: nodejs -description: An Equinix Fabric Cloud Router instance -config: - accountNum: - type: integer - metro: - type: string - default: FR diff --git a/examples/fabric/cloud_router/typescript/index.ts b/examples/fabric/cloud_router/typescript/index.ts index a22c4222..575f5a72 100644 --- a/examples/fabric/cloud_router/typescript/index.ts +++ b/examples/fabric/cloud_router/typescript/index.ts @@ -1,24 +1,29 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const metro = config.get("metro") || "FR"; -const accountNum = config.requireNumber("accountNum"); -const router = new equinix.fabric.CloudRouter("router", { - name: "My-Fabric-Cloud-Router", +const newCloudRouter = new equinix.fabric.CloudRouter("newCloudRouter", { + name: "Router-SV", type: "XF_ROUTER", + notifications: [{ + type: "ALL", + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + order: { + purchaseOrderNumber: "1-323292", + }, location: { - metroCode: metro, + metroCode: "SV", }, "package": { - code: "BASIC", + code: "STANDARD", + }, + project: { + projectId: "776847000642406", }, - notifications: [{ - type: "ALL", - emails: ["example@equinix.com"], - }], account: { - accountNumber: 272010, + accountNumber: 203612, }, }); -export const routerId = router.id; diff --git a/examples/fabric/cloud_router/typescript/package.json b/examples/fabric/cloud_router/typescript/package.json index 93946eb7..1e23a03b 100644 --- a/examples/fabric/cloud_router/typescript/package.json +++ b/examples/fabric/cloud_router/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-fabric-cloud-router", + "name": "equinix-fabric-cloud_router", "devDependencies": { "@types/node": "^14" }, "dependencies": { "typescript": "^4.0.0", "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "0.2.2-alpha.1697554924+b109f1f4.dirty" + "@equinix-labs/pulumi-equinix": "<1.0.0" } } \ No newline at end of file diff --git a/examples/fabric/cloud_router/yaml/Pulumi.yaml b/examples/fabric/cloud_router/yaml/Pulumi.yaml deleted file mode 100644 index a8d1ff54..00000000 --- a/examples/fabric/cloud_router/yaml/Pulumi.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: equinix-fabric-cloud-router -runtime: yaml -description: An Equinix Fabric Cloud Router instance -config: - metro: - type: string - default: FR - accountNum: - type: integer -resources: - router: - type: equinix:fabric:CloudRouter - properties: - name: My-Fabric-Cloud-Router - type: XF_ROUTER - location: - metroCode: ${metro} - package: - code: BASIC - notifications: - - type: ALL - emails: - - example@equinix.com - account: - accountNumber: 272010 -outputs: - routerId: ${router.id} diff --git a/examples/fabric/connection/csharp/Program.cs b/examples/fabric/connection/csharp/Program.cs deleted file mode 100644 index 8140ba4e..00000000 --- a/examples/fabric/connection/csharp/Program.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var metro = config.Get("metro") ?? "FR"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 50; - var fabricPortName = config.Require("fabricPortName"); - var awsRegion = config.Get("awsRegion") ?? "eu-central-1"; - var awsAccountId = config.Require("awsAccountId"); - var serviceProfileId = Equinix.Fabric.GetServiceProfiles.Invoke(new() - { - Filter = new Equinix.Fabric.Inputs.GetServiceProfilesFilterInputArgs - { - Property = "/name", - Operator = "=", - Values = new[] - { - "AWS Direct Connect", - }, - }, - }).Apply(invoke => invoke.Data[0]?.Uuid); - - var portId = Equinix.Fabric.GetPorts.Invoke(new() - { - Filter = new Equinix.Fabric.Inputs.GetPortsFilterInputArgs - { - Name = fabricPortName, - }, - }).Apply(invoke => invoke.Data[0]?.Uuid); - - var colo2Aws = new Equinix.Fabric.Connection("colo2Aws", new() - { - Name = "Pulumi-colo2Aws", - Type = "EVPL_VC", - Notifications = new[] - { - new Equinix.Fabric.Inputs.ConnectionNotificationArgs - { - Type = "ALL", - Emails = new[] - { - "example@equinix.com", - }, - }, - }, - Bandwidth = speedInMbps, - Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs - { - Priority = "PRIMARY", - }, - ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs - { - AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs - { - Type = "COLO", - Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs - { - Uuid = portId, - }, - LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs - { - Type = "DOT1Q", - VlanTag = 1234, - }, - }, - }, - ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs - { - AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs - { - Type = "SP", - AuthenticationKey = awsAccountId, - SellerRegion = awsRegion, - Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs - { - Type = "L2_PROFILE", - Uuid = serviceProfileId, - }, - Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs - { - MetroCode = metro, - }, - }, - }, - }); - - return new Dictionary - { - ["connectionId"] = colo2Aws.Id, - ["connectionStatus"] = colo2Aws.Operation.Apply(operation => operation.EquinixStatus), - ["connectionProviderStatus"] = colo2Aws.Operation.Apply(operation => operation.ProviderStatus), - ["awsDirectConnectId"] = colo2Aws.ZSide.Apply(zSide => zSide.AccessPoint?.ProviderConnectionId), - }; -}); - diff --git a/examples/fabric/connection/csharp/Pulumi.yaml b/examples/fabric/connection/csharp/Pulumi.yaml deleted file mode 100644 index 3e927a5f..00000000 --- a/examples/fabric/connection/csharp/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-fabric-connection -runtime: dotnet -description: An Equinix Fabric Connection resource - Example connection from Equinix Fabric Port to AWS Direct Connect -config: - awsAccountId: - type: string - awsRegion: - type: string - default: eu-central-1 - fabricPortName: - type: string - metro: - type: string - default: FR - speedInMbps: - type: integer - default: 50 diff --git a/examples/fabric/connection/csharp/equinix-fabric-connection.csproj b/examples/fabric/connection/csharp/equinix-fabric-connection.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/fabric/connection/csharp/equinix-fabric-connection.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/fabric/connection/example.md b/examples/fabric/connection/example.md deleted file mode 100644 index 4238cb94..00000000 --- a/examples/fabric/connection/example.md +++ /dev/null @@ -1,526 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const metro = config.get("metro") || "FR"; -const speedInMbps = config.getNumber("speedInMbps") || 50; -const fabricPortName = config.require("fabricPortName"); -const awsRegion = config.get("awsRegion") || "eu-central-1"; -const awsAccountId = config.require("awsAccountId"); -const serviceProfileId = equinix.fabric.getServiceProfiles({ - filter: { - property: "/name", - operator: "=", - values: ["AWS Direct Connect"], - }, -}).then(invoke => invoke.data?.[0]?.uuid!); -const portId = equinix.fabric.getPorts({ - filter: { - name: fabricPortName, - }, -}).then(invoke => invoke.data?.[0]?.uuid!); -const colo2Aws = new equinix.fabric.Connection("colo2Aws", { - name: "Pulumi-colo2Aws", - type: "EVPL_VC", - notifications: [{ - type: "ALL", - emails: ["example@equinix.com"], - }], - bandwidth: speedInMbps, - redundancy: { - priority: "PRIMARY", - }, - aSide: { - accessPoint: { - type: "COLO", - port: { - uuid: portId, - }, - linkProtocol: { - type: "DOT1Q", - vlanTag: 1234, - }, - }, - }, - zSide: { - accessPoint: { - type: "SP", - authenticationKey: awsAccountId, - sellerRegion: awsRegion, - profile: { - type: "L2_PROFILE", - uuid: serviceProfileId, - }, - location: { - metroCode: metro, - }, - }, - }, -}); -export const connectionId = colo2Aws.id; -export const connectionStatus = colo2Aws.operation.apply(operation => operation.equinixStatus); -export const connectionProviderStatus = colo2Aws.operation.apply(operation => operation.providerStatus); -export const awsDirectConnectId = colo2Aws.zSide.apply(zSide => zSide.accessPoint?.providerConnectionId); -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "FR" -speed_in_mbps = config.get_int("speedInMbps") -if speed_in_mbps is None: - speed_in_mbps = 50 -fabric_port_name = config.require("fabricPortName") -aws_region = config.get("awsRegion") -if aws_region is None: - aws_region = "eu-central-1" -aws_account_id = config.require("awsAccountId") -service_profile_id = equinix.fabric.get_service_profiles(filter=equinix.fabric.GetServiceProfilesFilterArgs( - property="/name", - operator="=", - values=["AWS Direct Connect"], -)).data[0].uuid -port_id = equinix.fabric.get_ports(filter=equinix.fabric.GetPortsFilterArgs( - name=fabric_port_name, -)).data[0].uuid -colo2_aws = equinix.fabric.Connection("colo2Aws", - name="Pulumi-colo2Aws", - type="EVPL_VC", - notifications=[equinix.fabric.ConnectionNotificationArgs( - type="ALL", - emails=["example@equinix.com"], - )], - bandwidth=speed_in_mbps, - redundancy=equinix.fabric.ConnectionRedundancyArgs( - priority="PRIMARY", - ), - a_side=equinix.fabric.ConnectionASideArgs( - access_point=equinix.fabric.ConnectionASideAccessPointArgs( - type="COLO", - port=equinix.fabric.ConnectionASideAccessPointPortArgs( - uuid=port_id, - ), - link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( - type="DOT1Q", - vlan_tag=1234, - ), - ), - ), - z_side=equinix.fabric.ConnectionZSideArgs( - access_point=equinix.fabric.ConnectionZSideAccessPointArgs( - type="SP", - authentication_key=aws_account_id, - seller_region=aws_region, - profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( - type="L2_PROFILE", - uuid=service_profile_id, - ), - location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( - metro_code=metro, - ), - ), - )) -pulumi.export("connectionId", colo2_aws.id) -pulumi.export("connectionStatus", colo2_aws.operation.equinix_status) -pulumi.export("connectionProviderStatus", colo2_aws.operation.provider_status) -pulumi.export("awsDirectConnectId", colo2_aws.z_side.access_point.provider_connection_id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - speedInMbps := 50 - if param := cfg.GetInt("speedInMbps"); param != 0 { - speedInMbps = param - } - fabricPortName := cfg.Require("fabricPortName") - awsRegion := "eu-central-1" - if param := cfg.Get("awsRegion"); param != "" { - awsRegion = param - } - awsAccountId := cfg.Require("awsAccountId") - serviceProfileId := fabric.GetServiceProfiles(ctx, &fabric.GetServiceProfilesArgs{ - Filter: fabric.GetServiceProfilesFilter{ - Property: pulumi.StringRef("/name"), - Operator: pulumi.StringRef("="), - Values: []string{ - "AWS Direct Connect", - }, - }, - }, nil).Data[0].Uuid - portId := fabric.GetPorts(ctx, &fabric.GetPortsArgs{ - Filter: fabric.GetPortsFilter{ - Name: pulumi.StringRef(fabricPortName), - }, - }, nil).Data[0].Uuid - colo2Aws, err := fabric.NewConnection(ctx, "colo2Aws", &fabric.ConnectionArgs{ - Name: pulumi.String("Pulumi-colo2Aws"), - Type: pulumi.String("EVPL_VC"), - Notifications: fabric.ConnectionNotificationArray{ - &fabric.ConnectionNotificationArgs{ - Type: pulumi.String("ALL"), - Emails: pulumi.StringArray{ - pulumi.String("example@equinix.com"), - }, - }, - }, - Bandwidth: pulumi.Int(speedInMbps), - Redundancy: &fabric.ConnectionRedundancyArgs{ - Priority: pulumi.String("PRIMARY"), - }, - ASide: &fabric.ConnectionASideArgs{ - AccessPoint: &fabric.ConnectionASideAccessPointArgs{ - Type: pulumi.String("COLO"), - Port: &fabric.ConnectionASideAccessPointPortArgs{ - Uuid: *pulumi.String(portId), - }, - LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ - Type: pulumi.String("DOT1Q"), - VlanTag: pulumi.Int(1234), - }, - }, - }, - ZSide: &fabric.ConnectionZSideArgs{ - AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ - Type: pulumi.String("SP"), - AuthenticationKey: pulumi.String(awsAccountId), - SellerRegion: pulumi.String(awsRegion), - Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ - Type: pulumi.String("L2_PROFILE"), - Uuid: *pulumi.String(serviceProfileId), - }, - Location: &fabric.ConnectionZSideAccessPointLocationArgs{ - MetroCode: pulumi.String(metro), - }, - }, - }, - }) - if err != nil { - return err - } - ctx.Export("connectionId", colo2Aws.ID()) - ctx.Export("connectionStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { - return &operation.EquinixStatus, nil - }).(pulumi.StringPtrOutput)) - ctx.Export("connectionProviderStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { - return &operation.ProviderStatus, nil - }).(pulumi.StringPtrOutput)) - ctx.Export("awsDirectConnectId", colo2Aws.ZSide.ApplyT(func(zSide fabric.ConnectionZSide) (*string, error) { - return &zSide.AccessPoint.ProviderConnectionId, nil - }).(pulumi.StringPtrOutput)) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var metro = config.Get("metro") ?? "FR"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 50; - var fabricPortName = config.Require("fabricPortName"); - var awsRegion = config.Get("awsRegion") ?? "eu-central-1"; - var awsAccountId = config.Require("awsAccountId"); - var serviceProfileId = Equinix.Fabric.GetServiceProfiles.Invoke(new() - { - Filter = new Equinix.Fabric.Inputs.GetServiceProfilesFilterInputArgs - { - Property = "/name", - Operator = "=", - Values = new[] - { - "AWS Direct Connect", - }, - }, - }).Apply(invoke => invoke.Data[0]?.Uuid); - - var portId = Equinix.Fabric.GetPorts.Invoke(new() - { - Filter = new Equinix.Fabric.Inputs.GetPortsFilterInputArgs - { - Name = fabricPortName, - }, - }).Apply(invoke => invoke.Data[0]?.Uuid); - - var colo2Aws = new Equinix.Fabric.Connection("colo2Aws", new() - { - Name = "Pulumi-colo2Aws", - Type = "EVPL_VC", - Notifications = new[] - { - new Equinix.Fabric.Inputs.ConnectionNotificationArgs - { - Type = "ALL", - Emails = new[] - { - "example@equinix.com", - }, - }, - }, - Bandwidth = speedInMbps, - Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs - { - Priority = "PRIMARY", - }, - ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs - { - AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs - { - Type = "COLO", - Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs - { - Uuid = portId, - }, - LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs - { - Type = "DOT1Q", - VlanTag = 1234, - }, - }, - }, - ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs - { - AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs - { - Type = "SP", - AuthenticationKey = awsAccountId, - SellerRegion = awsRegion, - Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs - { - Type = "L2_PROFILE", - Uuid = serviceProfileId, - }, - Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs - { - MetroCode = metro, - }, - }, - }, - }); - - return new Dictionary - { - ["connectionId"] = colo2Aws.Id, - ["connectionStatus"] = colo2Aws.Operation.Apply(operation => operation.EquinixStatus), - ["connectionProviderStatus"] = colo2Aws.Operation.Apply(operation => operation.ProviderStatus), - ["awsDirectConnectId"] = colo2Aws.ZSide.Apply(zSide => zSide.AccessPoint?.ProviderConnectionId), - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.fabric.Connection; -import com.equinix.pulumi.fabric.ConnectionArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionNotificationArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionRedundancyArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointPortArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointProfileArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointLocationArgs; -import com.equinix.pulumi.fabric.inputs.GetServiceProfilesArgs; -import com.equinix.pulumi.fabric.inputs.GetServiceProfilesFilterArgs; -import com.equinix.pulumi.fabric.inputs.GetPortsArgs; -import com.equinix.pulumi.fabric.inputs.GetPortsFilterArgs; -import com.equinix.pulumi.fabric.FabricFunctions; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("FR"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("50")); - final var fabricPortName = config.get("fabricPortName").get().toString(); - final var awsRegion = config.get("awsRegion").orElse("eu-central-1"); - final var awsAccountId = config.get("awsAccountId").get().toString(); - System.out.println(System.getProperty("java.classpath")); - final var serviceProfileId = FabricFunctions.getServiceProfiles(GetServiceProfilesArgs.builder() - .filter(GetServiceProfilesFilterArgs.builder() - .property("/name") - .operator("=") - .values("AWS Direct Connect") - .build()) - .build()).applyValue(data -> data.data().get(0).uuid().get()); - - final var portId = FabricFunctions.getPorts(GetPortsArgs.builder() - .filter(GetPortsFilterArgs.builder() - .name(fabricPortName) - .build()) - .build()).applyValue(data -> data.data().get(0).uuid().get()); - - var colo2Aws = new Connection("colo2Aws", ConnectionArgs.builder() - .name("Pulumi-colo2Aws") - .type("EVPL_VC") - .notifications(ConnectionNotificationArgs.builder() - .type("ALL") - .emails("example@equinix.com") - .build()) - .bandwidth(speedInMbps) - .redundancy(ConnectionRedundancyArgs.builder() - .priority("PRIMARY") - .build()) - .aSide(ConnectionASideArgs.builder() - .accessPoint(ConnectionASideAccessPointArgs.builder() - .type("COLO") - .port(ConnectionASideAccessPointPortArgs.builder() - .uuid(portId) - .build()) - .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() - .type("DOT1Q") - .vlanTag(1234) - .build()) - .build()) - .build()) - .zSide(ConnectionZSideArgs.builder() - .accessPoint(ConnectionZSideAccessPointArgs.builder() - .type("SP") - .authenticationKey(awsAccountId) - .sellerRegion(awsRegion) - .profile(ConnectionZSideAccessPointProfileArgs.builder() - .type("L2_PROFILE") - .uuid(serviceProfileId) - .build()) - .location(ConnectionZSideAccessPointLocationArgs.builder() - .metroCode(metro) - .build()) - .build()) - .build()) - .build()); - - ctx.export("connectionId", colo2Aws.id()); - ctx.export("connectionStatus", colo2Aws.operation().applyValue(operation -> operation.equinixStatus())); - ctx.export("connectionProviderStatus", colo2Aws.operation().applyValue(operation -> operation.providerStatus())); - ctx.export("awsDirectConnectId", colo2Aws.zSide().applyValue(zSide -> zSide.accessPoint().get().providerConnectionId())); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - metro: - type: string - default: FR - speedInMbps: - type: integer - default: 50 - fabricPortName: - type: string - awsRegion: - type: string - default: eu-central-1 - awsAccountId: - type: string -variables: - serviceProfileId: - fn::invoke: - function: equinix:fabric:getServiceProfiles - arguments: - filter: - property: /name - operator: "=" - values: - - AWS Direct Connect - return: data[0].uuid - portId: - fn::invoke: - function: equinix:fabric:getPorts - arguments: - filter: - name: ${fabricPortName} - return: data[0].uuid -resources: - colo2Aws: - type: equinix:fabric:Connection - properties: - name: Pulumi-colo2Aws - type: EVPL_VC - notifications: - - type: ALL - emails: - - example@equinix.com - bandwidth: ${speedInMbps} - redundancy: - priority: PRIMARY - aSide: - accessPoint: - type: COLO - port: - uuid: ${portId} - linkProtocol: - type: DOT1Q - vlanTag: 1234 - zSide: - accessPoint: - type: SP - authenticationKey: ${awsAccountId} - sellerRegion: ${awsRegion} - profile: - type: L2_PROFILE - uuid: ${serviceProfileId} - location: - metroCode: ${metro} -outputs: - connectionId: ${colo2Aws.id} - connectionStatus: ${colo2Aws.operation.equinixStatus} - connectionProviderStatus: ${colo2Aws.operation.providerStatus} - awsDirectConnectId: ${colo2Aws.zSide.accessPoint.providerConnectionId} -``` - -{{% /choosable %}} diff --git a/examples/fabric/connection/example_1/Pulumi.yaml b/examples/fabric/connection/example_1/Pulumi.yaml new file mode 100644 index 00000000..3a43e98e --- /dev/null +++ b/examples/fabric/connection/example_1/Pulumi.yaml @@ -0,0 +1,34 @@ +name: equinix-fabric-connection-example_1 +runtime: yaml +resources: + port2port: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '1976' + zSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '3711' + location: + metroCode: SV diff --git a/examples/fabric/connection/csharp/.gitignore b/examples/fabric/connection/example_1/csharp/.gitignore similarity index 100% rename from examples/fabric/connection/csharp/.gitignore rename to examples/fabric/connection/example_1/csharp/.gitignore diff --git a/examples/fabric/connection/example_1/csharp/Program.cs b/examples/fabric/connection/example_1/csharp/Program.cs new file mode 100644 index 00000000..64400175 --- /dev/null +++ b/examples/fabric/connection/example_1/csharp/Program.cs @@ -0,0 +1,68 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var port2Port = new Equinix.Fabric.Connection("port2port", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 1976, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 3711, + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_1/csharp/Pulumi.yaml b/examples/fabric/connection/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..29f30f90 --- /dev/null +++ b/examples/fabric/connection/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_1 +runtime: dotnet diff --git a/examples/fabric/connection/example_1/csharp/equinix-fabric-connection-example_1.csproj b/examples/fabric/connection/example_1/csharp/equinix-fabric-connection-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_1/csharp/equinix-fabric-connection-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_1/go/Pulumi.yaml b/examples/fabric/connection/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..b3b99127 --- /dev/null +++ b/examples/fabric/connection/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_1 +runtime: go diff --git a/examples/fabric/connection/example_1/go/go.mod b/examples/fabric/connection/example_1/go/go.mod new file mode 100644 index 00000000..f6a6c98e --- /dev/null +++ b/examples/fabric/connection/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_1/go/main.go b/examples/fabric/connection/example_1/go/main.go new file mode 100644 index 00000000..bf6227a1 --- /dev/null +++ b/examples/fabric/connection/example_1/go/main.go @@ -0,0 +1,60 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "port2port", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(1976), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(3711), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_1/java/Pulumi.yaml b/examples/fabric/connection/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..a69d47ef --- /dev/null +++ b/examples/fabric/connection/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_1 +runtime: java diff --git a/examples/fabric/connection/example_1/java/pom.xml b/examples/fabric/connection/example_1/java/pom.xml new file mode 100644 index 00000000..3d6d432e --- /dev/null +++ b/examples/fabric/connection/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_1/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..be57caf3 --- /dev/null +++ b/examples/fabric/connection/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,75 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var port2Port = new Connection("port2Port", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("1976") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("3711") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/fabric/connection/python/.gitignore b/examples/fabric/connection/example_1/python/.gitignore similarity index 100% rename from examples/fabric/connection/python/.gitignore rename to examples/fabric/connection/example_1/python/.gitignore diff --git a/examples/fabric/connection/example_1/python/Pulumi.yaml b/examples/fabric/connection/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..87789464 --- /dev/null +++ b/examples/fabric/connection/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_1 +runtime: python diff --git a/examples/fabric/connection/example_1/python/__main__.py b/examples/fabric/connection/example_1/python/__main__.py new file mode 100644 index 00000000..3eb0cab0 --- /dev/null +++ b/examples/fabric/connection/example_1/python/__main__.py @@ -0,0 +1,44 @@ +import pulumi +import pulumi_equinix as equinix + +port2_port = equinix.fabric.Connection("port2port", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=1976, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=3711, + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_1/python/requirements.txt b/examples/fabric/connection/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/fabric/connection/typescript/.gitignore b/examples/fabric/connection/example_1/typescript/.gitignore similarity index 100% rename from examples/fabric/connection/typescript/.gitignore rename to examples/fabric/connection/example_1/typescript/.gitignore diff --git a/examples/fabric/connection/example_1/typescript/Pulumi.yaml b/examples/fabric/connection/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..9d919fa2 --- /dev/null +++ b/examples/fabric/connection/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_1 +runtime: nodejs diff --git a/examples/fabric/connection/example_1/typescript/index.ts b/examples/fabric/connection/example_1/typescript/index.ts new file mode 100644 index 00000000..3203e7bf --- /dev/null +++ b/examples/fabric/connection/example_1/typescript/index.ts @@ -0,0 +1,45 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const port2Port = new equinix.fabric.Connection("port2port", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 1976, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 3711, + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_1/typescript/package.json b/examples/fabric/connection/example_1/typescript/package.json new file mode 100644 index 00000000..d8d25a07 --- /dev/null +++ b/examples/fabric/connection/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/typescript/tsconfig.json b/examples/fabric/connection/example_1/typescript/tsconfig.json similarity index 100% rename from examples/fabric/routing_protocol/typescript/tsconfig.json rename to examples/fabric/connection/example_1/typescript/tsconfig.json diff --git a/examples/fabric/connection/example_10/Pulumi.yaml b/examples/fabric/connection/example_10/Pulumi.yaml new file mode 100644 index 00000000..1b14c821 --- /dev/null +++ b/examples/fabric/connection/example_10/Pulumi.yaml @@ -0,0 +1,35 @@ +name: equinix-fabric-connection-example_10 +runtime: yaml +resources: + vd2azure: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 7 + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV diff --git a/examples/fabric/routing_protocol/csharp/.gitignore b/examples/fabric/connection/example_10/csharp/.gitignore similarity index 100% rename from examples/fabric/routing_protocol/csharp/.gitignore rename to examples/fabric/connection/example_10/csharp/.gitignore diff --git a/examples/fabric/connection/example_10/csharp/Program.cs b/examples/fabric/connection/example_10/csharp/Program.cs new file mode 100644 index 00000000..c0eeffa7 --- /dev/null +++ b/examples/fabric/connection/example_10/csharp/Program.cs @@ -0,0 +1,67 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2Azure = new Equinix.Fabric.Connection("vd2azure", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "CLOUD", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_10/csharp/Pulumi.yaml b/examples/fabric/connection/example_10/csharp/Pulumi.yaml new file mode 100644 index 00000000..b0482240 --- /dev/null +++ b/examples/fabric/connection/example_10/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_10 +runtime: dotnet diff --git a/examples/fabric/connection/example_10/csharp/equinix-fabric-connection-example_10.csproj b/examples/fabric/connection/example_10/csharp/equinix-fabric-connection-example_10.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_10/csharp/equinix-fabric-connection-example_10.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_10/go/Pulumi.yaml b/examples/fabric/connection/example_10/go/Pulumi.yaml new file mode 100644 index 00000000..9b7f5cf5 --- /dev/null +++ b/examples/fabric/connection/example_10/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_10 +runtime: go diff --git a/examples/fabric/connection/example_10/go/go.mod b/examples/fabric/connection/example_10/go/go.mod new file mode 100644 index 00000000..20881710 --- /dev/null +++ b/examples/fabric/connection/example_10/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_10 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_10/go/main.go b/examples/fabric/connection/example_10/go/main.go new file mode 100644 index 00000000..cba448ff --- /dev/null +++ b/examples/fabric/connection/example_10/go/main.go @@ -0,0 +1,60 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "vd2azure", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_10/java/Pulumi.yaml b/examples/fabric/connection/example_10/java/Pulumi.yaml new file mode 100644 index 00000000..823d0723 --- /dev/null +++ b/examples/fabric/connection/example_10/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_10 +runtime: java diff --git a/examples/fabric/connection/example_10/java/pom.xml b/examples/fabric/connection/example_10/java/pom.xml new file mode 100644 index 00000000..435fb164 --- /dev/null +++ b/examples/fabric/connection/example_10/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_10 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_10/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_10/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..4497b3df --- /dev/null +++ b/examples/fabric/connection/example_10/java/src/main/java/generated_program/App.java @@ -0,0 +1,74 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2Azure = new Connection("vd2Azure", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .peeringType("PRIVATE") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/fabric/routing_protocol/python/.gitignore b/examples/fabric/connection/example_10/python/.gitignore similarity index 100% rename from examples/fabric/routing_protocol/python/.gitignore rename to examples/fabric/connection/example_10/python/.gitignore diff --git a/examples/fabric/connection/example_10/python/Pulumi.yaml b/examples/fabric/connection/example_10/python/Pulumi.yaml new file mode 100644 index 00000000..a3ff6072 --- /dev/null +++ b/examples/fabric/connection/example_10/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_10 +runtime: python diff --git a/examples/fabric/connection/example_10/python/__main__.py b/examples/fabric/connection/example_10/python/__main__.py new file mode 100644 index 00000000..93a9e4a8 --- /dev/null +++ b/examples/fabric/connection/example_10/python/__main__.py @@ -0,0 +1,44 @@ +import pulumi +import pulumi_equinix as equinix + +vd2_azure = equinix.fabric.Connection("vd2azure", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_10/python/requirements.txt b/examples/fabric/connection/example_10/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_10/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/fabric/routing_protocol/typescript/.gitignore b/examples/fabric/connection/example_10/typescript/.gitignore similarity index 100% rename from examples/fabric/routing_protocol/typescript/.gitignore rename to examples/fabric/connection/example_10/typescript/.gitignore diff --git a/examples/fabric/connection/example_10/typescript/Pulumi.yaml b/examples/fabric/connection/example_10/typescript/Pulumi.yaml new file mode 100644 index 00000000..f7c6cbcd --- /dev/null +++ b/examples/fabric/connection/example_10/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_10 +runtime: nodejs diff --git a/examples/fabric/connection/example_10/typescript/index.ts b/examples/fabric/connection/example_10/typescript/index.ts new file mode 100644 index 00000000..e277ece9 --- /dev/null +++ b/examples/fabric/connection/example_10/typescript/index.ts @@ -0,0 +1,45 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2Azure = new equinix.fabric.Connection("vd2azure", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "CLOUD", + id: 7, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_10/typescript/package.json b/examples/fabric/connection/example_10/typescript/package.json new file mode 100644 index 00000000..5587d9cb --- /dev/null +++ b/examples/fabric/connection/example_10/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_10", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_10/typescript/tsconfig.json b/examples/fabric/connection/example_10/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_10/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_11/Pulumi.yaml b/examples/fabric/connection/example_11/Pulumi.yaml new file mode 100644 index 00000000..2a982548 --- /dev/null +++ b/examples/fabric/connection/example_11/Pulumi.yaml @@ -0,0 +1,74 @@ +name: equinix-fabric-connection-example_11 +runtime: yaml +resources: + vd2azurePrimary: + type: equinix:fabric:Connection + name: vd2azure_primary + properties: + name: ConnectionName + type: EVPL_VC + redundancy: + priority: PRIMARY + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 7 + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV + vd2azureSecondary: + type: equinix:fabric:Connection + name: vd2azure_secondary + properties: + name: ConnectionName + type: EVPL_VC + redundancy: + priority: SECONDARY + group: ${vd2azurePrimary.redundancy.group} + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 5 + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV diff --git a/examples/metal/connection/fabric_billed/csharp/.gitignore b/examples/fabric/connection/example_11/csharp/.gitignore similarity index 100% rename from examples/metal/connection/fabric_billed/csharp/.gitignore rename to examples/fabric/connection/example_11/csharp/.gitignore diff --git a/examples/fabric/connection/example_11/csharp/Program.cs b/examples/fabric/connection/example_11/csharp/Program.cs new file mode 100644 index 00000000..fa7c7d58 --- /dev/null +++ b/examples/fabric/connection/example_11/csharp/Program.cs @@ -0,0 +1,134 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2AzurePrimary = new Equinix.Fabric.Connection("vd2azurePrimary", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + { + Priority = "PRIMARY", + }, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "CLOUD", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + + var vd2AzureSecondary = new Equinix.Fabric.Connection("vd2azureSecondary", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + { + Priority = "SECONDARY", + Group = vd2AzurePrimary.Redundancy.Apply(redundancy => redundancy?.Group), + }, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "CLOUD", + Id = 5, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_11/csharp/Pulumi.yaml b/examples/fabric/connection/example_11/csharp/Pulumi.yaml new file mode 100644 index 00000000..4076bba6 --- /dev/null +++ b/examples/fabric/connection/example_11/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_11 +runtime: dotnet diff --git a/examples/fabric/connection/example_11/csharp/equinix-fabric-connection-example_11.csproj b/examples/fabric/connection/example_11/csharp/equinix-fabric-connection-example_11.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_11/csharp/equinix-fabric-connection-example_11.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_11/go/Pulumi.yaml b/examples/fabric/connection/example_11/go/Pulumi.yaml new file mode 100644 index 00000000..15dd1f7d --- /dev/null +++ b/examples/fabric/connection/example_11/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_11 +runtime: go diff --git a/examples/fabric/connection/example_11/go/go.mod b/examples/fabric/connection/example_11/go/go.mod new file mode 100644 index 00000000..fc0b26db --- /dev/null +++ b/examples/fabric/connection/example_11/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_11 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_11/go/main.go b/examples/fabric/connection/example_11/go/main.go new file mode 100644 index 00000000..f8aa9c14 --- /dev/null +++ b/examples/fabric/connection/example_11/go/main.go @@ -0,0 +1,116 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + vd2AzurePrimary, err := fabric.NewConnection(ctx, "vd2azurePrimary", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Redundancy: &fabric.ConnectionRedundancyArgs{ + Priority: pulumi.String("PRIMARY"), + }, + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + _, err = fabric.NewConnection(ctx, "vd2azureSecondary", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Redundancy: &fabric.ConnectionRedundancyArgs{ + Priority: pulumi.String("SECONDARY"), + Group: vd2AzurePrimary.Redundancy.ApplyT(func(redundancy fabric.ConnectionRedundancy) (*string, error) { + return &redundancy.Group, nil + }).(pulumi.StringPtrOutput), + }, + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(5), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_11/java/Pulumi.yaml b/examples/fabric/connection/example_11/java/Pulumi.yaml new file mode 100644 index 00000000..81d9de80 --- /dev/null +++ b/examples/fabric/connection/example_11/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_11 +runtime: java diff --git a/examples/fabric/connection/example_11/java/pom.xml b/examples/fabric/connection/example_11/java/pom.xml new file mode 100644 index 00000000..0f65fb24 --- /dev/null +++ b/examples/fabric/connection/example_11/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_11 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_11/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_11/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..846ba7e3 --- /dev/null +++ b/examples/fabric/connection/example_11/java/src/main/java/generated_program/App.java @@ -0,0 +1,124 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2AzurePrimary = new Connection("vd2AzurePrimary", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .redundancy(ConnectionRedundancyArgs.builder() + .priority("PRIMARY") + .build()) + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .peeringType("PRIVATE") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + var vd2AzureSecondary = new Connection("vd2AzureSecondary", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .redundancy(ConnectionRedundancyArgs.builder() + .priority("SECONDARY") + .group(vd2AzurePrimary.redundancy().applyValue(redundancy -> redundancy.group())) + .build()) + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(5) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .peeringType("PRIVATE") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/connection/fabric_billed/python/.gitignore b/examples/fabric/connection/example_11/python/.gitignore similarity index 100% rename from examples/metal/connection/fabric_billed/python/.gitignore rename to examples/fabric/connection/example_11/python/.gitignore diff --git a/examples/fabric/connection/example_11/python/Pulumi.yaml b/examples/fabric/connection/example_11/python/Pulumi.yaml new file mode 100644 index 00000000..e746ca9a --- /dev/null +++ b/examples/fabric/connection/example_11/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_11 +runtime: python diff --git a/examples/fabric/connection/example_11/python/__main__.py b/examples/fabric/connection/example_11/python/__main__.py new file mode 100644 index 00000000..23a75e42 --- /dev/null +++ b/examples/fabric/connection/example_11/python/__main__.py @@ -0,0 +1,92 @@ +import pulumi +import pulumi_equinix as equinix + +vd2_azure_primary = equinix.fabric.Connection("vd2azurePrimary", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + redundancy=equinix.fabric.ConnectionRedundancyArgs( + priority="PRIMARY", + ), + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) +vd2_azure_secondary = equinix.fabric.Connection("vd2azureSecondary", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + redundancy=equinix.fabric.ConnectionRedundancyArgs( + priority="SECONDARY", + group=vd2_azure_primary.redundancy.group, + ), + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=5, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_11/python/requirements.txt b/examples/fabric/connection/example_11/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_11/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/connection/fabric_billed/typescript/.gitignore b/examples/fabric/connection/example_11/typescript/.gitignore similarity index 100% rename from examples/metal/connection/fabric_billed/typescript/.gitignore rename to examples/fabric/connection/example_11/typescript/.gitignore diff --git a/examples/fabric/connection/example_11/typescript/Pulumi.yaml b/examples/fabric/connection/example_11/typescript/Pulumi.yaml new file mode 100644 index 00000000..75930980 --- /dev/null +++ b/examples/fabric/connection/example_11/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_11 +runtime: nodejs diff --git a/examples/fabric/connection/example_11/typescript/index.ts b/examples/fabric/connection/example_11/typescript/index.ts new file mode 100644 index 00000000..3ad34b00 --- /dev/null +++ b/examples/fabric/connection/example_11/typescript/index.ts @@ -0,0 +1,94 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2AzurePrimary = new equinix.fabric.Connection("vd2azurePrimary", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + redundancy: { + priority: "PRIMARY", + }, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "CLOUD", + id: 7, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); +const vd2AzureSecondary = new equinix.fabric.Connection("vd2azureSecondary", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + redundancy: { + priority: "SECONDARY", + group: vd2AzurePrimary.redundancy.apply(redundancy => redundancy?.group), + }, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "CLOUD", + id: 5, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_11/typescript/package.json b/examples/fabric/connection/example_11/typescript/package.json new file mode 100644 index 00000000..ee4fb235 --- /dev/null +++ b/examples/fabric/connection/example_11/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_11", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_11/typescript/tsconfig.json b/examples/fabric/connection/example_11/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_11/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_12/Pulumi.yaml b/examples/fabric/connection/example_12/Pulumi.yaml new file mode 100644 index 00000000..13234d1d --- /dev/null +++ b/examples/fabric/connection/example_12/Pulumi.yaml @@ -0,0 +1,26 @@ +name: equinix-fabric-connection-example_12 +runtime: yaml +resources: + fcr2network: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: IPWAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: CLOUD_ROUTER + router: + uuid: + zSide: + accessPoint: + type: NETWORK + network: + uuid: diff --git a/examples/metal/connection/metal_billed/csharp/.gitignore b/examples/fabric/connection/example_12/csharp/.gitignore similarity index 100% rename from examples/metal/connection/metal_billed/csharp/.gitignore rename to examples/fabric/connection/example_12/csharp/.gitignore diff --git a/examples/fabric/connection/example_12/csharp/Program.cs b/examples/fabric/connection/example_12/csharp/Program.cs new file mode 100644 index 00000000..e646612f --- /dev/null +++ b/examples/fabric/connection/example_12/csharp/Program.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var fcr2Network = new Equinix.Fabric.Connection("fcr2network", new() + { + Name = "ConnectionName", + Type = "IPWAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = "CLOUD_ROUTER", + Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_12/csharp/Pulumi.yaml b/examples/fabric/connection/example_12/csharp/Pulumi.yaml new file mode 100644 index 00000000..11f7ad04 --- /dev/null +++ b/examples/fabric/connection/example_12/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_12 +runtime: dotnet diff --git a/examples/fabric/connection/example_12/csharp/equinix-fabric-connection-example_12.csproj b/examples/fabric/connection/example_12/csharp/equinix-fabric-connection-example_12.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_12/csharp/equinix-fabric-connection-example_12.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_12/go/Pulumi.yaml b/examples/fabric/connection/example_12/go/Pulumi.yaml new file mode 100644 index 00000000..52e3c0be --- /dev/null +++ b/examples/fabric/connection/example_12/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_12 +runtime: go diff --git a/examples/fabric/connection/example_12/go/go.mod b/examples/fabric/connection/example_12/go/go.mod new file mode 100644 index 00000000..96ae8185 --- /dev/null +++ b/examples/fabric/connection/example_12/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_12 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_12/go/main.go b/examples/fabric/connection/example_12/go/main.go new file mode 100644 index 00000000..ac47ff57 --- /dev/null +++ b/examples/fabric/connection/example_12/go/main.go @@ -0,0 +1,48 @@ +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 { + _, err := fabric.NewConnection(ctx, "fcr2network", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("IPWAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String("CLOUD_ROUTER"), + Router: &fabric.ConnectionASideAccessPointRouterArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_12/java/Pulumi.yaml b/examples/fabric/connection/example_12/java/Pulumi.yaml new file mode 100644 index 00000000..a3f79b10 --- /dev/null +++ b/examples/fabric/connection/example_12/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_12 +runtime: java diff --git a/examples/fabric/connection/example_12/java/pom.xml b/examples/fabric/connection/example_12/java/pom.xml new file mode 100644 index 00000000..393452e6 --- /dev/null +++ b/examples/fabric/connection/example_12/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_12 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_12/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_12/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..97eebb89 --- /dev/null +++ b/examples/fabric/connection/example_12/java/src/main/java/generated_program/App.java @@ -0,0 +1,61 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var fcr2Network = new Connection("fcr2Network", ConnectionArgs.builder() + .name("ConnectionName") + .type("IPWAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("CLOUD_ROUTER") + .router(ConnectionASideAccessPointRouterArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/connection/metal_billed/python/.gitignore b/examples/fabric/connection/example_12/python/.gitignore similarity index 100% rename from examples/metal/connection/metal_billed/python/.gitignore rename to examples/fabric/connection/example_12/python/.gitignore diff --git a/examples/fabric/connection/example_12/python/Pulumi.yaml b/examples/fabric/connection/example_12/python/Pulumi.yaml new file mode 100644 index 00000000..5861435d --- /dev/null +++ b/examples/fabric/connection/example_12/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_12 +runtime: python diff --git a/examples/fabric/connection/example_12/python/__main__.py b/examples/fabric/connection/example_12/python/__main__.py new file mode 100644 index 00000000..194f99fe --- /dev/null +++ b/examples/fabric/connection/example_12/python/__main__.py @@ -0,0 +1,33 @@ +import pulumi +import pulumi_equinix as equinix + +fcr2_network = equinix.fabric.Connection("fcr2network", + name="ConnectionName", + type="IPWAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type="CLOUD_ROUTER", + router=equinix.fabric.ConnectionASideAccessPointRouterArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) diff --git a/examples/fabric/connection/example_12/python/requirements.txt b/examples/fabric/connection/example_12/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_12/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/connection/metal_billed/typescript/.gitignore b/examples/fabric/connection/example_12/typescript/.gitignore similarity index 100% rename from examples/metal/connection/metal_billed/typescript/.gitignore rename to examples/fabric/connection/example_12/typescript/.gitignore diff --git a/examples/fabric/connection/example_12/typescript/Pulumi.yaml b/examples/fabric/connection/example_12/typescript/Pulumi.yaml new file mode 100644 index 00000000..a73911fe --- /dev/null +++ b/examples/fabric/connection/example_12/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_12 +runtime: nodejs diff --git a/examples/fabric/connection/example_12/typescript/index.ts b/examples/fabric/connection/example_12/typescript/index.ts new file mode 100644 index 00000000..fb82e72a --- /dev/null +++ b/examples/fabric/connection/example_12/typescript/index.ts @@ -0,0 +1,34 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const fcr2Network = new equinix.fabric.Connection("fcr2network", { + name: "ConnectionName", + type: "IPWAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: "CLOUD_ROUTER", + router: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_12/typescript/package.json b/examples/fabric/connection/example_12/typescript/package.json new file mode 100644 index 00000000..7ab7ced0 --- /dev/null +++ b/examples/fabric/connection/example_12/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_12", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_12/typescript/tsconfig.json b/examples/fabric/connection/example_12/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_12/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_13/Pulumi.yaml b/examples/fabric/connection/example_13/Pulumi.yaml new file mode 100644 index 00000000..3e9d4946 --- /dev/null +++ b/examples/fabric/connection/example_13/Pulumi.yaml @@ -0,0 +1,30 @@ +name: equinix-fabric-connection-example_13 +runtime: yaml +resources: + vd2token: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPLAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: CLOUD + id: 7 + zSide: + accessPoint: + type: NETWORK + network: + uuid: diff --git a/examples/metal/device/csharp/.gitignore b/examples/fabric/connection/example_13/csharp/.gitignore similarity index 100% rename from examples/metal/device/csharp/.gitignore rename to examples/fabric/connection/example_13/csharp/.gitignore diff --git a/examples/fabric/connection/example_13/csharp/Program.cs b/examples/fabric/connection/example_13/csharp/Program.cs new file mode 100644 index 00000000..12a5e29b --- /dev/null +++ b/examples/fabric/connection/example_13/csharp/Program.cs @@ -0,0 +1,60 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2Token = new Equinix.Fabric.Connection("vd2token", new() + { + Name = "ConnectionName", + Type = "EVPLAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "CLOUD", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_13/csharp/Pulumi.yaml b/examples/fabric/connection/example_13/csharp/Pulumi.yaml new file mode 100644 index 00000000..f4517828 --- /dev/null +++ b/examples/fabric/connection/example_13/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_13 +runtime: dotnet diff --git a/examples/fabric/connection/example_13/csharp/equinix-fabric-connection-example_13.csproj b/examples/fabric/connection/example_13/csharp/equinix-fabric-connection-example_13.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_13/csharp/equinix-fabric-connection-example_13.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_13/go/Pulumi.yaml b/examples/fabric/connection/example_13/go/Pulumi.yaml new file mode 100644 index 00000000..964f5483 --- /dev/null +++ b/examples/fabric/connection/example_13/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_13 +runtime: go diff --git a/examples/fabric/connection/example_13/go/go.mod b/examples/fabric/connection/example_13/go/go.mod new file mode 100644 index 00000000..6d97d68f --- /dev/null +++ b/examples/fabric/connection/example_13/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_13 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_13/go/main.go b/examples/fabric/connection/example_13/go/main.go new file mode 100644 index 00000000..7196b5d5 --- /dev/null +++ b/examples/fabric/connection/example_13/go/main.go @@ -0,0 +1,53 @@ +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 { + _, err := fabric.NewConnection(ctx, "vd2token", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("EVPLAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("CLOUD"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_13/java/Pulumi.yaml b/examples/fabric/connection/example_13/java/Pulumi.yaml new file mode 100644 index 00000000..8d649aa1 --- /dev/null +++ b/examples/fabric/connection/example_13/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_13 +runtime: java diff --git a/examples/fabric/connection/example_13/java/pom.xml b/examples/fabric/connection/example_13/java/pom.xml new file mode 100644 index 00000000..78d2cb32 --- /dev/null +++ b/examples/fabric/connection/example_13/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_13 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_13/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_13/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..3c20c3d7 --- /dev/null +++ b/examples/fabric/connection/example_13/java/src/main/java/generated_program/App.java @@ -0,0 +1,67 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2Token = new Connection("vd2Token", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPLAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("CLOUD") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/device/python/.gitignore b/examples/fabric/connection/example_13/python/.gitignore similarity index 100% rename from examples/metal/device/python/.gitignore rename to examples/fabric/connection/example_13/python/.gitignore diff --git a/examples/fabric/connection/example_13/python/Pulumi.yaml b/examples/fabric/connection/example_13/python/Pulumi.yaml new file mode 100644 index 00000000..ea435397 --- /dev/null +++ b/examples/fabric/connection/example_13/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_13 +runtime: python diff --git a/examples/fabric/connection/example_13/python/__main__.py b/examples/fabric/connection/example_13/python/__main__.py new file mode 100644 index 00000000..45e69ab4 --- /dev/null +++ b/examples/fabric/connection/example_13/python/__main__.py @@ -0,0 +1,38 @@ +import pulumi +import pulumi_equinix as equinix + +vd2_token = equinix.fabric.Connection("vd2token", + name="ConnectionName", + type="EVPLAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="CLOUD", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) diff --git a/examples/fabric/connection/example_13/python/requirements.txt b/examples/fabric/connection/example_13/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_13/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/device/typescript/.gitignore b/examples/fabric/connection/example_13/typescript/.gitignore similarity index 100% rename from examples/metal/device/typescript/.gitignore rename to examples/fabric/connection/example_13/typescript/.gitignore diff --git a/examples/fabric/connection/example_13/typescript/Pulumi.yaml b/examples/fabric/connection/example_13/typescript/Pulumi.yaml new file mode 100644 index 00000000..8dc54e8f --- /dev/null +++ b/examples/fabric/connection/example_13/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_13 +runtime: nodejs diff --git a/examples/fabric/connection/example_13/typescript/index.ts b/examples/fabric/connection/example_13/typescript/index.ts new file mode 100644 index 00000000..90666cd2 --- /dev/null +++ b/examples/fabric/connection/example_13/typescript/index.ts @@ -0,0 +1,39 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2Token = new equinix.fabric.Connection("vd2token", { + name: "ConnectionName", + type: "EVPLAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "CLOUD", + id: 7, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_13/typescript/package.json b/examples/fabric/connection/example_13/typescript/package.json new file mode 100644 index 00000000..f53b754f --- /dev/null +++ b/examples/fabric/connection/example_13/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_13", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_13/typescript/tsconfig.json b/examples/fabric/connection/example_13/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_13/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_14/Pulumi.yaml b/examples/fabric/connection/example_14/Pulumi.yaml new file mode 100644 index 00000000..185c47af --- /dev/null +++ b/examples/fabric/connection/example_14/Pulumi.yaml @@ -0,0 +1,26 @@ +name: equinix-fabric-connection-example_14 +runtime: yaml +resources: + epl: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EPLAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + zSide: + accessPoint: + type: NETWORK + network: + uuid: diff --git a/examples/metal/gateway/csharp/.gitignore b/examples/fabric/connection/example_14/csharp/.gitignore similarity index 100% rename from examples/metal/gateway/csharp/.gitignore rename to examples/fabric/connection/example_14/csharp/.gitignore diff --git a/examples/fabric/connection/example_14/csharp/Program.cs b/examples/fabric/connection/example_14/csharp/Program.cs new file mode 100644 index 00000000..5ca40f08 --- /dev/null +++ b/examples/fabric/connection/example_14/csharp/Program.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var epl = new Equinix.Fabric.Connection("epl", new() + { + Name = "ConnectionName", + Type = "EPLAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_14/csharp/Pulumi.yaml b/examples/fabric/connection/example_14/csharp/Pulumi.yaml new file mode 100644 index 00000000..f520ae90 --- /dev/null +++ b/examples/fabric/connection/example_14/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_14 +runtime: dotnet diff --git a/examples/fabric/connection/example_14/csharp/equinix-fabric-connection-example_14.csproj b/examples/fabric/connection/example_14/csharp/equinix-fabric-connection-example_14.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_14/csharp/equinix-fabric-connection-example_14.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_14/go/Pulumi.yaml b/examples/fabric/connection/example_14/go/Pulumi.yaml new file mode 100644 index 00000000..ee7bfffd --- /dev/null +++ b/examples/fabric/connection/example_14/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_14 +runtime: go diff --git a/examples/fabric/connection/example_14/go/go.mod b/examples/fabric/connection/example_14/go/go.mod new file mode 100644 index 00000000..75d61553 --- /dev/null +++ b/examples/fabric/connection/example_14/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_14 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_14/go/main.go b/examples/fabric/connection/example_14/go/main.go new file mode 100644 index 00000000..48246fba --- /dev/null +++ b/examples/fabric/connection/example_14/go/main.go @@ -0,0 +1,48 @@ +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 { + _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("EPLAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_14/java/Pulumi.yaml b/examples/fabric/connection/example_14/java/Pulumi.yaml new file mode 100644 index 00000000..848cbf12 --- /dev/null +++ b/examples/fabric/connection/example_14/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_14 +runtime: java diff --git a/examples/fabric/connection/example_14/java/pom.xml b/examples/fabric/connection/example_14/java/pom.xml new file mode 100644 index 00000000..a81fd79b --- /dev/null +++ b/examples/fabric/connection/example_14/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_14 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_14/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_14/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..c796b8c4 --- /dev/null +++ b/examples/fabric/connection/example_14/java/src/main/java/generated_program/App.java @@ -0,0 +1,61 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var epl = new Connection("epl", ConnectionArgs.builder() + .name("ConnectionName") + .type("EPLAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/gateway/python/.gitignore b/examples/fabric/connection/example_14/python/.gitignore similarity index 100% rename from examples/metal/gateway/python/.gitignore rename to examples/fabric/connection/example_14/python/.gitignore diff --git a/examples/fabric/connection/example_14/python/Pulumi.yaml b/examples/fabric/connection/example_14/python/Pulumi.yaml new file mode 100644 index 00000000..f81408ba --- /dev/null +++ b/examples/fabric/connection/example_14/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_14 +runtime: python diff --git a/examples/fabric/connection/example_14/python/__main__.py b/examples/fabric/connection/example_14/python/__main__.py new file mode 100644 index 00000000..84b1406c --- /dev/null +++ b/examples/fabric/connection/example_14/python/__main__.py @@ -0,0 +1,33 @@ +import pulumi +import pulumi_equinix as equinix + +epl = equinix.fabric.Connection("epl", + name="ConnectionName", + type="EPLAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) diff --git a/examples/fabric/connection/example_14/python/requirements.txt b/examples/fabric/connection/example_14/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_14/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/gateway/typescript/.gitignore b/examples/fabric/connection/example_14/typescript/.gitignore similarity index 100% rename from examples/metal/gateway/typescript/.gitignore rename to examples/fabric/connection/example_14/typescript/.gitignore diff --git a/examples/fabric/connection/example_14/typescript/Pulumi.yaml b/examples/fabric/connection/example_14/typescript/Pulumi.yaml new file mode 100644 index 00000000..46e1baa6 --- /dev/null +++ b/examples/fabric/connection/example_14/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_14 +runtime: nodejs diff --git a/examples/fabric/connection/example_14/typescript/index.ts b/examples/fabric/connection/example_14/typescript/index.ts new file mode 100644 index 00000000..96202f8c --- /dev/null +++ b/examples/fabric/connection/example_14/typescript/index.ts @@ -0,0 +1,34 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const epl = new equinix.fabric.Connection("epl", { + name: "ConnectionName", + type: "EPLAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_14/typescript/package.json b/examples/fabric/connection/example_14/typescript/package.json new file mode 100644 index 00000000..3b6c55f3 --- /dev/null +++ b/examples/fabric/connection/example_14/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_14", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_14/typescript/tsconfig.json b/examples/fabric/connection/example_14/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_14/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_15/Pulumi.yaml b/examples/fabric/connection/example_15/Pulumi.yaml new file mode 100644 index 00000000..337acc54 --- /dev/null +++ b/examples/fabric/connection/example_15/Pulumi.yaml @@ -0,0 +1,29 @@ +name: equinix-fabric-connection-example_15 +runtime: yaml +resources: + epl: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPLAN_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: DOT1Q + vlanSTag: '1976' + zSide: + accessPoint: + type: NETWORK + network: + uuid: diff --git a/examples/metal/organization_member/csharp/.gitignore b/examples/fabric/connection/example_15/csharp/.gitignore similarity index 100% rename from examples/metal/organization_member/csharp/.gitignore rename to examples/fabric/connection/example_15/csharp/.gitignore diff --git a/examples/fabric/connection/example_15/csharp/Program.cs b/examples/fabric/connection/example_15/csharp/Program.cs new file mode 100644 index 00000000..319e1510 --- /dev/null +++ b/examples/fabric/connection/example_15/csharp/Program.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var epl = new Equinix.Fabric.Connection("epl", new() + { + Name = "ConnectionName", + Type = "EVPLAN_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + VlanSTag = 1976, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Network, + Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + { + Uuid = "", + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_15/csharp/Pulumi.yaml b/examples/fabric/connection/example_15/csharp/Pulumi.yaml new file mode 100644 index 00000000..f0e39e65 --- /dev/null +++ b/examples/fabric/connection/example_15/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_15 +runtime: dotnet diff --git a/examples/fabric/connection/example_15/csharp/equinix-fabric-connection-example_15.csproj b/examples/fabric/connection/example_15/csharp/equinix-fabric-connection-example_15.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_15/csharp/equinix-fabric-connection-example_15.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_15/go/Pulumi.yaml b/examples/fabric/connection/example_15/go/Pulumi.yaml new file mode 100644 index 00000000..5beb274d --- /dev/null +++ b/examples/fabric/connection/example_15/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_15 +runtime: go diff --git a/examples/fabric/connection/example_15/go/go.mod b/examples/fabric/connection/example_15/go/go.mod new file mode 100644 index 00000000..e844fb7a --- /dev/null +++ b/examples/fabric/connection/example_15/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_15 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_15/go/main.go b/examples/fabric/connection/example_15/go/main.go new file mode 100644 index 00000000..229e252b --- /dev/null +++ b/examples/fabric/connection/example_15/go/main.go @@ -0,0 +1,52 @@ +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 { + _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("EVPLAN_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), + VlanSTag: pulumi.Int(1976), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeNetwork), + Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_15/java/Pulumi.yaml b/examples/fabric/connection/example_15/java/Pulumi.yaml new file mode 100644 index 00000000..e0ef9c74 --- /dev/null +++ b/examples/fabric/connection/example_15/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_15 +runtime: java diff --git a/examples/fabric/connection/example_15/java/pom.xml b/examples/fabric/connection/example_15/java/pom.xml new file mode 100644 index 00000000..3623dd00 --- /dev/null +++ b/examples/fabric/connection/example_15/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_15 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_15/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_15/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..3c2972f2 --- /dev/null +++ b/examples/fabric/connection/example_15/java/src/main/java/generated_program/App.java @@ -0,0 +1,66 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var epl = new Connection("epl", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPLAN_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("DOT1Q") + .vlanSTag("1976") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("NETWORK") + .network(ConnectionZSideAccessPointNetworkArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/organization_member/python/.gitignore b/examples/fabric/connection/example_15/python/.gitignore similarity index 100% rename from examples/metal/organization_member/python/.gitignore rename to examples/fabric/connection/example_15/python/.gitignore diff --git a/examples/fabric/connection/example_15/python/Pulumi.yaml b/examples/fabric/connection/example_15/python/Pulumi.yaml new file mode 100644 index 00000000..518acc15 --- /dev/null +++ b/examples/fabric/connection/example_15/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_15 +runtime: python diff --git a/examples/fabric/connection/example_15/python/__main__.py b/examples/fabric/connection/example_15/python/__main__.py new file mode 100644 index 00000000..da9ccce8 --- /dev/null +++ b/examples/fabric/connection/example_15/python/__main__.py @@ -0,0 +1,37 @@ +import pulumi +import pulumi_equinix as equinix + +epl = equinix.fabric.Connection("epl", + name="ConnectionName", + type="EVPLAN_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q, + vlan_s_tag=1976, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.NETWORK, + network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs( + uuid="", + ), + ), + )) diff --git a/examples/fabric/connection/example_15/python/requirements.txt b/examples/fabric/connection/example_15/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_15/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/organization_member/typescript/.gitignore b/examples/fabric/connection/example_15/typescript/.gitignore similarity index 100% rename from examples/metal/organization_member/typescript/.gitignore rename to examples/fabric/connection/example_15/typescript/.gitignore diff --git a/examples/fabric/connection/example_15/typescript/Pulumi.yaml b/examples/fabric/connection/example_15/typescript/Pulumi.yaml new file mode 100644 index 00000000..9774bf19 --- /dev/null +++ b/examples/fabric/connection/example_15/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_15 +runtime: nodejs diff --git a/examples/fabric/connection/example_15/typescript/index.ts b/examples/fabric/connection/example_15/typescript/index.ts new file mode 100644 index 00000000..6484ed30 --- /dev/null +++ b/examples/fabric/connection/example_15/typescript/index.ts @@ -0,0 +1,38 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const epl = new equinix.fabric.Connection("epl", { + name: "ConnectionName", + type: "EVPLAN_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.Dot1q, + vlanSTag: 1976, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Network, + network: { + uuid: "", + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_15/typescript/package.json b/examples/fabric/connection/example_15/typescript/package.json new file mode 100644 index 00000000..745bb79a --- /dev/null +++ b/examples/fabric/connection/example_15/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_15", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_15/typescript/tsconfig.json b/examples/fabric/connection/example_15/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_15/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_2/Pulumi.yaml b/examples/fabric/connection/example_2/Pulumi.yaml new file mode 100644 index 00000000..9bdee50b --- /dev/null +++ b/examples/fabric/connection/example_2/Pulumi.yaml @@ -0,0 +1,42 @@ +name: equinix-fabric-connection-example_2 +runtime: yaml +resources: + port2aws: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + redundancy: + priority: PRIMARY + order: + purchaseOrderNumber: 1-323929 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '2019' + vlanCTag: '2112' + zSide: + accessPoint: + type: SP + authenticationKey: + sellerRegion: us-west-1 + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV + additionalInfo: + - key: accessKey + value: + - key: secretKey + value: diff --git a/examples/metal/port/hybrid_bonded/csharp/.gitignore b/examples/fabric/connection/example_2/csharp/.gitignore similarity index 100% rename from examples/metal/port/hybrid_bonded/csharp/.gitignore rename to examples/fabric/connection/example_2/csharp/.gitignore diff --git a/examples/fabric/connection/example_2/csharp/Program.cs b/examples/fabric/connection/example_2/csharp/Program.cs new file mode 100644 index 00000000..1c94f11b --- /dev/null +++ b/examples/fabric/connection/example_2/csharp/Program.cs @@ -0,0 +1,84 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var port2Aws = new Equinix.Fabric.Connection("port2aws", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + { + Priority = "PRIMARY", + }, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323929", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 2019, + VlanCTag = 2112, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + SellerRegion = "us-west-1", + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + AdditionalInfo = new[] + { + + { + { "key", "accessKey" }, + { "value", "" }, + }, + + { + { "key", "secretKey" }, + { "value", "" }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_2/csharp/Pulumi.yaml b/examples/fabric/connection/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..cdc574ac --- /dev/null +++ b/examples/fabric/connection/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_2 +runtime: dotnet diff --git a/examples/fabric/connection/example_2/csharp/equinix-fabric-connection-example_2.csproj b/examples/fabric/connection/example_2/csharp/equinix-fabric-connection-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_2/csharp/equinix-fabric-connection-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_2/go/Pulumi.yaml b/examples/fabric/connection/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..add3b3cc --- /dev/null +++ b/examples/fabric/connection/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_2 +runtime: go diff --git a/examples/fabric/connection/example_2/go/go.mod b/examples/fabric/connection/example_2/go/go.mod new file mode 100644 index 00000000..9d4f90e0 --- /dev/null +++ b/examples/fabric/connection/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_2/go/main.go b/examples/fabric/connection/example_2/go/main.go new file mode 100644 index 00000000..dd2c9eb9 --- /dev/null +++ b/examples/fabric/connection/example_2/go/main.go @@ -0,0 +1,73 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "port2aws", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Redundancy: &fabric.ConnectionRedundancyArgs{ + Priority: pulumi.String("PRIMARY"), + }, + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323929"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(2019), + VlanCTag: pulumi.Int(2112), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + SellerRegion: pulumi.String("us-west-1"), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + AdditionalInfo: pulumi.MapArray{ + pulumi.Map{ + "key": pulumi.Any("accessKey"), + "value": pulumi.Any(""), + }, + pulumi.Map{ + "key": pulumi.Any("secretKey"), + "value": pulumi.Any(""), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_2/java/Pulumi.yaml b/examples/fabric/connection/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..c03031f8 --- /dev/null +++ b/examples/fabric/connection/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_2 +runtime: java diff --git a/examples/fabric/connection/example_2/java/pom.xml b/examples/fabric/connection/example_2/java/pom.xml new file mode 100644 index 00000000..1d890874 --- /dev/null +++ b/examples/fabric/connection/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_2/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..db5ed6d5 --- /dev/null +++ b/examples/fabric/connection/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,87 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var port2Aws = new Connection("port2Aws", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .redundancy(ConnectionRedundancyArgs.builder() + .priority("PRIMARY") + .build()) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323929") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("2019") + .vlanCTag("2112") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .sellerRegion("us-west-1") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .additionalInfo( + Map.ofEntries( + Map.entry("key", "accessKey"), + Map.entry("value", "") + ), + Map.ofEntries( + Map.entry("key", "secretKey"), + Map.entry("value", "") + )) + .build()); + + } +} diff --git a/examples/metal/port/hybrid_bonded/python/.gitignore b/examples/fabric/connection/example_2/python/.gitignore similarity index 100% rename from examples/metal/port/hybrid_bonded/python/.gitignore rename to examples/fabric/connection/example_2/python/.gitignore diff --git a/examples/fabric/connection/example_2/python/Pulumi.yaml b/examples/fabric/connection/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..1087316a --- /dev/null +++ b/examples/fabric/connection/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_2 +runtime: python diff --git a/examples/fabric/connection/example_2/python/__main__.py b/examples/fabric/connection/example_2/python/__main__.py new file mode 100644 index 00000000..aa124fff --- /dev/null +++ b/examples/fabric/connection/example_2/python/__main__.py @@ -0,0 +1,57 @@ +import pulumi +import pulumi_equinix as equinix + +port2_aws = equinix.fabric.Connection("port2aws", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + redundancy=equinix.fabric.ConnectionRedundancyArgs( + priority="PRIMARY", + ), + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323929", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=2019, + vlan_c_tag=2112, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + seller_region="us-west-1", + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + ), + additional_info=[ + { + "key": "accessKey", + "value": "", + }, + { + "key": "secretKey", + "value": "", + }, + ]) diff --git a/examples/fabric/connection/example_2/python/requirements.txt b/examples/fabric/connection/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/port/hybrid_bonded/typescript/.gitignore b/examples/fabric/connection/example_2/typescript/.gitignore similarity index 100% rename from examples/metal/port/hybrid_bonded/typescript/.gitignore rename to examples/fabric/connection/example_2/typescript/.gitignore diff --git a/examples/fabric/connection/example_2/typescript/Pulumi.yaml b/examples/fabric/connection/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..0f5190d6 --- /dev/null +++ b/examples/fabric/connection/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_2 +runtime: nodejs diff --git a/examples/fabric/connection/example_2/typescript/index.ts b/examples/fabric/connection/example_2/typescript/index.ts new file mode 100644 index 00000000..b0891a1b --- /dev/null +++ b/examples/fabric/connection/example_2/typescript/index.ts @@ -0,0 +1,58 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const port2Aws = new equinix.fabric.Connection("port2aws", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + redundancy: { + priority: "PRIMARY", + }, + order: { + purchaseOrderNumber: "1-323929", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 2019, + vlanCTag: 2112, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + sellerRegion: "us-west-1", + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, + additionalInfo: [ + { + key: "accessKey", + value: "", + }, + { + key: "secretKey", + value: "", + }, + ], +}); diff --git a/examples/fabric/connection/example_2/typescript/package.json b/examples/fabric/connection/example_2/typescript/package.json new file mode 100644 index 00000000..388b8504 --- /dev/null +++ b/examples/fabric/connection/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_2/typescript/tsconfig.json b/examples/fabric/connection/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_3/Pulumi.yaml b/examples/fabric/connection/example_3/Pulumi.yaml new file mode 100644 index 00000000..b5b966c6 --- /dev/null +++ b/examples/fabric/connection/example_3/Pulumi.yaml @@ -0,0 +1,28 @@ +name: equinix-fabric-connection-example_3 +runtime: yaml +resources: + epl: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + zSide: + accessPoint: + type: COLO + port: + uuid: + location: + metroCode: SV diff --git a/examples/metal/port/hybrid_unbonded/csharp/.gitignore b/examples/fabric/connection/example_3/csharp/.gitignore similarity index 100% rename from examples/metal/port/hybrid_unbonded/csharp/.gitignore rename to examples/fabric/connection/example_3/csharp/.gitignore diff --git a/examples/fabric/connection/example_3/csharp/Program.cs b/examples/fabric/connection/example_3/csharp/Program.cs new file mode 100644 index 00000000..e6c215fe --- /dev/null +++ b/examples/fabric/connection/example_3/csharp/Program.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var epl = new Equinix.Fabric.Connection("epl", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_3/csharp/Pulumi.yaml b/examples/fabric/connection/example_3/csharp/Pulumi.yaml new file mode 100644 index 00000000..a0648ff8 --- /dev/null +++ b/examples/fabric/connection/example_3/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_3 +runtime: dotnet diff --git a/examples/fabric/connection/example_3/csharp/equinix-fabric-connection-example_3.csproj b/examples/fabric/connection/example_3/csharp/equinix-fabric-connection-example_3.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_3/csharp/equinix-fabric-connection-example_3.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_3/go/Pulumi.yaml b/examples/fabric/connection/example_3/go/Pulumi.yaml new file mode 100644 index 00000000..2979a2fa --- /dev/null +++ b/examples/fabric/connection/example_3/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_3 +runtime: go diff --git a/examples/fabric/connection/example_3/go/go.mod b/examples/fabric/connection/example_3/go/go.mod new file mode 100644 index 00000000..641284b0 --- /dev/null +++ b/examples/fabric/connection/example_3/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_3 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_3/go/main.go b/examples/fabric/connection/example_3/go/main.go new file mode 100644 index 00000000..d918abb0 --- /dev/null +++ b/examples/fabric/connection/example_3/go/main.go @@ -0,0 +1,52 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_3/java/Pulumi.yaml b/examples/fabric/connection/example_3/java/Pulumi.yaml new file mode 100644 index 00000000..9cb29b82 --- /dev/null +++ b/examples/fabric/connection/example_3/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_3 +runtime: java diff --git a/examples/fabric/connection/example_3/java/pom.xml b/examples/fabric/connection/example_3/java/pom.xml new file mode 100644 index 00000000..3dd4b77f --- /dev/null +++ b/examples/fabric/connection/example_3/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_3 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_3/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_3/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..78e7c671 --- /dev/null +++ b/examples/fabric/connection/example_3/java/src/main/java/generated_program/App.java @@ -0,0 +1,65 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var epl = new Connection("epl", ConnectionArgs.builder() + .name("ConnectionName") + .type("EPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/port/hybrid_unbonded/python/.gitignore b/examples/fabric/connection/example_3/python/.gitignore similarity index 100% rename from examples/metal/port/hybrid_unbonded/python/.gitignore rename to examples/fabric/connection/example_3/python/.gitignore diff --git a/examples/fabric/connection/example_3/python/Pulumi.yaml b/examples/fabric/connection/example_3/python/Pulumi.yaml new file mode 100644 index 00000000..6a5eac7b --- /dev/null +++ b/examples/fabric/connection/example_3/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_3 +runtime: python diff --git a/examples/fabric/connection/example_3/python/__main__.py b/examples/fabric/connection/example_3/python/__main__.py new file mode 100644 index 00000000..b1028c1d --- /dev/null +++ b/examples/fabric/connection/example_3/python/__main__.py @@ -0,0 +1,36 @@ +import pulumi +import pulumi_equinix as equinix + +epl = equinix.fabric.Connection("epl", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_3/python/requirements.txt b/examples/fabric/connection/example_3/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_3/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/port/hybrid_unbonded/typescript/.gitignore b/examples/fabric/connection/example_3/typescript/.gitignore similarity index 100% rename from examples/metal/port/hybrid_unbonded/typescript/.gitignore rename to examples/fabric/connection/example_3/typescript/.gitignore diff --git a/examples/fabric/connection/example_3/typescript/Pulumi.yaml b/examples/fabric/connection/example_3/typescript/Pulumi.yaml new file mode 100644 index 00000000..aa771322 --- /dev/null +++ b/examples/fabric/connection/example_3/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_3 +runtime: nodejs diff --git a/examples/fabric/connection/example_3/typescript/index.ts b/examples/fabric/connection/example_3/typescript/index.ts new file mode 100644 index 00000000..cecace67 --- /dev/null +++ b/examples/fabric/connection/example_3/typescript/index.ts @@ -0,0 +1,37 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const epl = new equinix.fabric.Connection("epl", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_3/typescript/package.json b/examples/fabric/connection/example_3/typescript/package.json new file mode 100644 index 00000000..24996aa6 --- /dev/null +++ b/examples/fabric/connection/example_3/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_3", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_3/typescript/tsconfig.json b/examples/fabric/connection/example_3/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_3/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_4/Pulumi.yaml b/examples/fabric/connection/example_4/Pulumi.yaml new file mode 100644 index 00000000..153e536f --- /dev/null +++ b/examples/fabric/connection/example_4/Pulumi.yaml @@ -0,0 +1,32 @@ +name: equinix-fabric-connection-example_4 +runtime: yaml +resources: + accessEplVc: + type: equinix:fabric:Connection + name: access_epl_vc + properties: + name: ConnectionName + type: ACCESS_EPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: QINQ + vlanSTag: '1976' + zSide: + accessPoint: + type: COLO + port: + uuid: + location: + metroCode: SV diff --git a/examples/metal/port/layer2_bonded/csharp/.gitignore b/examples/fabric/connection/example_4/csharp/.gitignore similarity index 100% rename from examples/metal/port/layer2_bonded/csharp/.gitignore rename to examples/fabric/connection/example_4/csharp/.gitignore diff --git a/examples/fabric/connection/example_4/csharp/Program.cs b/examples/fabric/connection/example_4/csharp/Program.cs new file mode 100644 index 00000000..03069453 --- /dev/null +++ b/examples/fabric/connection/example_4/csharp/Program.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var accessEplVc = new Equinix.Fabric.Connection("accessEplVc", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.AccessEPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + VlanSTag = 1976, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_4/csharp/Pulumi.yaml b/examples/fabric/connection/example_4/csharp/Pulumi.yaml new file mode 100644 index 00000000..013db5e9 --- /dev/null +++ b/examples/fabric/connection/example_4/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_4 +runtime: dotnet diff --git a/examples/fabric/connection/example_4/csharp/equinix-fabric-connection-example_4.csproj b/examples/fabric/connection/example_4/csharp/equinix-fabric-connection-example_4.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_4/csharp/equinix-fabric-connection-example_4.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_4/go/Pulumi.yaml b/examples/fabric/connection/example_4/go/Pulumi.yaml new file mode 100644 index 00000000..cb79b6df --- /dev/null +++ b/examples/fabric/connection/example_4/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_4 +runtime: go diff --git a/examples/fabric/connection/example_4/go/go.mod b/examples/fabric/connection/example_4/go/go.mod new file mode 100644 index 00000000..1ae0df16 --- /dev/null +++ b/examples/fabric/connection/example_4/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_4 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_4/go/main.go b/examples/fabric/connection/example_4/go/main.go new file mode 100644 index 00000000..2b030ace --- /dev/null +++ b/examples/fabric/connection/example_4/go/main.go @@ -0,0 +1,56 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "accessEplVc", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeAccessEPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionASideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), + VlanSTag: pulumi.Int(1976), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_4/java/Pulumi.yaml b/examples/fabric/connection/example_4/java/Pulumi.yaml new file mode 100644 index 00000000..21b0e094 --- /dev/null +++ b/examples/fabric/connection/example_4/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_4 +runtime: java diff --git a/examples/fabric/connection/example_4/java/pom.xml b/examples/fabric/connection/example_4/java/pom.xml new file mode 100644 index 00000000..ad0b570f --- /dev/null +++ b/examples/fabric/connection/example_4/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_4 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_4/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_4/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..3588ffb5 --- /dev/null +++ b/examples/fabric/connection/example_4/java/src/main/java/generated_program/App.java @@ -0,0 +1,70 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var accessEplVc = new Connection("accessEplVc", ConnectionArgs.builder() + .name("ConnectionName") + .type("ACCESS_EPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionASideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() + .type("QINQ") + .vlanSTag("1976") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/port/layer2_bonded/python/.gitignore b/examples/fabric/connection/example_4/python/.gitignore similarity index 100% rename from examples/metal/port/layer2_bonded/python/.gitignore rename to examples/fabric/connection/example_4/python/.gitignore diff --git a/examples/fabric/connection/example_4/python/Pulumi.yaml b/examples/fabric/connection/example_4/python/Pulumi.yaml new file mode 100644 index 00000000..3287f3f2 --- /dev/null +++ b/examples/fabric/connection/example_4/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_4 +runtime: python diff --git a/examples/fabric/connection/example_4/python/__main__.py b/examples/fabric/connection/example_4/python/__main__.py new file mode 100644 index 00000000..facad4e9 --- /dev/null +++ b/examples/fabric/connection/example_4/python/__main__.py @@ -0,0 +1,40 @@ +import pulumi +import pulumi_equinix as equinix + +access_epl_vc = equinix.fabric.Connection("accessEplVc", + name="ConnectionName", + type=equinix.fabric.ConnectionType.ACCESS_EPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionASideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q, + vlan_s_tag=1976, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_4/python/requirements.txt b/examples/fabric/connection/example_4/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_4/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/port/layer2_bonded/typescript/.gitignore b/examples/fabric/connection/example_4/typescript/.gitignore similarity index 100% rename from examples/metal/port/layer2_bonded/typescript/.gitignore rename to examples/fabric/connection/example_4/typescript/.gitignore diff --git a/examples/fabric/connection/example_4/typescript/Pulumi.yaml b/examples/fabric/connection/example_4/typescript/Pulumi.yaml new file mode 100644 index 00000000..1be602ea --- /dev/null +++ b/examples/fabric/connection/example_4/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_4 +runtime: nodejs diff --git a/examples/fabric/connection/example_4/typescript/index.ts b/examples/fabric/connection/example_4/typescript/index.ts new file mode 100644 index 00000000..1f0f0390 --- /dev/null +++ b/examples/fabric/connection/example_4/typescript/index.ts @@ -0,0 +1,41 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const accessEplVc = new equinix.fabric.Connection("accessEplVc", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.AccessEPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.QinQ, + vlanSTag: 1976, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_4/typescript/package.json b/examples/fabric/connection/example_4/typescript/package.json new file mode 100644 index 00000000..249dce7a --- /dev/null +++ b/examples/fabric/connection/example_4/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_4", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_4/typescript/tsconfig.json b/examples/fabric/connection/example_4/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_4/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_5/Pulumi.yaml b/examples/fabric/connection/example_5/Pulumi.yaml new file mode 100644 index 00000000..059f5e1e --- /dev/null +++ b/examples/fabric/connection/example_5/Pulumi.yaml @@ -0,0 +1,35 @@ +name: equinix-fabric-connection-example_5 +runtime: yaml +resources: + vd2port: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: NETWORK + id: 7 + zSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: DOT1Q + vlanSTag: '3711' + location: + metroCode: SV diff --git a/examples/metal/port_vlan_attachment/csharp/.gitignore b/examples/fabric/connection/example_5/csharp/.gitignore similarity index 100% rename from examples/metal/port_vlan_attachment/csharp/.gitignore rename to examples/fabric/connection/example_5/csharp/.gitignore diff --git a/examples/fabric/connection/example_5/csharp/Program.cs b/examples/fabric/connection/example_5/csharp/Program.cs new file mode 100644 index 00000000..817d6873 --- /dev/null +++ b/examples/fabric/connection/example_5/csharp/Program.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2Port = new Equinix.Fabric.Connection("vd2port", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "NETWORK", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + VlanSTag = 3711, + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_5/csharp/Pulumi.yaml b/examples/fabric/connection/example_5/csharp/Pulumi.yaml new file mode 100644 index 00000000..c25ec77f --- /dev/null +++ b/examples/fabric/connection/example_5/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_5 +runtime: dotnet diff --git a/examples/fabric/connection/example_5/csharp/equinix-fabric-connection-example_5.csproj b/examples/fabric/connection/example_5/csharp/equinix-fabric-connection-example_5.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_5/csharp/equinix-fabric-connection-example_5.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_5/go/Pulumi.yaml b/examples/fabric/connection/example_5/go/Pulumi.yaml new file mode 100644 index 00000000..994dfe32 --- /dev/null +++ b/examples/fabric/connection/example_5/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_5 +runtime: go diff --git a/examples/fabric/connection/example_5/go/go.mod b/examples/fabric/connection/example_5/go/go.mod new file mode 100644 index 00000000..6a32ff3f --- /dev/null +++ b/examples/fabric/connection/example_5/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_5 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_5/go/main.go b/examples/fabric/connection/example_5/go/main.go new file mode 100644 index 00000000..e30c6012 --- /dev/null +++ b/examples/fabric/connection/example_5/go/main.go @@ -0,0 +1,61 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "vd2port", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("NETWORK"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), + VlanSTag: pulumi.Int(3711), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_5/java/Pulumi.yaml b/examples/fabric/connection/example_5/java/Pulumi.yaml new file mode 100644 index 00000000..cd4ac3fc --- /dev/null +++ b/examples/fabric/connection/example_5/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_5 +runtime: java diff --git a/examples/fabric/connection/example_5/java/pom.xml b/examples/fabric/connection/example_5/java/pom.xml new file mode 100644 index 00000000..b8967cd1 --- /dev/null +++ b/examples/fabric/connection/example_5/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_5 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_5/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_5/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..2d389432 --- /dev/null +++ b/examples/fabric/connection/example_5/java/src/main/java/generated_program/App.java @@ -0,0 +1,76 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2Port = new Connection("vd2Port", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("NETWORK") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder() + .type("DOT1Q") + .vlanSTag("3711") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/port_vlan_attachment/python/.gitignore b/examples/fabric/connection/example_5/python/.gitignore similarity index 100% rename from examples/metal/port_vlan_attachment/python/.gitignore rename to examples/fabric/connection/example_5/python/.gitignore diff --git a/examples/fabric/connection/example_5/python/Pulumi.yaml b/examples/fabric/connection/example_5/python/Pulumi.yaml new file mode 100644 index 00000000..9472d6b7 --- /dev/null +++ b/examples/fabric/connection/example_5/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_5 +runtime: python diff --git a/examples/fabric/connection/example_5/python/__main__.py b/examples/fabric/connection/example_5/python/__main__.py new file mode 100644 index 00000000..853879af --- /dev/null +++ b/examples/fabric/connection/example_5/python/__main__.py @@ -0,0 +1,45 @@ +import pulumi +import pulumi_equinix as equinix + +vd2_port = equinix.fabric.Connection("vd2port", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="NETWORK", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q, + vlan_s_tag=3711, + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_5/python/requirements.txt b/examples/fabric/connection/example_5/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_5/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/port_vlan_attachment/typescript/.gitignore b/examples/fabric/connection/example_5/typescript/.gitignore similarity index 100% rename from examples/metal/port_vlan_attachment/typescript/.gitignore rename to examples/fabric/connection/example_5/typescript/.gitignore diff --git a/examples/fabric/connection/example_5/typescript/Pulumi.yaml b/examples/fabric/connection/example_5/typescript/Pulumi.yaml new file mode 100644 index 00000000..04eb6ab2 --- /dev/null +++ b/examples/fabric/connection/example_5/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_5 +runtime: nodejs diff --git a/examples/fabric/connection/example_5/typescript/index.ts b/examples/fabric/connection/example_5/typescript/index.ts new file mode 100644 index 00000000..ccd6a689 --- /dev/null +++ b/examples/fabric/connection/example_5/typescript/index.ts @@ -0,0 +1,46 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2Port = new equinix.fabric.Connection("vd2port", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "NETWORK", + id: 7, + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.Dot1q, + vlanSTag: 3711, + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_5/typescript/package.json b/examples/fabric/connection/example_5/typescript/package.json new file mode 100644 index 00000000..25e7412b --- /dev/null +++ b/examples/fabric/connection/example_5/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_5", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_5/typescript/tsconfig.json b/examples/fabric/connection/example_5/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_5/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_6/Pulumi.yaml b/examples/fabric/connection/example_6/Pulumi.yaml new file mode 100644 index 00000000..3bbe7053 --- /dev/null +++ b/examples/fabric/connection/example_6/Pulumi.yaml @@ -0,0 +1,28 @@ +name: equinix-fabric-connection-example_6 +runtime: yaml +resources: + vd2token: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: VD + virtualDevice: + type: EDGE + uuid: + interface: + type: NETWORK + id: 7 + zSide: + serviceToken: + uuid: diff --git a/examples/metal/project/csharp/.gitignore b/examples/fabric/connection/example_6/csharp/.gitignore similarity index 100% rename from examples/metal/project/csharp/.gitignore rename to examples/fabric/connection/example_6/csharp/.gitignore diff --git a/examples/fabric/connection/example_6/csharp/Program.cs b/examples/fabric/connection/example_6/csharp/Program.cs new file mode 100644 index 00000000..4ee3fa0f --- /dev/null +++ b/examples/fabric/connection/example_6/csharp/Program.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var vd2Token = new Equinix.Fabric.Connection("vd2token", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.VD, + VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + { + Type = "EDGE", + Uuid = "", + }, + Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + { + Type = "NETWORK", + Id = 7, + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + ServiceToken = new Equinix.Fabric.Inputs.ConnectionZSideServiceTokenArgs + { + Uuid = "", + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_6/csharp/Pulumi.yaml b/examples/fabric/connection/example_6/csharp/Pulumi.yaml new file mode 100644 index 00000000..7e4e2373 --- /dev/null +++ b/examples/fabric/connection/example_6/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_6 +runtime: dotnet diff --git a/examples/fabric/connection/example_6/csharp/equinix-fabric-connection-example_6.csproj b/examples/fabric/connection/example_6/csharp/equinix-fabric-connection-example_6.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_6/csharp/equinix-fabric-connection-example_6.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_6/go/Pulumi.yaml b/examples/fabric/connection/example_6/go/Pulumi.yaml new file mode 100644 index 00000000..136734ae --- /dev/null +++ b/examples/fabric/connection/example_6/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_6 +runtime: go diff --git a/examples/fabric/connection/example_6/go/go.mod b/examples/fabric/connection/example_6/go/go.mod new file mode 100644 index 00000000..a6af99f6 --- /dev/null +++ b/examples/fabric/connection/example_6/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_6 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_6/go/main.go b/examples/fabric/connection/example_6/go/main.go new file mode 100644 index 00000000..2735e3db --- /dev/null +++ b/examples/fabric/connection/example_6/go/main.go @@ -0,0 +1,50 @@ +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 { + _, err := fabric.NewConnection(ctx, "vd2token", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeVD), + VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ + Type: pulumi.String("EDGE"), + Uuid: pulumi.String(""), + }, + Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ + Type: pulumi.String("NETWORK"), + Id: pulumi.Int(7), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + ServiceToken: &fabric.ConnectionZSideServiceTokenArgs{ + Uuid: pulumi.String(""), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_6/java/Pulumi.yaml b/examples/fabric/connection/example_6/java/Pulumi.yaml new file mode 100644 index 00000000..258fc284 --- /dev/null +++ b/examples/fabric/connection/example_6/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_6 +runtime: java diff --git a/examples/fabric/connection/example_6/java/pom.xml b/examples/fabric/connection/example_6/java/pom.xml new file mode 100644 index 00000000..87936e95 --- /dev/null +++ b/examples/fabric/connection/example_6/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_6 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_6/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_6/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..cf6424f6 --- /dev/null +++ b/examples/fabric/connection/example_6/java/src/main/java/generated_program/App.java @@ -0,0 +1,63 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideServiceTokenArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var vd2Token = new Connection("vd2Token", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("VD") + .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder() + .type("EDGE") + .uuid("") + .build()) + .interface_(ConnectionASideAccessPointInterfaceArgs.builder() + .type("NETWORK") + .id(7) + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .serviceToken(ConnectionZSideServiceTokenArgs.builder() + .uuid("") + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/project/python/.gitignore b/examples/fabric/connection/example_6/python/.gitignore similarity index 100% rename from examples/metal/project/python/.gitignore rename to examples/fabric/connection/example_6/python/.gitignore diff --git a/examples/fabric/connection/example_6/python/Pulumi.yaml b/examples/fabric/connection/example_6/python/Pulumi.yaml new file mode 100644 index 00000000..4523245b --- /dev/null +++ b/examples/fabric/connection/example_6/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_6 +runtime: python diff --git a/examples/fabric/connection/example_6/python/__main__.py b/examples/fabric/connection/example_6/python/__main__.py new file mode 100644 index 00000000..a35a6f86 --- /dev/null +++ b/examples/fabric/connection/example_6/python/__main__.py @@ -0,0 +1,35 @@ +import pulumi +import pulumi_equinix as equinix + +vd2_token = equinix.fabric.Connection("vd2token", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type=equinix.fabric.AccessPointType.VD, + virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs( + type="EDGE", + uuid="", + ), + interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs( + type="NETWORK", + id=7, + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + service_token=equinix.fabric.ConnectionZSideServiceTokenArgs( + uuid="", + ), + )) diff --git a/examples/fabric/connection/example_6/python/requirements.txt b/examples/fabric/connection/example_6/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_6/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/project/typescript/.gitignore b/examples/fabric/connection/example_6/typescript/.gitignore similarity index 100% rename from examples/metal/project/typescript/.gitignore rename to examples/fabric/connection/example_6/typescript/.gitignore diff --git a/examples/fabric/connection/example_6/typescript/Pulumi.yaml b/examples/fabric/connection/example_6/typescript/Pulumi.yaml new file mode 100644 index 00000000..3ab2028c --- /dev/null +++ b/examples/fabric/connection/example_6/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_6 +runtime: nodejs diff --git a/examples/fabric/connection/example_6/typescript/index.ts b/examples/fabric/connection/example_6/typescript/index.ts new file mode 100644 index 00000000..35f696d7 --- /dev/null +++ b/examples/fabric/connection/example_6/typescript/index.ts @@ -0,0 +1,36 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const vd2Token = new equinix.fabric.Connection("vd2token", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.VD, + virtualDevice: { + type: "EDGE", + uuid: "", + }, + "interface": { + type: "NETWORK", + id: 7, + }, + }, + }, + zSide: { + serviceToken: { + uuid: "", + }, + }, +}); diff --git a/examples/fabric/connection/example_6/typescript/package.json b/examples/fabric/connection/example_6/typescript/package.json new file mode 100644 index 00000000..a5dd5152 --- /dev/null +++ b/examples/fabric/connection/example_6/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_6", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_6/typescript/tsconfig.json b/examples/fabric/connection/example_6/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_6/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_7/Pulumi.yaml b/examples/fabric/connection/example_7/Pulumi.yaml new file mode 100644 index 00000000..8137d38e --- /dev/null +++ b/examples/fabric/connection/example_7/Pulumi.yaml @@ -0,0 +1,29 @@ +name: equinix-fabric-connection-example_7 +runtime: yaml +resources: + token2aws: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: EVPL_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + serviceToken: + uuid: + zSide: + accessPoint: + type: SP + authenticationKey: + sellerRegion: us-west-1 + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV diff --git a/examples/metal/reserved_ip_block/csharp/.gitignore b/examples/fabric/connection/example_7/csharp/.gitignore similarity index 100% rename from examples/metal/reserved_ip_block/csharp/.gitignore rename to examples/fabric/connection/example_7/csharp/.gitignore diff --git a/examples/fabric/connection/example_7/csharp/Program.cs b/examples/fabric/connection/example_7/csharp/Program.cs new file mode 100644 index 00000000..e1589f3f --- /dev/null +++ b/examples/fabric/connection/example_7/csharp/Program.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var token2Aws = new Equinix.Fabric.Connection("token2aws", new() + { + Name = "ConnectionName", + Type = Equinix.Fabric.ConnectionType.EVPL, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + ServiceToken = new Equinix.Fabric.Inputs.ConnectionASideServiceTokenArgs + { + Uuid = "", + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + SellerRegion = "us-west-1", + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_7/csharp/Pulumi.yaml b/examples/fabric/connection/example_7/csharp/Pulumi.yaml new file mode 100644 index 00000000..65a950d8 --- /dev/null +++ b/examples/fabric/connection/example_7/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_7 +runtime: dotnet diff --git a/examples/fabric/connection/example_7/csharp/equinix-fabric-connection-example_7.csproj b/examples/fabric/connection/example_7/csharp/equinix-fabric-connection-example_7.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_7/csharp/equinix-fabric-connection-example_7.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_7/go/Pulumi.yaml b/examples/fabric/connection/example_7/go/Pulumi.yaml new file mode 100644 index 00000000..5e518faf --- /dev/null +++ b/examples/fabric/connection/example_7/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_7 +runtime: go diff --git a/examples/fabric/connection/example_7/go/go.mod b/examples/fabric/connection/example_7/go/go.mod new file mode 100644 index 00000000..9d1a484e --- /dev/null +++ b/examples/fabric/connection/example_7/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_7 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_7/go/main.go b/examples/fabric/connection/example_7/go/main.go new file mode 100644 index 00000000..866021b8 --- /dev/null +++ b/examples/fabric/connection/example_7/go/main.go @@ -0,0 +1,52 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "token2aws", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String(fabric.ConnectionTypeEVPL), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + ServiceToken: &fabric.ConnectionASideServiceTokenArgs{ + Uuid: pulumi.String(""), + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + SellerRegion: pulumi.String("us-west-1"), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_7/java/Pulumi.yaml b/examples/fabric/connection/example_7/java/Pulumi.yaml new file mode 100644 index 00000000..df6cc06f --- /dev/null +++ b/examples/fabric/connection/example_7/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_7 +runtime: java diff --git a/examples/fabric/connection/example_7/java/pom.xml b/examples/fabric/connection/example_7/java/pom.xml new file mode 100644 index 00000000..64f95874 --- /dev/null +++ b/examples/fabric/connection/example_7/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_7 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_7/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_7/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..76087cbd --- /dev/null +++ b/examples/fabric/connection/example_7/java/src/main/java/generated_program/App.java @@ -0,0 +1,64 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideServiceTokenArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var token2Aws = new Connection("token2Aws", ConnectionArgs.builder() + .name("ConnectionName") + .type("EVPL_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .serviceToken(ConnectionASideServiceTokenArgs.builder() + .uuid("") + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .sellerRegion("us-west-1") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/reserved_ip_block/python/.gitignore b/examples/fabric/connection/example_7/python/.gitignore similarity index 100% rename from examples/metal/reserved_ip_block/python/.gitignore rename to examples/fabric/connection/example_7/python/.gitignore diff --git a/examples/fabric/connection/example_7/python/Pulumi.yaml b/examples/fabric/connection/example_7/python/Pulumi.yaml new file mode 100644 index 00000000..8bf388a8 --- /dev/null +++ b/examples/fabric/connection/example_7/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_7 +runtime: python diff --git a/examples/fabric/connection/example_7/python/__main__.py b/examples/fabric/connection/example_7/python/__main__.py new file mode 100644 index 00000000..52c59dc5 --- /dev/null +++ b/examples/fabric/connection/example_7/python/__main__.py @@ -0,0 +1,36 @@ +import pulumi +import pulumi_equinix as equinix + +token2_aws = equinix.fabric.Connection("token2aws", + name="ConnectionName", + type=equinix.fabric.ConnectionType.EVPL, + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + service_token=equinix.fabric.ConnectionASideServiceTokenArgs( + uuid="", + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + seller_region="us-west-1", + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_7/python/requirements.txt b/examples/fabric/connection/example_7/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_7/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/reserved_ip_block/typescript/.gitignore b/examples/fabric/connection/example_7/typescript/.gitignore similarity index 100% rename from examples/metal/reserved_ip_block/typescript/.gitignore rename to examples/fabric/connection/example_7/typescript/.gitignore diff --git a/examples/fabric/connection/example_7/typescript/Pulumi.yaml b/examples/fabric/connection/example_7/typescript/Pulumi.yaml new file mode 100644 index 00000000..15f419f4 --- /dev/null +++ b/examples/fabric/connection/example_7/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_7 +runtime: nodejs diff --git a/examples/fabric/connection/example_7/typescript/index.ts b/examples/fabric/connection/example_7/typescript/index.ts new file mode 100644 index 00000000..abc4699b --- /dev/null +++ b/examples/fabric/connection/example_7/typescript/index.ts @@ -0,0 +1,37 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const token2Aws = new equinix.fabric.Connection("token2aws", { + name: "ConnectionName", + type: equinix.fabric.ConnectionType.EVPL, + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + serviceToken: { + uuid: "", + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + sellerRegion: "us-west-1", + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_7/typescript/package.json b/examples/fabric/connection/example_7/typescript/package.json new file mode 100644 index 00000000..c4686236 --- /dev/null +++ b/examples/fabric/connection/example_7/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_7", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_7/typescript/tsconfig.json b/examples/fabric/connection/example_7/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_7/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_8/Pulumi.yaml b/examples/fabric/connection/example_8/Pulumi.yaml new file mode 100644 index 00000000..bdb8dee6 --- /dev/null +++ b/examples/fabric/connection/example_8/Pulumi.yaml @@ -0,0 +1,31 @@ +name: equinix-fabric-connection-example_8 +runtime: yaml +resources: + fcr2port: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: IP_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: CLOUD_ROUTER + router: + uuid: + zSide: + accessPoint: + type: COLO + port: + uuid: + linkProtocol: + type: DOT1Q + vlanTag: '2711' + location: + metroCode: SV diff --git a/examples/metal/vrf/csharp/.gitignore b/examples/fabric/connection/example_8/csharp/.gitignore similarity index 100% rename from examples/metal/vrf/csharp/.gitignore rename to examples/fabric/connection/example_8/csharp/.gitignore diff --git a/examples/fabric/connection/example_8/csharp/Program.cs b/examples/fabric/connection/example_8/csharp/Program.cs new file mode 100644 index 00000000..cc43c1ba --- /dev/null +++ b/examples/fabric/connection/example_8/csharp/Program.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var fcr2Port = new Equinix.Fabric.Connection("fcr2port", new() + { + Name = "ConnectionName", + Type = "IP_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = "CLOUD_ROUTER", + Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.Colo, + Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + { + Uuid = "", + }, + LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + { + Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + VlanTag = 2711, + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_8/csharp/Pulumi.yaml b/examples/fabric/connection/example_8/csharp/Pulumi.yaml new file mode 100644 index 00000000..eb2ae723 --- /dev/null +++ b/examples/fabric/connection/example_8/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_8 +runtime: dotnet diff --git a/examples/fabric/connection/example_8/csharp/equinix-fabric-connection-example_8.csproj b/examples/fabric/connection/example_8/csharp/equinix-fabric-connection-example_8.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_8/csharp/equinix-fabric-connection-example_8.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_8/go/Pulumi.yaml b/examples/fabric/connection/example_8/go/Pulumi.yaml new file mode 100644 index 00000000..987ae5a4 --- /dev/null +++ b/examples/fabric/connection/example_8/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_8 +runtime: go diff --git a/examples/fabric/connection/example_8/go/go.mod b/examples/fabric/connection/example_8/go/go.mod new file mode 100644 index 00000000..f4928a61 --- /dev/null +++ b/examples/fabric/connection/example_8/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_8 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_8/go/main.go b/examples/fabric/connection/example_8/go/main.go new file mode 100644 index 00000000..8144245c --- /dev/null +++ b/examples/fabric/connection/example_8/go/main.go @@ -0,0 +1,56 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "fcr2port", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("IP_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String("CLOUD_ROUTER"), + Router: &fabric.ConnectionASideAccessPointRouterArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeColo), + Port: &fabric.ConnectionZSideAccessPointPortArgs{ + Uuid: pulumi.String(""), + }, + LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ + Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), + VlanTag: pulumi.Int(2711), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_8/java/Pulumi.yaml b/examples/fabric/connection/example_8/java/Pulumi.yaml new file mode 100644 index 00000000..37fcb3e6 --- /dev/null +++ b/examples/fabric/connection/example_8/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_8 +runtime: java diff --git a/examples/fabric/connection/example_8/java/pom.xml b/examples/fabric/connection/example_8/java/pom.xml new file mode 100644 index 00000000..ad1e564c --- /dev/null +++ b/examples/fabric/connection/example_8/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_8 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_8/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_8/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..136bc4a1 --- /dev/null +++ b/examples/fabric/connection/example_8/java/src/main/java/generated_program/App.java @@ -0,0 +1,70 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var fcr2Port = new Connection("fcr2Port", ConnectionArgs.builder() + .name("ConnectionName") + .type("IP_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("CLOUD_ROUTER") + .router(ConnectionASideAccessPointRouterArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("COLO") + .port(ConnectionZSideAccessPointPortArgs.builder() + .uuid("") + .build()) + .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder() + .type("DOT1Q") + .vlanTag("2711") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/metal/vrf/python/.gitignore b/examples/fabric/connection/example_8/python/.gitignore similarity index 100% rename from examples/metal/vrf/python/.gitignore rename to examples/fabric/connection/example_8/python/.gitignore diff --git a/examples/fabric/connection/example_8/python/Pulumi.yaml b/examples/fabric/connection/example_8/python/Pulumi.yaml new file mode 100644 index 00000000..8634d172 --- /dev/null +++ b/examples/fabric/connection/example_8/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_8 +runtime: python diff --git a/examples/fabric/connection/example_8/python/__main__.py b/examples/fabric/connection/example_8/python/__main__.py new file mode 100644 index 00000000..7116feb1 --- /dev/null +++ b/examples/fabric/connection/example_8/python/__main__.py @@ -0,0 +1,40 @@ +import pulumi +import pulumi_equinix as equinix + +fcr2_port = equinix.fabric.Connection("fcr2port", + name="ConnectionName", + type="IP_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type="CLOUD_ROUTER", + router=equinix.fabric.ConnectionASideAccessPointRouterArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.COLO, + port=equinix.fabric.ConnectionZSideAccessPointPortArgs( + uuid="", + ), + link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs( + type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q, + vlan_tag=2711, + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_8/python/requirements.txt b/examples/fabric/connection/example_8/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_8/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/vrf/typescript/.gitignore b/examples/fabric/connection/example_8/typescript/.gitignore similarity index 100% rename from examples/metal/vrf/typescript/.gitignore rename to examples/fabric/connection/example_8/typescript/.gitignore diff --git a/examples/fabric/connection/example_8/typescript/Pulumi.yaml b/examples/fabric/connection/example_8/typescript/Pulumi.yaml new file mode 100644 index 00000000..d126f365 --- /dev/null +++ b/examples/fabric/connection/example_8/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_8 +runtime: nodejs diff --git a/examples/fabric/connection/example_8/typescript/index.ts b/examples/fabric/connection/example_8/typescript/index.ts new file mode 100644 index 00000000..2c507022 --- /dev/null +++ b/examples/fabric/connection/example_8/typescript/index.ts @@ -0,0 +1,41 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const fcr2Port = new equinix.fabric.Connection("fcr2port", { + name: "ConnectionName", + type: "IP_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: "CLOUD_ROUTER", + router: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.Colo, + port: { + uuid: "", + }, + linkProtocol: { + type: equinix.fabric.AccessPointLinkProtocolType.Dot1q, + vlanTag: 2711, + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_8/typescript/package.json b/examples/fabric/connection/example_8/typescript/package.json new file mode 100644 index 00000000..9e4c1416 --- /dev/null +++ b/examples/fabric/connection/example_8/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_8", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_8/typescript/tsconfig.json b/examples/fabric/connection/example_8/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_8/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/example_9/Pulumi.yaml b/examples/fabric/connection/example_9/Pulumi.yaml new file mode 100644 index 00000000..1f6c3cab --- /dev/null +++ b/examples/fabric/connection/example_9/Pulumi.yaml @@ -0,0 +1,31 @@ +name: equinix-fabric-connection-example_9 +runtime: yaml +resources: + fcr2azure: + type: equinix:fabric:Connection + properties: + name: ConnectionName + type: IP_VC + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + bandwidth: 50 + order: + purchaseOrderNumber: 1-323292 + aSide: + accessPoint: + type: CLOUD_ROUTER + router: + uuid: + zSide: + accessPoint: + type: SP + authenticationKey: + peeringType: PRIVATE + profile: + type: L2_PROFILE + uuid: + location: + metroCode: SV diff --git a/examples/network/device/csharp/.gitignore b/examples/fabric/connection/example_9/csharp/.gitignore similarity index 100% rename from examples/network/device/csharp/.gitignore rename to examples/fabric/connection/example_9/csharp/.gitignore diff --git a/examples/fabric/connection/example_9/csharp/Program.cs b/examples/fabric/connection/example_9/csharp/Program.cs new file mode 100644 index 00000000..544c0466 --- /dev/null +++ b/examples/fabric/connection/example_9/csharp/Program.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var fcr2Azure = new Equinix.Fabric.Connection("fcr2azure", new() + { + Name = "ConnectionName", + Type = "IP_VC", + Notifications = new[] + { + new Equinix.Fabric.Inputs.ConnectionNotificationArgs + { + Type = Equinix.Fabric.NotificationsType.All, + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Bandwidth = 50, + Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + { + PurchaseOrderNumber = "1-323292", + }, + ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + { + Type = "CLOUD_ROUTER", + Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + { + Uuid = "", + }, + }, + }, + ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + { + AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + { + Type = Equinix.Fabric.AccessPointType.SP, + AuthenticationKey = "", + PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + { + Type = Equinix.Fabric.ProfileType.L2Profile, + Uuid = "", + }, + Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + { + MetroCode = Equinix.Metro.SiliconValley, + }, + }, + }, + }); + +}); + diff --git a/examples/fabric/connection/example_9/csharp/Pulumi.yaml b/examples/fabric/connection/example_9/csharp/Pulumi.yaml new file mode 100644 index 00000000..29297cf5 --- /dev/null +++ b/examples/fabric/connection/example_9/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_9 +runtime: dotnet diff --git a/examples/fabric/connection/example_9/csharp/equinix-fabric-connection-example_9.csproj b/examples/fabric/connection/example_9/csharp/equinix-fabric-connection-example_9.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/connection/example_9/csharp/equinix-fabric-connection-example_9.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_9/go/Pulumi.yaml b/examples/fabric/connection/example_9/go/Pulumi.yaml new file mode 100644 index 00000000..6be8b480 --- /dev/null +++ b/examples/fabric/connection/example_9/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_9 +runtime: go diff --git a/examples/fabric/connection/example_9/go/go.mod b/examples/fabric/connection/example_9/go/go.mod new file mode 100644 index 00000000..76ad5799 --- /dev/null +++ b/examples/fabric/connection/example_9/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-connection-example_9 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/connection/example_9/go/main.go b/examples/fabric/connection/example_9/go/main.go new file mode 100644 index 00000000..fc43597d --- /dev/null +++ b/examples/fabric/connection/example_9/go/main.go @@ -0,0 +1,55 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "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 { + _, err := fabric.NewConnection(ctx, "fcr2azure", &fabric.ConnectionArgs{ + Name: pulumi.String("ConnectionName"), + Type: pulumi.String("IP_VC"), + Notifications: fabric.ConnectionNotificationArray{ + &fabric.ConnectionNotificationArgs{ + Type: pulumi.String(fabric.NotificationsTypeAll), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Bandwidth: pulumi.Int(50), + Order: &fabric.ConnectionOrderArgs{ + PurchaseOrderNumber: pulumi.String("1-323292"), + }, + ASide: &fabric.ConnectionASideArgs{ + AccessPoint: &fabric.ConnectionASideAccessPointArgs{ + Type: pulumi.String("CLOUD_ROUTER"), + Router: &fabric.ConnectionASideAccessPointRouterArgs{ + Uuid: pulumi.String(""), + }, + }, + }, + ZSide: &fabric.ConnectionZSideArgs{ + AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ + Type: pulumi.String(fabric.AccessPointTypeSP), + AuthenticationKey: pulumi.String(""), + PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), + Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Uuid: pulumi.String(""), + }, + Location: &fabric.ConnectionZSideAccessPointLocationArgs{ + MetroCode: pulumi.String(equinix.MetroSiliconValley), + }, + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/connection/example_9/java/Pulumi.yaml b/examples/fabric/connection/example_9/java/Pulumi.yaml new file mode 100644 index 00000000..6825642b --- /dev/null +++ b/examples/fabric/connection/example_9/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_9 +runtime: java diff --git a/examples/fabric/connection/example_9/java/pom.xml b/examples/fabric/connection/example_9/java/pom.xml new file mode 100644 index 00000000..69840361 --- /dev/null +++ b/examples/fabric/connection/example_9/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-connection-example_9 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/connection/example_9/java/src/main/java/generated_program/App.java b/examples/fabric/connection/example_9/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..9d3721f2 --- /dev/null +++ b/examples/fabric/connection/example_9/java/src/main/java/generated_program/App.java @@ -0,0 +1,68 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Connection; +import com.pulumi.equinix.fabric.ConnectionArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs; +import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var fcr2Azure = new Connection("fcr2Azure", ConnectionArgs.builder() + .name("ConnectionName") + .type("IP_VC") + .notifications(ConnectionNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .bandwidth(50) + .order(ConnectionOrderArgs.builder() + .purchaseOrderNumber("1-323292") + .build()) + .aSide(ConnectionASideArgs.builder() + .accessPoint(ConnectionASideAccessPointArgs.builder() + .type("CLOUD_ROUTER") + .router(ConnectionASideAccessPointRouterArgs.builder() + .uuid("") + .build()) + .build()) + .build()) + .zSide(ConnectionZSideArgs.builder() + .accessPoint(ConnectionZSideAccessPointArgs.builder() + .type("SP") + .authenticationKey("") + .peeringType("PRIVATE") + .profile(ConnectionZSideAccessPointProfileArgs.builder() + .type("L2_PROFILE") + .uuid("") + .build()) + .location(ConnectionZSideAccessPointLocationArgs.builder() + .metroCode("SV") + .build()) + .build()) + .build()) + .build()); + + } +} diff --git a/examples/network/device/python/.gitignore b/examples/fabric/connection/example_9/python/.gitignore similarity index 100% rename from examples/network/device/python/.gitignore rename to examples/fabric/connection/example_9/python/.gitignore diff --git a/examples/fabric/connection/example_9/python/Pulumi.yaml b/examples/fabric/connection/example_9/python/Pulumi.yaml new file mode 100644 index 00000000..4820d999 --- /dev/null +++ b/examples/fabric/connection/example_9/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_9 +runtime: python diff --git a/examples/fabric/connection/example_9/python/__main__.py b/examples/fabric/connection/example_9/python/__main__.py new file mode 100644 index 00000000..134d758c --- /dev/null +++ b/examples/fabric/connection/example_9/python/__main__.py @@ -0,0 +1,39 @@ +import pulumi +import pulumi_equinix as equinix + +fcr2_azure = equinix.fabric.Connection("fcr2azure", + name="ConnectionName", + type="IP_VC", + notifications=[equinix.fabric.ConnectionNotificationArgs( + type=equinix.fabric.NotificationsType.ALL, + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + bandwidth=50, + order=equinix.fabric.ConnectionOrderArgs( + purchase_order_number="1-323292", + ), + a_side=equinix.fabric.ConnectionASideArgs( + access_point=equinix.fabric.ConnectionASideAccessPointArgs( + type="CLOUD_ROUTER", + router=equinix.fabric.ConnectionASideAccessPointRouterArgs( + uuid="", + ), + ), + ), + z_side=equinix.fabric.ConnectionZSideArgs( + access_point=equinix.fabric.ConnectionZSideAccessPointArgs( + type=equinix.fabric.AccessPointType.SP, + authentication_key="", + peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE, + profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( + type=equinix.fabric.ProfileType.L2_PROFILE, + uuid="", + ), + location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( + metro_code=equinix.Metro.SILICON_VALLEY, + ), + ), + )) diff --git a/examples/fabric/connection/example_9/python/requirements.txt b/examples/fabric/connection/example_9/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/connection/example_9/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/typescript/.gitignore b/examples/fabric/connection/example_9/typescript/.gitignore similarity index 100% rename from examples/network/device/typescript/.gitignore rename to examples/fabric/connection/example_9/typescript/.gitignore diff --git a/examples/fabric/connection/example_9/typescript/Pulumi.yaml b/examples/fabric/connection/example_9/typescript/Pulumi.yaml new file mode 100644 index 00000000..eae29833 --- /dev/null +++ b/examples/fabric/connection/example_9/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-connection-example_9 +runtime: nodejs diff --git a/examples/fabric/connection/example_9/typescript/index.ts b/examples/fabric/connection/example_9/typescript/index.ts new file mode 100644 index 00000000..531c6e29 --- /dev/null +++ b/examples/fabric/connection/example_9/typescript/index.ts @@ -0,0 +1,40 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const fcr2Azure = new equinix.fabric.Connection("fcr2azure", { + name: "ConnectionName", + type: "IP_VC", + notifications: [{ + type: equinix.fabric.NotificationsType.All, + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + bandwidth: 50, + order: { + purchaseOrderNumber: "1-323292", + }, + aSide: { + accessPoint: { + type: "CLOUD_ROUTER", + router: { + uuid: "", + }, + }, + }, + zSide: { + accessPoint: { + type: equinix.fabric.AccessPointType.SP, + authenticationKey: "", + peeringType: equinix.fabric.AccessPointPeeringType.Private, + profile: { + type: equinix.fabric.ProfileType.L2Profile, + uuid: "", + }, + location: { + metroCode: equinix.index.Metro.SiliconValley, + }, + }, + }, +}); diff --git a/examples/fabric/connection/example_9/typescript/package.json b/examples/fabric/connection/example_9/typescript/package.json new file mode 100644 index 00000000..9dfd5943 --- /dev/null +++ b/examples/fabric/connection/example_9/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-connection-example_9", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/connection/example_9/typescript/tsconfig.json b/examples/fabric/connection/example_9/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/connection/example_9/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/connection/go/Pulumi.yaml b/examples/fabric/connection/go/Pulumi.yaml deleted file mode 100644 index 4a43fa85..00000000 --- a/examples/fabric/connection/go/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-fabric-connection -runtime: go -description: An Equinix Fabric Connection resource - Example connection from Equinix Fabric Port to AWS Direct Connect -config: - awsAccountId: - type: string - awsRegion: - type: string - default: eu-central-1 - fabricPortName: - type: string - metro: - type: string - default: FR - speedInMbps: - type: integer - default: 50 diff --git a/examples/fabric/connection/go/go.mod b/examples/fabric/connection/go/go.mod deleted file mode 100644 index abe78837..00000000 --- a/examples/fabric/connection/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-fabric-connection - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/fabric/connection/go/main.go b/examples/fabric/connection/go/main.go deleted file mode 100644 index e347e8af..00000000 --- a/examples/fabric/connection/go/main.go +++ /dev/null @@ -1,97 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - speedInMbps := 50 - if param := cfg.GetInt("speedInMbps"); param != 0 { - speedInMbps = param - } - fabricPortName := cfg.Require("fabricPortName") - awsRegion := "eu-central-1" - if param := cfg.Get("awsRegion"); param != "" { - awsRegion = param - } - awsAccountId := cfg.Require("awsAccountId") - serviceProfileId := fabric.GetServiceProfiles(ctx, &fabric.GetServiceProfilesArgs{ - Filter: fabric.GetServiceProfilesFilter{ - Property: pulumi.StringRef("/name"), - Operator: pulumi.StringRef("="), - Values: []string{ - "AWS Direct Connect", - }, - }, - }, nil).Data[0].Uuid - portId := fabric.GetPorts(ctx, &fabric.GetPortsArgs{ - Filter: fabric.GetPortsFilter{ - Name: pulumi.StringRef(fabricPortName), - }, - }, nil).Data[0].Uuid - colo2Aws, err := fabric.NewConnection(ctx, "colo2Aws", &fabric.ConnectionArgs{ - Name: pulumi.String("Pulumi-colo2Aws"), - Type: pulumi.String("EVPL_VC"), - Notifications: fabric.ConnectionNotificationArray{ - &fabric.ConnectionNotificationArgs{ - Type: pulumi.String("ALL"), - Emails: pulumi.StringArray{ - pulumi.String("example@equinix.com"), - }, - }, - }, - Bandwidth: pulumi.Int(speedInMbps), - Redundancy: &fabric.ConnectionRedundancyArgs{ - Priority: pulumi.String("PRIMARY"), - }, - ASide: &fabric.ConnectionASideArgs{ - AccessPoint: &fabric.ConnectionASideAccessPointArgs{ - Type: pulumi.String("COLO"), - Port: &fabric.ConnectionASideAccessPointPortArgs{ - Uuid: *pulumi.String(portId), - }, - LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ - Type: pulumi.String("DOT1Q"), - VlanTag: pulumi.Int(1234), - }, - }, - }, - ZSide: &fabric.ConnectionZSideArgs{ - AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ - Type: pulumi.String("SP"), - AuthenticationKey: pulumi.String(awsAccountId), - SellerRegion: pulumi.String(awsRegion), - Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ - Type: pulumi.String("L2_PROFILE"), - Uuid: *pulumi.String(serviceProfileId), - }, - Location: &fabric.ConnectionZSideAccessPointLocationArgs{ - MetroCode: pulumi.String(metro), - }, - }, - }, - }) - if err != nil { - return err - } - ctx.Export("connectionId", colo2Aws.ID()) - ctx.Export("connectionStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { - return &operation.EquinixStatus, nil - }).(pulumi.StringPtrOutput)) - ctx.Export("connectionProviderStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { - return &operation.ProviderStatus, nil - }).(pulumi.StringPtrOutput)) - ctx.Export("awsDirectConnectId", colo2Aws.ZSide.ApplyT(func(zSide fabric.ConnectionZSide) (*string, error) { - return &zSide.AccessPoint.ProviderConnectionId, nil - }).(pulumi.StringPtrOutput)) - return nil - }) -} diff --git a/examples/fabric/connection/java/.gitignore b/examples/fabric/connection/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/fabric/connection/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/fabric/connection/java/Pulumi.yaml b/examples/fabric/connection/java/Pulumi.yaml deleted file mode 100644 index a795a403..00000000 --- a/examples/fabric/connection/java/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-fabric-connection -runtime: java -description: An Equinix Fabric Connection resource - Example connection from Equinix Fabric Port to AWS Direct Connect -config: - awsAccountId: - type: string - awsRegion: - type: string - default: eu-central-1 - fabricPortName: - type: string - metro: - type: string - default: FR - speedInMbps: - type: string - default: 50 diff --git a/examples/fabric/connection/java/pom.xml b/examples/fabric/connection/java/pom.xml deleted file mode 100644 index b2affcb4..00000000 --- a/examples/fabric/connection/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-fabric-connection - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/fabric/connection/java/src/main/java/generated_program/App.java b/examples/fabric/connection/java/src/main/java/generated_program/App.java deleted file mode 100644 index bd5d4995..00000000 --- a/examples/fabric/connection/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,94 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.fabric.Connection; -import com.equinix.pulumi.fabric.ConnectionArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionNotificationArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionRedundancyArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointPortArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointProfileArgs; -import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointLocationArgs; -import com.equinix.pulumi.fabric.inputs.GetServiceProfilesArgs; -import com.equinix.pulumi.fabric.inputs.GetServiceProfilesFilterArgs; -import com.equinix.pulumi.fabric.inputs.GetPortsArgs; -import com.equinix.pulumi.fabric.inputs.GetPortsFilterArgs; -import com.equinix.pulumi.fabric.FabricFunctions; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("FR"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("50")); - final var fabricPortName = config.get("fabricPortName").get().toString(); - final var awsRegion = config.get("awsRegion").orElse("eu-central-1"); - final var awsAccountId = config.get("awsAccountId").get().toString(); - System.out.println(System.getProperty("java.classpath")); - final var serviceProfileId = FabricFunctions.getServiceProfiles(GetServiceProfilesArgs.builder() - .filter(GetServiceProfilesFilterArgs.builder() - .property("/name") - .operator("=") - .values("AWS Direct Connect") - .build()) - .build()).applyValue(data -> data.data().get(0).uuid().get()); - - final var portId = FabricFunctions.getPorts(GetPortsArgs.builder() - .filter(GetPortsFilterArgs.builder() - .name(fabricPortName) - .build()) - .build()).applyValue(data -> data.data().get(0).uuid().get()); - - var colo2Aws = new Connection("colo2Aws", ConnectionArgs.builder() - .name("Pulumi-colo2Aws") - .type("EVPL_VC") - .notifications(ConnectionNotificationArgs.builder() - .type("ALL") - .emails("example@equinix.com") - .build()) - .bandwidth(speedInMbps) - .redundancy(ConnectionRedundancyArgs.builder() - .priority("PRIMARY") - .build()) - .aSide(ConnectionASideArgs.builder() - .accessPoint(ConnectionASideAccessPointArgs.builder() - .type("COLO") - .port(ConnectionASideAccessPointPortArgs.builder() - .uuid(portId) - .build()) - .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder() - .type("DOT1Q") - .vlanTag(1234) - .build()) - .build()) - .build()) - .zSide(ConnectionZSideArgs.builder() - .accessPoint(ConnectionZSideAccessPointArgs.builder() - .type("SP") - .authenticationKey(awsAccountId) - .sellerRegion(awsRegion) - .profile(ConnectionZSideAccessPointProfileArgs.builder() - .type("L2_PROFILE") - .uuid(serviceProfileId) - .build()) - .location(ConnectionZSideAccessPointLocationArgs.builder() - .metroCode(metro) - .build()) - .build()) - .build()) - .build()); - - ctx.export("connectionId", colo2Aws.id()); - ctx.export("connectionStatus", colo2Aws.operation().applyValue(operation -> operation.equinixStatus())); - ctx.export("connectionProviderStatus", colo2Aws.operation().applyValue(operation -> operation.providerStatus())); - ctx.export("awsDirectConnectId", colo2Aws.zSide().applyValue(zSide -> zSide.accessPoint().get().providerConnectionId())); - } -} diff --git a/examples/fabric/connection/python/Pulumi.yaml b/examples/fabric/connection/python/Pulumi.yaml deleted file mode 100644 index 324db14f..00000000 --- a/examples/fabric/connection/python/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-fabric-connection -runtime: python -description: An Equinix Fabric Connection resource - Example connection from Equinix Fabric Port to AWS Direct Connect -config: - awsAccountId: - type: string - awsRegion: - type: string - default: eu-central-1 - fabricPortName: - type: string - metro: - type: string - default: FR - speedInMbps: - type: integer - default: 50 diff --git a/examples/fabric/connection/python/__main__.py b/examples/fabric/connection/python/__main__.py deleted file mode 100644 index 99d40e7c..00000000 --- a/examples/fabric/connection/python/__main__.py +++ /dev/null @@ -1,64 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "FR" -speed_in_mbps = config.get_int("speedInMbps") -if speed_in_mbps is None: - speed_in_mbps = 50 -fabric_port_name = config.require("fabricPortName") -aws_region = config.get("awsRegion") -if aws_region is None: - aws_region = "eu-central-1" -aws_account_id = config.require("awsAccountId") -service_profile_id = equinix.fabric.get_service_profiles(filter=equinix.fabric.GetServiceProfilesFilterArgs( - property="/name", - operator="=", - values=["AWS Direct Connect"], -)).data[0].uuid -port_id = equinix.fabric.get_ports(filter=equinix.fabric.GetPortsFilterArgs( - name=fabric_port_name, -)).data[0].uuid -colo2_aws = equinix.fabric.Connection("colo2Aws", - name="Pulumi-colo2Aws", - type="EVPL_VC", - notifications=[equinix.fabric.ConnectionNotificationArgs( - type="ALL", - emails=["example@equinix.com"], - )], - bandwidth=speed_in_mbps, - redundancy=equinix.fabric.ConnectionRedundancyArgs( - priority="PRIMARY", - ), - a_side=equinix.fabric.ConnectionASideArgs( - access_point=equinix.fabric.ConnectionASideAccessPointArgs( - type="COLO", - port=equinix.fabric.ConnectionASideAccessPointPortArgs( - uuid=port_id, - ), - link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs( - type="DOT1Q", - vlan_tag=1234, - ), - ), - ), - z_side=equinix.fabric.ConnectionZSideArgs( - access_point=equinix.fabric.ConnectionZSideAccessPointArgs( - type="SP", - authentication_key=aws_account_id, - seller_region=aws_region, - profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs( - type="L2_PROFILE", - uuid=service_profile_id, - ), - location=equinix.fabric.ConnectionZSideAccessPointLocationArgs( - metro_code=metro, - ), - ), - )) -pulumi.export("connectionId", colo2_aws.id) -pulumi.export("connectionStatus", colo2_aws.operation.equinix_status) -pulumi.export("connectionProviderStatus", colo2_aws.operation.provider_status) -pulumi.export("awsDirectConnectId", colo2_aws.z_side.access_point.provider_connection_id) diff --git a/examples/fabric/connection/python/requirements.txt b/examples/fabric/connection/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/fabric/connection/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/fabric/connection/typescript/Pulumi.yaml b/examples/fabric/connection/typescript/Pulumi.yaml deleted file mode 100644 index f6232920..00000000 --- a/examples/fabric/connection/typescript/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-fabric-connection -runtime: nodejs -description: An Equinix Fabric Connection resource - Example connection from Equinix Fabric Port to AWS Direct Connect -config: - awsAccountId: - type: string - awsRegion: - type: string - default: eu-central-1 - fabricPortName: - type: string - metro: - type: string - default: FR - speedInMbps: - type: integer - default: 50 diff --git a/examples/fabric/connection/typescript/index.ts b/examples/fabric/connection/typescript/index.ts deleted file mode 100644 index 34d1021c..00000000 --- a/examples/fabric/connection/typescript/index.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const metro = config.get("metro") || "FR"; -const speedInMbps = config.getNumber("speedInMbps") || 50; -const fabricPortName = config.require("fabricPortName"); -const awsRegion = config.get("awsRegion") || "eu-central-1"; -const awsAccountId = config.require("awsAccountId"); -const serviceProfileId = equinix.fabric.getServiceProfiles({ - filter: { - property: "/name", - operator: "=", - values: ["AWS Direct Connect"], - }, -}).then(invoke => invoke.data?.[0]?.uuid!); -const portId = equinix.fabric.getPorts({ - filter: { - name: fabricPortName, - }, -}).then(invoke => invoke.data?.[0]?.uuid!); -const colo2Aws = new equinix.fabric.Connection("colo2Aws", { - name: "Pulumi-colo2Aws", - type: "EVPL_VC", - notifications: [{ - type: "ALL", - emails: ["example@equinix.com"], - }], - bandwidth: speedInMbps, - redundancy: { - priority: "PRIMARY", - }, - aSide: { - accessPoint: { - type: "COLO", - port: { - uuid: portId, - }, - linkProtocol: { - type: "DOT1Q", - vlanTag: 1234, - }, - }, - }, - zSide: { - accessPoint: { - type: "SP", - authenticationKey: awsAccountId, - sellerRegion: awsRegion, - profile: { - type: "L2_PROFILE", - uuid: serviceProfileId, - }, - location: { - metroCode: metro, - }, - }, - }, -}); -export const connectionId = colo2Aws.id; -export const connectionStatus = colo2Aws.operation.apply(operation => operation.equinixStatus); -export const connectionProviderStatus = colo2Aws.operation.apply(operation => operation.providerStatus); -export const awsDirectConnectId = colo2Aws.zSide.apply(zSide => zSide.accessPoint?.providerConnectionId); diff --git a/examples/fabric/connection/typescript/package.json b/examples/fabric/connection/typescript/package.json deleted file mode 100644 index c64f49fa..00000000 --- a/examples/fabric/connection/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-fabric-connection", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/fabric/connection/typescript/tsconfig.json b/examples/fabric/connection/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/fabric/connection/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/fabric/connection/yaml/Pulumi.yaml b/examples/fabric/connection/yaml/Pulumi.yaml deleted file mode 100644 index 872158d4..00000000 --- a/examples/fabric/connection/yaml/Pulumi.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: equinix-fabric-connection -runtime: yaml -description: An Equinix Fabric Connection resource - Example connection from Equinix Fabric Port to AWS Direct Connect -config: - metro: - type: string - default: FR - speedInMbps: - type: integer - default: 50 - fabricPortName: - type: string - awsRegion: - type: string - default: eu-central-1 - awsAccountId: - type: string -variables: - serviceProfileId: - fn::invoke: - function: equinix:fabric:getServiceProfiles - arguments: - filter: - property: /name - operator: "=" - values: - - AWS Direct Connect - return: data[0].uuid - portId: - fn::invoke: - function: equinix:fabric:getPorts - arguments: - filter: - name: ${fabricPortName} - return: data[0].uuid -resources: - colo2Aws: - type: equinix:fabric:Connection - properties: - name: Pulumi-colo2Aws - type: EVPL_VC - notifications: - - type: ALL - emails: - - example@equinix.com - bandwidth: ${speedInMbps} - redundancy: - priority: PRIMARY - aSide: - accessPoint: - type: COLO - port: - uuid: ${portId} - linkProtocol: - type: DOT1Q - vlanTag: 1234 - zSide: - accessPoint: - type: SP - authenticationKey: ${awsAccountId} - sellerRegion: ${awsRegion} - profile: - type: L2_PROFILE - uuid: ${serviceProfileId} - location: - metroCode: ${metro} -outputs: - connectionId: ${colo2Aws.id} - connectionStatus: ${colo2Aws.operation.equinixStatus} - connectionProviderStatus: ${colo2Aws.operation.providerStatus} - awsDirectConnectId: ${colo2Aws.zSide.accessPoint.providerConnectionId} diff --git a/examples/fabric/network/Pulumi.yaml b/examples/fabric/network/Pulumi.yaml new file mode 100644 index 00000000..348d8cde --- /dev/null +++ b/examples/fabric/network/Pulumi.yaml @@ -0,0 +1,17 @@ +name: equinix-fabric-network +runtime: yaml +resources: + newNetwork: + type: equinix:fabric:Network + name: new_network + properties: + name: Network-SV + type: EVPLAN + scope: GLOBAL + notifications: + - type: ALL + emails: + - example@equinix.com + - test1@equinix.com + project: + projectId: '776847000642406' diff --git a/examples/network/network_file/csharp/.gitignore b/examples/fabric/network/csharp/.gitignore similarity index 100% rename from examples/network/network_file/csharp/.gitignore rename to examples/fabric/network/csharp/.gitignore diff --git a/examples/fabric/network/csharp/Program.cs b/examples/fabric/network/csharp/Program.cs new file mode 100644 index 00000000..ae423670 --- /dev/null +++ b/examples/fabric/network/csharp/Program.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var newNetwork = new Equinix.Fabric.Network("newNetwork", new() + { + Name = "Network-SV", + Type = "EVPLAN", + Scope = "GLOBAL", + Notifications = new[] + { + new Equinix.Fabric.Inputs.NetworkNotificationArgs + { + Type = "ALL", + Emails = new[] + { + "example@equinix.com", + "test1@equinix.com", + }, + }, + }, + Project = new Equinix.Fabric.Inputs.NetworkProjectArgs + { + ProjectId = "776847000642406", + }, + }); + +}); + diff --git a/examples/fabric/network/csharp/Pulumi.yaml b/examples/fabric/network/csharp/Pulumi.yaml new file mode 100644 index 00000000..2b6df2c9 --- /dev/null +++ b/examples/fabric/network/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-network +runtime: dotnet diff --git a/examples/fabric/network/csharp/equinix-fabric-network.csproj b/examples/fabric/network/csharp/equinix-fabric-network.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/network/csharp/equinix-fabric-network.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/network/go/Pulumi.yaml b/examples/fabric/network/go/Pulumi.yaml new file mode 100644 index 00000000..c8fd13aa --- /dev/null +++ b/examples/fabric/network/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-network +runtime: go diff --git a/examples/fabric/network/go/go.mod b/examples/fabric/network/go/go.mod new file mode 100644 index 00000000..67e301a2 --- /dev/null +++ b/examples/fabric/network/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-network + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/network/go/main.go b/examples/fabric/network/go/main.go new file mode 100644 index 00000000..374ddf66 --- /dev/null +++ b/examples/fabric/network/go/main.go @@ -0,0 +1,32 @@ +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 { + _, err := fabric.NewNetwork(ctx, "newNetwork", &fabric.NetworkArgs{ + Name: pulumi.String("Network-SV"), + Type: pulumi.String("EVPLAN"), + Scope: pulumi.String("GLOBAL"), + Notifications: fabric.NetworkNotificationArray{ + &fabric.NetworkNotificationArgs{ + Type: pulumi.String("ALL"), + Emails: pulumi.StringArray{ + pulumi.String("example@equinix.com"), + pulumi.String("test1@equinix.com"), + }, + }, + }, + Project: &fabric.NetworkProjectArgs{ + ProjectId: pulumi.String("776847000642406"), + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/network/java/Pulumi.yaml b/examples/fabric/network/java/Pulumi.yaml new file mode 100644 index 00000000..399dd16f --- /dev/null +++ b/examples/fabric/network/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-network +runtime: java diff --git a/examples/fabric/network/java/pom.xml b/examples/fabric/network/java/pom.xml new file mode 100644 index 00000000..0e7030f0 --- /dev/null +++ b/examples/fabric/network/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-network + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/network/java/src/main/java/generated_program/App.java b/examples/fabric/network/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..7641ba03 --- /dev/null +++ b/examples/fabric/network/java/src/main/java/generated_program/App.java @@ -0,0 +1,39 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.Network; +import com.pulumi.equinix.fabric.NetworkArgs; +import com.pulumi.equinix.fabric.inputs.NetworkNotificationArgs; +import com.pulumi.equinix.fabric.inputs.NetworkProjectArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var newNetwork = new Network("newNetwork", NetworkArgs.builder() + .name("Network-SV") + .type("EVPLAN") + .scope("GLOBAL") + .notifications(NetworkNotificationArgs.builder() + .type("ALL") + .emails( + "example@equinix.com", + "test1@equinix.com") + .build()) + .project(NetworkProjectArgs.builder() + .projectId("776847000642406") + .build()) + .build()); + + } +} diff --git a/examples/network/network_file/python/.gitignore b/examples/fabric/network/python/.gitignore similarity index 100% rename from examples/network/network_file/python/.gitignore rename to examples/fabric/network/python/.gitignore diff --git a/examples/fabric/network/python/Pulumi.yaml b/examples/fabric/network/python/Pulumi.yaml new file mode 100644 index 00000000..afc278a8 --- /dev/null +++ b/examples/fabric/network/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-network +runtime: python diff --git a/examples/fabric/network/python/__main__.py b/examples/fabric/network/python/__main__.py new file mode 100644 index 00000000..1014c4e8 --- /dev/null +++ b/examples/fabric/network/python/__main__.py @@ -0,0 +1,17 @@ +import pulumi +import pulumi_equinix as equinix + +new_network = equinix.fabric.Network("newNetwork", + name="Network-SV", + type="EVPLAN", + scope="GLOBAL", + notifications=[equinix.fabric.NetworkNotificationArgs( + type="ALL", + emails=[ + "example@equinix.com", + "test1@equinix.com", + ], + )], + project=equinix.fabric.NetworkProjectArgs( + project_id="776847000642406", + )) diff --git a/examples/fabric/network/python/requirements.txt b/examples/fabric/network/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/network/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/network_file/typescript/.gitignore b/examples/fabric/network/typescript/.gitignore similarity index 100% rename from examples/network/network_file/typescript/.gitignore rename to examples/fabric/network/typescript/.gitignore diff --git a/examples/fabric/network/typescript/Pulumi.yaml b/examples/fabric/network/typescript/Pulumi.yaml new file mode 100644 index 00000000..30d88ef9 --- /dev/null +++ b/examples/fabric/network/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-network +runtime: nodejs diff --git a/examples/fabric/network/typescript/index.ts b/examples/fabric/network/typescript/index.ts new file mode 100644 index 00000000..6a1da6aa --- /dev/null +++ b/examples/fabric/network/typescript/index.ts @@ -0,0 +1,18 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const newNetwork = new equinix.fabric.Network("newNetwork", { + name: "Network-SV", + type: "EVPLAN", + scope: "GLOBAL", + notifications: [{ + type: "ALL", + emails: [ + "example@equinix.com", + "test1@equinix.com", + ], + }], + project: { + projectId: "776847000642406", + }, +}); diff --git a/examples/fabric/network/typescript/package.json b/examples/fabric/network/typescript/package.json new file mode 100644 index 00000000..84ea6ec8 --- /dev/null +++ b/examples/fabric/network/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-network", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/network/typescript/tsconfig.json b/examples/fabric/network/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/network/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/csharp/Program.cs b/examples/fabric/routing_protocol/csharp/Program.cs deleted file mode 100644 index 33c72970..00000000 --- a/examples/fabric/routing_protocol/csharp/Program.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var connectionId = config.Require("connectionId"); - var routingProtocol = new Equinix.Fabric.RoutingProtocol("RoutingProtocol", new() - { - ConnectionUuid = connectionId, - Name = "My-Direct-route-1", - Type = "DIRECT", - DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args - { - EquinixIfaceIp = "192.168.100.1/30", - }, - }); - - return new Dictionary - { - ["routingProtocolId"] = routingProtocol.Id, - ["routingProtocolState"] = routingProtocol.State, - ["routingProtocolEquinixAsn"] = routingProtocol.EquinixAsn, - }; -}); - diff --git a/examples/fabric/routing_protocol/csharp/Pulumi.yaml b/examples/fabric/routing_protocol/csharp/Pulumi.yaml deleted file mode 100644 index 2e31e1bb..00000000 --- a/examples/fabric/routing_protocol/csharp/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-fabric-routing-protocol -runtime: dotnet -description: Adds a routing protocol definition to a given Fabric Connection -config: - connectionId: - type: string diff --git a/examples/fabric/routing_protocol/csharp/equinix-fabric-routing-protocol.csproj b/examples/fabric/routing_protocol/csharp/equinix-fabric-routing-protocol.csproj deleted file mode 100644 index a70e40d7..00000000 --- a/examples/fabric/routing_protocol/csharp/equinix-fabric-routing-protocol.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example.md b/examples/fabric/routing_protocol/example.md deleted file mode 100644 index 4951897f..00000000 --- a/examples/fabric/routing_protocol/example.md +++ /dev/null @@ -1,183 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const connectionId = config.require("connectionId"); -const routingProtocol = new equinix.fabric.RoutingProtocol("RoutingProtocol", { - connectionUuid: connectionId, - name: "My-Direct-route-1", - type: "DIRECT", - directIpv4: { - equinixIfaceIp: "192.168.100.1/30", - }, -}); -export const routingProtocolId = routingProtocol.id; -export const routingProtocolState = routingProtocol.state; -export const routingProtocolEquinixAsn = routingProtocol.equinixAsn; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -connection_id = config.require("connectionId") -routing_protocol = equinix.fabric.RoutingProtocol("RoutingProtocol", - connection_uuid=connection_id, - name="My-Direct-route-1", - type="DIRECT", - direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args( - equinix_iface_ip="192.168.100.1/30", - )) -pulumi.export("routingProtocolId", routing_protocol.id) -pulumi.export("routingProtocolState", routing_protocol.state) -pulumi.export("routingProtocolEquinixAsn", routing_protocol.equinix_asn) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - connectionId := cfg.Require("connectionId") - routingProtocol, err := fabric.NewRoutingProtocol(ctx, "RoutingProtocol", &fabric.RoutingProtocolArgs{ - ConnectionUuid: pulumi.String(connectionId), - Name: pulumi.String("My-Direct-route-1"), - Type: pulumi.String("DIRECT"), - DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ - EquinixIfaceIp: pulumi.String("192.168.100.1/30"), - }, - }) - if err != nil { - return err - } - ctx.Export("routingProtocolId", routingProtocol.ID()) - ctx.Export("routingProtocolState", routingProtocol.State) - ctx.Export("routingProtocolEquinixAsn", routingProtocol.EquinixAsn) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using System.Linq; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var connectionId = config.Require("connectionId"); - var routingProtocol = new Equinix.Fabric.RoutingProtocol("RoutingProtocol", new() - { - ConnectionUuid = connectionId, - Name = "My-Direct-route-1", - Type = "DIRECT", - DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args - { - EquinixIfaceIp = "192.168.100.1/30", - }, - }); - - return new Dictionary - { - ["routingProtocolId"] = routingProtocol.Id, - ["routingProtocolState"] = routingProtocol.State, - ["routingProtocolEquinixAsn"] = routingProtocol.EquinixAsn, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.pulumi.equinix.fabric.RoutingProtocol; -import com.pulumi.equinix.fabric.RoutingProtocolArgs; -import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var connectionId = config.get("connectionId"); - var routingProtocol = new RoutingProtocol("routingProtocol", RoutingProtocolArgs.builder() - .connectionUuid(connectionId) - .name("My-Direct-route-1") - .type("DIRECT") - .directIpv4(RoutingProtocolDirectIpv4Args.builder() - .equinixIfaceIp("192.168.100.1/30") - .build()) - .build()); - - ctx.export("routingProtocolId", routingProtocol.id()); - ctx.export("routingProtocolState", routingProtocol.state()); - ctx.export("routingProtocolEquinixAsn", routingProtocol.equinixAsn()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - connectionId: - type: string -resources: - RoutingProtocol: - type: equinix:fabric:RoutingProtocol - properties: - connectionUuid: ${connectionId} - name: My-Direct-route-1 - type: DIRECT - directIpv4: - equinixIfaceIp: 192.168.100.1/30 -outputs: - routingProtocolId: ${RoutingProtocol.id} - routingProtocolState: ${RoutingProtocol.state} - routingProtocolEquinixAsn: ${RoutingProtocol.equinixAsn} -``` - -{{% /choosable %}} diff --git a/examples/fabric/routing_protocol/example_1/Pulumi.yaml b/examples/fabric/routing_protocol/example_1/Pulumi.yaml new file mode 100644 index 00000000..b5e611bf --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/Pulumi.yaml @@ -0,0 +1,13 @@ +name: equinix-fabric-routing_protocol-example_1 +runtime: yaml +resources: + direct: + type: equinix:fabric:RoutingProtocol + properties: + connectionUuid: + type: DIRECT + name: direct_rp + directIpv4: + equinixIfaceIp: 190.1.1.1/30 + directIpv6: + equinixIfaceIp: 190::1:1/126 diff --git a/examples/fabric/routing_protocol/example_1/csharp/.gitignore b/examples/fabric/routing_protocol/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/fabric/routing_protocol/example_1/csharp/Program.cs b/examples/fabric/routing_protocol/example_1/csharp/Program.cs new file mode 100644 index 00000000..4631387b --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/csharp/Program.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var direct = new Equinix.Fabric.RoutingProtocol("direct", new() + { + ConnectionUuid = "", + Type = "DIRECT", + Name = "direct_rp", + DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args + { + EquinixIfaceIp = "190.1.1.1/30", + }, + DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args + { + EquinixIfaceIp = "190::1:1/126", + }, + }); + +}); + diff --git a/examples/fabric/routing_protocol/example_1/csharp/Pulumi.yaml b/examples/fabric/routing_protocol/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..e7fed990 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_1 +runtime: dotnet diff --git a/examples/fabric/routing_protocol/example_1/csharp/equinix-fabric-routing_protocol-example_1.csproj b/examples/fabric/routing_protocol/example_1/csharp/equinix-fabric-routing_protocol-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/csharp/equinix-fabric-routing_protocol-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_1/go/Pulumi.yaml b/examples/fabric/routing_protocol/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..67c635df --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_1 +runtime: go diff --git a/examples/fabric/routing_protocol/example_1/go/go.mod b/examples/fabric/routing_protocol/example_1/go/go.mod new file mode 100644 index 00000000..d2c59e9d --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-routing_protocol-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/routing_protocol/example_1/go/main.go b/examples/fabric/routing_protocol/example_1/go/main.go new file mode 100644 index 00000000..e095eeb5 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/go/main.go @@ -0,0 +1,26 @@ +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 { + _, err := fabric.NewRoutingProtocol(ctx, "direct", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), + Type: pulumi.String("DIRECT"), + Name: pulumi.String("direct_rp"), + DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ + EquinixIfaceIp: pulumi.String("190.1.1.1/30"), + }, + DirectIpv6: &fabric.RoutingProtocolDirectIpv6Args{ + EquinixIfaceIp: pulumi.String("190::1:1/126"), + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/routing_protocol/example_1/java/Pulumi.yaml b/examples/fabric/routing_protocol/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..a5402690 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_1 +runtime: java diff --git a/examples/fabric/routing_protocol/example_1/java/pom.xml b/examples/fabric/routing_protocol/example_1/java/pom.xml new file mode 100644 index 00000000..bfe093ac --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-routing_protocol-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_1/java/src/main/java/generated_program/App.java b/examples/fabric/routing_protocol/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..236c7c0e --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,36 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.RoutingProtocol; +import com.pulumi.equinix.fabric.RoutingProtocolArgs; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var direct = new RoutingProtocol("direct", RoutingProtocolArgs.builder() + .connectionUuid("") + .type("DIRECT") + .name("direct_rp") + .directIpv4(RoutingProtocolDirectIpv4Args.builder() + .equinixIfaceIp("190.1.1.1/30") + .build()) + .directIpv6(RoutingProtocolDirectIpv6Args.builder() + .equinixIfaceIp("190::1:1/126") + .build()) + .build()); + + } +} diff --git a/examples/fabric/routing_protocol/example_1/python/.gitignore b/examples/fabric/routing_protocol/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_1/python/Pulumi.yaml b/examples/fabric/routing_protocol/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..caa9736a --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_1 +runtime: python diff --git a/examples/fabric/routing_protocol/example_1/python/__main__.py b/examples/fabric/routing_protocol/example_1/python/__main__.py new file mode 100644 index 00000000..6a9d7dd7 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/python/__main__.py @@ -0,0 +1,13 @@ +import pulumi +import pulumi_equinix as equinix + +direct = equinix.fabric.RoutingProtocol("direct", + connection_uuid="", + type="DIRECT", + name="direct_rp", + direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args( + equinix_iface_ip="190.1.1.1/30", + ), + direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args( + equinix_iface_ip="190::1:1/126", + )) diff --git a/examples/fabric/routing_protocol/example_1/python/requirements.txt b/examples/fabric/routing_protocol/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/fabric/routing_protocol/example_1/typescript/.gitignore b/examples/fabric/routing_protocol/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_1/typescript/Pulumi.yaml b/examples/fabric/routing_protocol/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..d6132166 --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_1 +runtime: nodejs diff --git a/examples/fabric/routing_protocol/example_1/typescript/index.ts b/examples/fabric/routing_protocol/example_1/typescript/index.ts new file mode 100644 index 00000000..49467f2e --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/typescript/index.ts @@ -0,0 +1,14 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const direct = new equinix.fabric.RoutingProtocol("direct", { + connectionUuid: "", + type: "DIRECT", + name: "direct_rp", + directIpv4: { + equinixIfaceIp: "190.1.1.1/30", + }, + directIpv6: { + equinixIfaceIp: "190::1:1/126", + }, +}); diff --git a/examples/fabric/routing_protocol/example_1/typescript/package.json b/examples/fabric/routing_protocol/example_1/typescript/package.json new file mode 100644 index 00000000..81171ffe --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-routing_protocol-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_1/typescript/tsconfig.json b/examples/fabric/routing_protocol/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/routing_protocol/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_2/Pulumi.yaml b/examples/fabric/routing_protocol/example_2/Pulumi.yaml new file mode 100644 index 00000000..c1f18ab0 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/Pulumi.yaml @@ -0,0 +1,16 @@ +name: equinix-fabric-routing_protocol-example_2 +runtime: yaml +resources: + bgp: + type: equinix:fabric:RoutingProtocol + properties: + connectionUuid: + type: BGP + name: bgp_rp + bgpIpv4: + customerPeerIp: 190.1.1.2 + enabled: true + bgpIpv6: + customerPeerIp: 190::1:2 + enabled: true + customerAsn: 4532 diff --git a/examples/fabric/routing_protocol/example_2/csharp/.gitignore b/examples/fabric/routing_protocol/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/fabric/routing_protocol/example_2/csharp/Program.cs b/examples/fabric/routing_protocol/example_2/csharp/Program.cs new file mode 100644 index 00000000..932945e1 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/csharp/Program.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var bgp = new Equinix.Fabric.RoutingProtocol("bgp", new() + { + ConnectionUuid = "", + Type = "BGP", + Name = "bgp_rp", + BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args + { + CustomerPeerIp = "190.1.1.2", + Enabled = true, + }, + BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args + { + CustomerPeerIp = "190::1:2", + Enabled = true, + }, + CustomerAsn = 4532, + }); + +}); + diff --git a/examples/fabric/routing_protocol/example_2/csharp/Pulumi.yaml b/examples/fabric/routing_protocol/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..9c5d1f1c --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_2 +runtime: dotnet diff --git a/examples/fabric/routing_protocol/example_2/csharp/equinix-fabric-routing_protocol-example_2.csproj b/examples/fabric/routing_protocol/example_2/csharp/equinix-fabric-routing_protocol-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/csharp/equinix-fabric-routing_protocol-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_2/go/Pulumi.yaml b/examples/fabric/routing_protocol/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..c4dda681 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_2 +runtime: go diff --git a/examples/fabric/routing_protocol/example_2/go/go.mod b/examples/fabric/routing_protocol/example_2/go/go.mod new file mode 100644 index 00000000..4f02e984 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-routing_protocol-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/routing_protocol/example_2/go/main.go b/examples/fabric/routing_protocol/example_2/go/main.go new file mode 100644 index 00000000..b6cc2b68 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/go/main.go @@ -0,0 +1,29 @@ +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 { + _, err := fabric.NewRoutingProtocol(ctx, "bgp", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), + Type: pulumi.String("BGP"), + Name: pulumi.String("bgp_rp"), + BgpIpv4: &fabric.RoutingProtocolBgpIpv4Args{ + CustomerPeerIp: pulumi.String("190.1.1.2"), + Enabled: pulumi.Bool(true), + }, + BgpIpv6: &fabric.RoutingProtocolBgpIpv6Args{ + CustomerPeerIp: pulumi.String("190::1:2"), + Enabled: pulumi.Bool(true), + }, + CustomerAsn: pulumi.Int(4532), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/routing_protocol/example_2/java/Pulumi.yaml b/examples/fabric/routing_protocol/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..43850949 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_2 +runtime: java diff --git a/examples/fabric/routing_protocol/example_2/java/pom.xml b/examples/fabric/routing_protocol/example_2/java/pom.xml new file mode 100644 index 00000000..f52c761a --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-routing_protocol-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_2/java/src/main/java/generated_program/App.java b/examples/fabric/routing_protocol/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..6052dd65 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,39 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.RoutingProtocol; +import com.pulumi.equinix.fabric.RoutingProtocolArgs; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var bgp = new RoutingProtocol("bgp", RoutingProtocolArgs.builder() + .connectionUuid("") + .type("BGP") + .name("bgp_rp") + .bgpIpv4(RoutingProtocolBgpIpv4Args.builder() + .customerPeerIp("190.1.1.2") + .enabled(true) + .build()) + .bgpIpv6(RoutingProtocolBgpIpv6Args.builder() + .customerPeerIp("190::1:2") + .enabled(true) + .build()) + .customerAsn(4532) + .build()); + + } +} diff --git a/examples/fabric/routing_protocol/example_2/python/.gitignore b/examples/fabric/routing_protocol/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_2/python/Pulumi.yaml b/examples/fabric/routing_protocol/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..5c21fa63 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_2 +runtime: python diff --git a/examples/fabric/routing_protocol/example_2/python/__main__.py b/examples/fabric/routing_protocol/example_2/python/__main__.py new file mode 100644 index 00000000..295455ef --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/python/__main__.py @@ -0,0 +1,16 @@ +import pulumi +import pulumi_equinix as equinix + +bgp = equinix.fabric.RoutingProtocol("bgp", + connection_uuid="", + type="BGP", + name="bgp_rp", + bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args( + customer_peer_ip="190.1.1.2", + enabled=True, + ), + bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args( + customer_peer_ip="190::1:2", + enabled=True, + ), + customer_asn=4532) diff --git a/examples/fabric/routing_protocol/example_2/python/requirements.txt b/examples/fabric/routing_protocol/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/fabric/routing_protocol/example_2/typescript/.gitignore b/examples/fabric/routing_protocol/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_2/typescript/Pulumi.yaml b/examples/fabric/routing_protocol/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..6c797b63 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_2 +runtime: nodejs diff --git a/examples/fabric/routing_protocol/example_2/typescript/index.ts b/examples/fabric/routing_protocol/example_2/typescript/index.ts new file mode 100644 index 00000000..d4fc0876 --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/typescript/index.ts @@ -0,0 +1,17 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const bgp = new equinix.fabric.RoutingProtocol("bgp", { + connectionUuid: "", + type: "BGP", + name: "bgp_rp", + bgpIpv4: { + customerPeerIp: "190.1.1.2", + enabled: true, + }, + bgpIpv6: { + customerPeerIp: "190::1:2", + enabled: true, + }, + customerAsn: 4532, +}); diff --git a/examples/fabric/routing_protocol/example_2/typescript/package.json b/examples/fabric/routing_protocol/example_2/typescript/package.json new file mode 100644 index 00000000..64ebc8ed --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-routing_protocol-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_2/typescript/tsconfig.json b/examples/fabric/routing_protocol/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/routing_protocol/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_3/Pulumi.yaml b/examples/fabric/routing_protocol/example_3/Pulumi.yaml new file mode 100644 index 00000000..ed221c4f --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/Pulumi.yaml @@ -0,0 +1,29 @@ +name: equinix-fabric-routing_protocol-example_3 +runtime: yaml +resources: + direct: + type: equinix:fabric:RoutingProtocol + properties: + connectionUuid: + type: DIRECT + name: direct_rp + directIpv4: + equinixIfaceIp: 190.1.1.1/30 + directIpv6: + equinixIfaceIp: 190::1:1/126 + bgp: + type: equinix:fabric:RoutingProtocol + properties: + connectionUuid: + type: BGP + name: bgp_rp + bgpIpv4: + customerPeerIp: 190.1.1.2 + enabled: true + bgpIpv6: + customerPeerIp: 190::1:2 + enabled: true + customerAsn: 4532 + options: + dependson: + - ${direct} diff --git a/examples/fabric/routing_protocol/example_3/csharp/.gitignore b/examples/fabric/routing_protocol/example_3/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/fabric/routing_protocol/example_3/csharp/Program.cs b/examples/fabric/routing_protocol/example_3/csharp/Program.cs new file mode 100644 index 00000000..69e34826 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/csharp/Program.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var direct = new Equinix.Fabric.RoutingProtocol("direct", new() + { + ConnectionUuid = "", + Type = "DIRECT", + Name = "direct_rp", + DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args + { + EquinixIfaceIp = "190.1.1.1/30", + }, + DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args + { + EquinixIfaceIp = "190::1:1/126", + }, + }); + + var bgp = new Equinix.Fabric.RoutingProtocol("bgp", new() + { + ConnectionUuid = "", + Type = "BGP", + Name = "bgp_rp", + BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args + { + CustomerPeerIp = "190.1.1.2", + Enabled = true, + }, + BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args + { + CustomerPeerIp = "190::1:2", + Enabled = true, + }, + CustomerAsn = 4532, + }, new CustomResourceOptions + { + DependsOn = + { + direct, + }, + }); + +}); + diff --git a/examples/fabric/routing_protocol/example_3/csharp/Pulumi.yaml b/examples/fabric/routing_protocol/example_3/csharp/Pulumi.yaml new file mode 100644 index 00000000..8956ab51 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_3 +runtime: dotnet diff --git a/examples/fabric/routing_protocol/example_3/csharp/equinix-fabric-routing_protocol-example_3.csproj b/examples/fabric/routing_protocol/example_3/csharp/equinix-fabric-routing_protocol-example_3.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/csharp/equinix-fabric-routing_protocol-example_3.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_3/go/Pulumi.yaml b/examples/fabric/routing_protocol/example_3/go/Pulumi.yaml new file mode 100644 index 00000000..a38efa01 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_3 +runtime: go diff --git a/examples/fabric/routing_protocol/example_3/go/go.mod b/examples/fabric/routing_protocol/example_3/go/go.mod new file mode 100644 index 00000000..7dd7bf29 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/go/go.mod @@ -0,0 +1,94 @@ +module equinix-fabric-routing_protocol-example_3 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/fabric/routing_protocol/example_3/go/main.go b/examples/fabric/routing_protocol/example_3/go/main.go new file mode 100644 index 00000000..7192560a --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/go/main.go @@ -0,0 +1,45 @@ +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 { + direct, err := fabric.NewRoutingProtocol(ctx, "direct", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), + Type: pulumi.String("DIRECT"), + Name: pulumi.String("direct_rp"), + DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ + EquinixIfaceIp: pulumi.String("190.1.1.1/30"), + }, + DirectIpv6: &fabric.RoutingProtocolDirectIpv6Args{ + EquinixIfaceIp: pulumi.String("190::1:1/126"), + }, + }) + if err != nil { + return err + } + _, err = fabric.NewRoutingProtocol(ctx, "bgp", &fabric.RoutingProtocolArgs{ + ConnectionUuid: pulumi.String(""), + Type: pulumi.String("BGP"), + Name: pulumi.String("bgp_rp"), + BgpIpv4: &fabric.RoutingProtocolBgpIpv4Args{ + CustomerPeerIp: pulumi.String("190.1.1.2"), + Enabled: pulumi.Bool(true), + }, + BgpIpv6: &fabric.RoutingProtocolBgpIpv6Args{ + CustomerPeerIp: pulumi.String("190::1:2"), + Enabled: pulumi.Bool(true), + }, + CustomerAsn: pulumi.Int(4532), + }, pulumi.DependsOn([]pulumi.Resource{ + direct, + })) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/fabric/routing_protocol/example_3/java/Pulumi.yaml b/examples/fabric/routing_protocol/example_3/java/Pulumi.yaml new file mode 100644 index 00000000..ba1c96f5 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_3 +runtime: java diff --git a/examples/fabric/routing_protocol/example_3/java/pom.xml b/examples/fabric/routing_protocol/example_3/java/pom.xml new file mode 100644 index 00000000..d6e6344e --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-fabric-routing_protocol-example_3 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_3/java/src/main/java/generated_program/App.java b/examples/fabric/routing_protocol/example_3/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..63211bf5 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/java/src/main/java/generated_program/App.java @@ -0,0 +1,56 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.RoutingProtocol; +import com.pulumi.equinix.fabric.RoutingProtocolArgs; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args; +import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args; +import com.pulumi.resources.CustomResourceOptions; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var direct = new RoutingProtocol("direct", RoutingProtocolArgs.builder() + .connectionUuid("") + .type("DIRECT") + .name("direct_rp") + .directIpv4(RoutingProtocolDirectIpv4Args.builder() + .equinixIfaceIp("190.1.1.1/30") + .build()) + .directIpv6(RoutingProtocolDirectIpv6Args.builder() + .equinixIfaceIp("190::1:1/126") + .build()) + .build()); + + var bgp = new RoutingProtocol("bgp", RoutingProtocolArgs.builder() + .connectionUuid("") + .type("BGP") + .name("bgp_rp") + .bgpIpv4(RoutingProtocolBgpIpv4Args.builder() + .customerPeerIp("190.1.1.2") + .enabled(true) + .build()) + .bgpIpv6(RoutingProtocolBgpIpv6Args.builder() + .customerPeerIp("190::1:2") + .enabled(true) + .build()) + .customerAsn(4532) + .build(), CustomResourceOptions.builder() + .dependsOn(direct) + .build()); + + } +} diff --git a/examples/fabric/routing_protocol/example_3/python/.gitignore b/examples/fabric/routing_protocol/example_3/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_3/python/Pulumi.yaml b/examples/fabric/routing_protocol/example_3/python/Pulumi.yaml new file mode 100644 index 00000000..0ca7fb85 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_3 +runtime: python diff --git a/examples/fabric/routing_protocol/example_3/python/__main__.py b/examples/fabric/routing_protocol/example_3/python/__main__.py new file mode 100644 index 00000000..a38a374d --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/python/__main__.py @@ -0,0 +1,27 @@ +import pulumi +import pulumi_equinix as equinix + +direct = equinix.fabric.RoutingProtocol("direct", + connection_uuid="", + type="DIRECT", + name="direct_rp", + direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args( + equinix_iface_ip="190.1.1.1/30", + ), + direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args( + equinix_iface_ip="190::1:1/126", + )) +bgp = equinix.fabric.RoutingProtocol("bgp", + connection_uuid="", + type="BGP", + name="bgp_rp", + bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args( + customer_peer_ip="190.1.1.2", + enabled=True, + ), + bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args( + customer_peer_ip="190::1:2", + enabled=True, + ), + customer_asn=4532, + opts = pulumi.ResourceOptions(depends_on=[direct])) diff --git a/examples/fabric/routing_protocol/example_3/python/requirements.txt b/examples/fabric/routing_protocol/example_3/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/fabric/routing_protocol/example_3/typescript/.gitignore b/examples/fabric/routing_protocol/example_3/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_3/typescript/Pulumi.yaml b/examples/fabric/routing_protocol/example_3/typescript/Pulumi.yaml new file mode 100644 index 00000000..773581a9 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-fabric-routing_protocol-example_3 +runtime: nodejs diff --git a/examples/fabric/routing_protocol/example_3/typescript/index.ts b/examples/fabric/routing_protocol/example_3/typescript/index.ts new file mode 100644 index 00000000..7c7efdba --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/typescript/index.ts @@ -0,0 +1,30 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const direct = new equinix.fabric.RoutingProtocol("direct", { + connectionUuid: "", + type: "DIRECT", + name: "direct_rp", + directIpv4: { + equinixIfaceIp: "190.1.1.1/30", + }, + directIpv6: { + equinixIfaceIp: "190::1:1/126", + }, +}); +const bgp = new equinix.fabric.RoutingProtocol("bgp", { + connectionUuid: "", + type: "BGP", + name: "bgp_rp", + bgpIpv4: { + customerPeerIp: "190.1.1.2", + enabled: true, + }, + bgpIpv6: { + customerPeerIp: "190::1:2", + enabled: true, + }, + customerAsn: 4532, +}, { + dependsOn: [direct], +}); diff --git a/examples/fabric/routing_protocol/example_3/typescript/package.json b/examples/fabric/routing_protocol/example_3/typescript/package.json new file mode 100644 index 00000000..b9f31ad9 --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-fabric-routing_protocol-example_3", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/example_3/typescript/tsconfig.json b/examples/fabric/routing_protocol/example_3/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/fabric/routing_protocol/example_3/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/go/Pulumi.yaml b/examples/fabric/routing_protocol/go/Pulumi.yaml deleted file mode 100644 index a30275f2..00000000 --- a/examples/fabric/routing_protocol/go/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-fabric-routing-protocol -runtime: go -description: Adds a routing protocol definition to a given Fabric Connection -config: - connectionId: - type: string diff --git a/examples/fabric/routing_protocol/go/go.mod b/examples/fabric/routing_protocol/go/go.mod deleted file mode 100644 index 8ba312ce..00000000 --- a/examples/fabric/routing_protocol/go/go.mod +++ /dev/null @@ -1,7 +0,0 @@ -module equinix-fabric-routing-protocol - -go 1.20 - -require ( - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) \ No newline at end of file diff --git a/examples/fabric/routing_protocol/go/main.go b/examples/fabric/routing_protocol/go/main.go deleted file mode 100644 index ec906146..00000000 --- a/examples/fabric/routing_protocol/go/main.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - connectionId := cfg.Require("connectionId") - routingProtocol, err := fabric.NewRoutingProtocol(ctx, "RoutingProtocol", &fabric.RoutingProtocolArgs{ - ConnectionUuid: pulumi.String(connectionId), - Name: pulumi.String("My-Direct-route-1"), - Type: pulumi.String("DIRECT"), - DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ - EquinixIfaceIp: pulumi.String("192.168.100.1/30"), - }, - }) - if err != nil { - return err - } - ctx.Export("routingProtocolId", routingProtocol.ID()) - ctx.Export("routingProtocolState", routingProtocol.State) - ctx.Export("routingProtocolEquinixAsn", routingProtocol.EquinixAsn) - return nil - }) -} diff --git a/examples/fabric/routing_protocol/java/Pulumi.yaml b/examples/fabric/routing_protocol/java/Pulumi.yaml deleted file mode 100644 index 2d7657e9..00000000 --- a/examples/fabric/routing_protocol/java/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-fabric-routing-protocol -runtime: java -description: Adds a routing protocol definition to a given Fabric Connection -config: - connectionId: - type: string diff --git a/examples/fabric/routing_protocol/java/pom.xml b/examples/fabric/routing_protocol/java/pom.xml deleted file mode 100644 index 46e639f5..00000000 --- a/examples/fabric/routing_protocol/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-fabric-routing-protocol - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.pulumi - pulumi - (,1.0] - - - com.pulumi - equinix - 0.2.2-alpha.1697554924+b109f1f4.dirty - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/fabric/routing_protocol/java/src/main/java/generated_program/App.java b/examples/fabric/routing_protocol/java/src/main/java/generated_program/App.java deleted file mode 100644 index 36e1b559..00000000 --- a/examples/fabric/routing_protocol/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,37 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.pulumi.equinix.fabric.RoutingProtocol; -import com.pulumi.equinix.fabric.RoutingProtocolArgs; -import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var connectionId = config.get("connectionId"); - var routingProtocol = new RoutingProtocol("routingProtocol", RoutingProtocolArgs.builder() - .connectionUuid(connectionId) - .name("My-Direct-route-1") - .type("DIRECT") - .directIpv4(RoutingProtocolDirectIpv4Args.builder() - .equinixIfaceIp("192.168.100.1/30") - .build()) - .build()); - - ctx.export("routingProtocolId", routingProtocol.id()); - ctx.export("routingProtocolState", routingProtocol.state()); - ctx.export("routingProtocolEquinixAsn", routingProtocol.equinixAsn()); - } -} diff --git a/examples/fabric/routing_protocol/python/Pulumi.yaml b/examples/fabric/routing_protocol/python/Pulumi.yaml deleted file mode 100644 index 47d47964..00000000 --- a/examples/fabric/routing_protocol/python/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-fabric-routing-protocol -runtime: python -description: Adds a routing protocol definition to a given Fabric Connection -config: - connectionId: - type: string diff --git a/examples/fabric/routing_protocol/python/__main__.py b/examples/fabric/routing_protocol/python/__main__.py deleted file mode 100644 index 4c017944..00000000 --- a/examples/fabric/routing_protocol/python/__main__.py +++ /dev/null @@ -1,15 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -connection_id = config.require("connectionId") -routing_protocol = equinix.fabric.RoutingProtocol("RoutingProtocol", - connection_uuid=connection_id, - name="My-Direct-route-1", - type="DIRECT", - direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args( - equinix_iface_ip="192.168.100.1/30", - )) -pulumi.export("routingProtocolId", routing_protocol.id) -pulumi.export("routingProtocolState", routing_protocol.state) -pulumi.export("routingProtocolEquinixAsn", routing_protocol.equinix_asn) diff --git a/examples/fabric/routing_protocol/python/requirements.txt b/examples/fabric/routing_protocol/python/requirements.txt deleted file mode 100644 index e08857f6..00000000 --- a/examples/fabric/routing_protocol/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix==0.2.2-alpha.1697554924+b109f1f4.dirty diff --git a/examples/fabric/routing_protocol/typescript/Pulumi.yaml b/examples/fabric/routing_protocol/typescript/Pulumi.yaml deleted file mode 100644 index cfcb9f5c..00000000 --- a/examples/fabric/routing_protocol/typescript/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-fabric-routing-protocol -runtime: nodejs -description: Adds a routing protocol definition to a given Fabric Connection -config: - connectionId: - type: string diff --git a/examples/fabric/routing_protocol/typescript/index.ts b/examples/fabric/routing_protocol/typescript/index.ts deleted file mode 100644 index f63acb9c..00000000 --- a/examples/fabric/routing_protocol/typescript/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const connectionId = config.require("connectionId"); -const routingProtocol = new equinix.fabric.RoutingProtocol("RoutingProtocol", { - connectionUuid: connectionId, - name: "My-Direct-route-1", - type: "DIRECT", - directIpv4: { - equinixIfaceIp: "192.168.100.1/30", - }, -}); -export const routingProtocolId = routingProtocol.id; -export const routingProtocolState = routingProtocol.state; -export const routingProtocolEquinixAsn = routingProtocol.equinixAsn; diff --git a/examples/fabric/routing_protocol/typescript/package.json b/examples/fabric/routing_protocol/typescript/package.json deleted file mode 100644 index 724727d2..00000000 --- a/examples/fabric/routing_protocol/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-fabric-routing-protocol", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "0.2.2-alpha.1697554924+b109f1f4.dirty" - } -} \ No newline at end of file diff --git a/examples/fabric/routing_protocol/yaml/Pulumi.yaml b/examples/fabric/routing_protocol/yaml/Pulumi.yaml deleted file mode 100644 index 6ad7ca0b..00000000 --- a/examples/fabric/routing_protocol/yaml/Pulumi.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: equinix-fabric-routing-protocol -runtime: yaml -description: Adds a routing protocol definition to a given Fabric Connection -config: - connectionId: - type: string -resources: - RoutingProtocol: - type: equinix:fabric:RoutingProtocol - properties: - connectionUuid: ${connectionId} - name: My-Direct-route-1 - type: DIRECT - directIpv4: - equinixIfaceIp: 192.168.100.1/30 -outputs: - routingProtocolId: ${RoutingProtocol.id} - routingProtocolState: ${RoutingProtocol.state} - routingProtocolEquinixAsn: ${RoutingProtocol.equinixAsn} \ No newline at end of file diff --git a/examples/fabric/service_profile/Pulumi.yaml b/examples/fabric/service_profile/Pulumi.yaml new file mode 100644 index 00000000..3553715e --- /dev/null +++ b/examples/fabric/service_profile/Pulumi.yaml @@ -0,0 +1,32 @@ +name: equinix-fabric-service_profile +runtime: yaml +resources: + newServiceProfile: + type: equinix:fabric:ServiceProfile + name: new_service_profile + properties: + description: Service Profile for Receiving Connections + name: Name Of Business + Use Case Tag + type: L2_PROFILE + visibility: PUBLIC + notifications: + - emails: + - someone@sample.com + type: BANDWIDTH_ALERT + allowedEmails: + - test@equinix.com + - testagain@equinix.com + ports: + - uuid: c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee + type: XF_PORT + accessPointTypeConfigs: + - type: COLO + allowRemoteConnections: true + allowCustomBandwidth: true + allowBandwidthAutoApproval: false + connectionRedundancyRequired: false + connectionLabel: Service Profile Tag1 + bandwidthAlertThreshold: 10 + supportedBandwidths: + - 100 + - 500 diff --git a/examples/fabric/service_profile/csharp/Program.cs b/examples/fabric/service_profile/csharp/Program.cs index a978e7f2..ce486cc8 100644 --- a/examples/fabric/service_profile/csharp/Program.cs +++ b/examples/fabric/service_profile/csharp/Program.cs @@ -1,67 +1,59 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var profile = new Equinix.Fabric.ServiceProfile("profile", new() + var newServiceProfile = new Equinix.Fabric.ServiceProfile("newServiceProfile", new() { - Name = "Example Cloud Provider", - Description = "50 to 500 Mbps Hosted Connection to Example Cloud", - Type = "L2_PROFILE", + Description = "Service Profile for Receiving Connections", + Name = "Name Of Business + Use Case Tag", + Type = Equinix.Fabric.ProfileType.L2Profile, + Visibility = Equinix.Fabric.ProfileVisibility.Public, + Notifications = new[] + { + new Equinix.Fabric.Inputs.ServiceProfileNotificationArgs + { + Emails = new[] + { + "someone@sample.com", + }, + Type = "BANDWIDTH_ALERT", + }, + }, + AllowedEmails = new[] + { + "test@equinix.com", + "testagain@equinix.com", + }, + Ports = new[] + { + new Equinix.Fabric.Inputs.ServiceProfilePortArgs + { + Uuid = "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee", + Type = "XF_PORT", + }, + }, AccessPointTypeConfigs = new[] { new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigArgs { - Type = "COLO", + Type = Equinix.Fabric.ProfileAccessPointType.Colo, + AllowRemoteConnections = true, + AllowCustomBandwidth = true, + AllowBandwidthAutoApproval = false, + ConnectionRedundancyRequired = false, + ConnectionLabel = "Service Profile Tag1", + BandwidthAlertThreshold = 10, SupportedBandwidths = new[] { - 50, 100, - 200, 500, }, - AllowRemoteConnections = true, - AllowCustomBandwidth = false, - AllowBandwidthAutoApproval = false, - LinkProtocolConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs - { - EncapsulationStrategy = "CTAGED", - ReuseVlanSTag = false, - Encapsulation = "DOT1Q", - }, - EnableAutoGenerateServiceKey = "false,", - ConnectionRedundancyRequired = "false,", - ApiConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs - { - ApiAvailable = true, - IntegrationId = "Example-Connect-01", - BandwidthFromApi = false, - }, - ConnectionLabel = "Virtual Circuit Name", - AuthenticationKey = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs - { - Required = true, - Label = "Example ACCOUNT ID", - }, }, }, - Account = new Equinix.Fabric.Inputs.ServiceProfileAccountArgs - { - OrganizationName = "Example Cloud", - GlobalOrganizationName = "Example Global", - }, - Metros = null, - Visibility = "PUBLIC", - MarketingInfo = new Equinix.Fabric.Inputs.ServiceProfileMarketingInfoArgs - { - Promotion = true, - }, }); - return new Dictionary - { - ["profileId"] = profile.Id, - }; }); diff --git a/examples/fabric/service_profile/csharp/Pulumi.yaml b/examples/fabric/service_profile/csharp/Pulumi.yaml index bb025046..f89f1794 100644 --- a/examples/fabric/service_profile/csharp/Pulumi.yaml +++ b/examples/fabric/service_profile/csharp/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-fabric-service-profile +name: equinix-fabric-service_profile runtime: dotnet -description: An Equinix Fabric service profile resource diff --git a/examples/fabric/service_profile/csharp/equinix-fabric-service-profile.csproj b/examples/fabric/service_profile/csharp/equinix-fabric-service-profile.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/fabric/service_profile/csharp/equinix-fabric-service-profile.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/fabric/service_profile/csharp/equinix-fabric-service_profile.csproj b/examples/fabric/service_profile/csharp/equinix-fabric-service_profile.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/fabric/service_profile/csharp/equinix-fabric-service_profile.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/fabric/service_profile/example.md b/examples/fabric/service_profile/example.md deleted file mode 100644 index dbac95c6..00000000 --- a/examples/fabric/service_profile/example.md +++ /dev/null @@ -1,363 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const profile = new equinix.fabric.ServiceProfile("profile", { - name: "Example Cloud Provider", - description: "50 to 500 Mbps Hosted Connection to Example Cloud", - type: "L2_PROFILE", - accessPointTypeConfigs: [{ - type: "COLO", - supportedBandwidths: [ - 50, - 100, - 200, - 500, - ], - allowRemoteConnections: true, - allowCustomBandwidth: false, - allowBandwidthAutoApproval: false, - linkProtocolConfig: { - encapsulationStrategy: "CTAGED", - reuseVlanSTag: false, - encapsulation: "DOT1Q", - }, - enableAutoGenerateServiceKey: "false,", - connectionRedundancyRequired: "false,", - apiConfig: { - apiAvailable: true, - integrationId: "Example-Connect-01", - bandwidthFromApi: false, - }, - connectionLabel: "Virtual Circuit Name", - authenticationKey: { - required: true, - label: "Example ACCOUNT ID", - }, - }], - account: { - organizationName: "Example Cloud", - globalOrganizationName: "Example Global", - }, - metros: undefined, - visibility: "PUBLIC", - marketingInfo: { - promotion: true, - }, -}); -export const profileId = profile.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -profile = equinix.fabric.ServiceProfile("profile", - name="Example Cloud Provider", - description="50 to 500 Mbps Hosted Connection to Example Cloud", - type="L2_PROFILE", - access_point_type_configs=[equinix.fabric.ServiceProfileAccessPointTypeConfigArgs( - type="COLO", - supported_bandwidths=[ - 50, - 100, - 200, - 500, - ], - allow_remote_connections=True, - allow_custom_bandwidth=False, - allow_bandwidth_auto_approval=False, - link_protocol_config=equinix.fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs( - encapsulation_strategy="CTAGED", - reuse_vlan_s_tag=False, - encapsulation="DOT1Q", - ), - enable_auto_generate_service_key="false,", - connection_redundancy_required="false,", - api_config=equinix.fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs( - api_available=True, - integration_id="Example-Connect-01", - bandwidth_from_api=False, - ), - connection_label="Virtual Circuit Name", - authentication_key=equinix.fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs( - required=True, - label="Example ACCOUNT ID", - ), - )], - account=equinix.fabric.ServiceProfileAccountArgs( - organization_name="Example Cloud", - global_organization_name="Example Global", - ), - metros=None, - visibility="PUBLIC", - marketing_info=equinix.fabric.ServiceProfileMarketingInfoArgs( - promotion=True, - )) -pulumi.export("profileId", profile.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```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 { - profile, err := fabric.NewServiceProfile(ctx, "profile", &fabric.ServiceProfileArgs{ - Name: pulumi.String("Example Cloud Provider"), - Description: pulumi.String("50 to 500 Mbps Hosted Connection to Example Cloud"), - Type: pulumi.String("L2_PROFILE"), - AccessPointTypeConfigs: fabric.ServiceProfileAccessPointTypeConfigArray{ - &fabric.ServiceProfileAccessPointTypeConfigArgs{ - Type: pulumi.String("COLO"), - SupportedBandwidths: pulumi.IntArray{ - pulumi.Int(50), - pulumi.Int(100), - pulumi.Int(200), - pulumi.Int(500), - }, - AllowRemoteConnections: pulumi.Bool(true), - AllowCustomBandwidth: pulumi.Bool(false), - AllowBandwidthAutoApproval: pulumi.Bool(false), - LinkProtocolConfig: &fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs{ - EncapsulationStrategy: pulumi.String("CTAGED"), - ReuseVlanSTag: pulumi.Bool(false), - Encapsulation: pulumi.String("DOT1Q"), - }, - EnableAutoGenerateServiceKey: pulumi.Bool("false,"), - ConnectionRedundancyRequired: pulumi.Bool("false,"), - ApiConfig: &fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs{ - ApiAvailable: pulumi.Bool(true), - IntegrationId: pulumi.String("Example-Connect-01"), - BandwidthFromApi: pulumi.Bool(false), - }, - ConnectionLabel: pulumi.String("Virtual Circuit Name"), - AuthenticationKey: &fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs{ - Required: pulumi.Bool(true), - Label: pulumi.String("Example ACCOUNT ID"), - }, - }, - }, - Account: &fabric.ServiceProfileAccountArgs{ - OrganizationName: pulumi.String("Example Cloud"), - GlobalOrganizationName: pulumi.String("Example Global"), - }, - Metros: nil, - Visibility: pulumi.String("PUBLIC"), - MarketingInfo: &fabric.ServiceProfileMarketingInfoArgs{ - Promotion: pulumi.Bool(true), - }, - }) - if err != nil { - return err - } - ctx.Export("profileId", profile.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var profile = new Equinix.Fabric.ServiceProfile("profile", new() - { - Name = "Example Cloud Provider", - Description = "50 to 500 Mbps Hosted Connection to Example Cloud", - Type = "L2_PROFILE", - AccessPointTypeConfigs = new[] - { - new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigArgs - { - Type = "COLO", - SupportedBandwidths = new[] - { - 50, - 100, - 200, - 500, - }, - AllowRemoteConnections = true, - AllowCustomBandwidth = false, - AllowBandwidthAutoApproval = false, - LinkProtocolConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs - { - EncapsulationStrategy = "CTAGED", - ReuseVlanSTag = false, - Encapsulation = "DOT1Q", - }, - EnableAutoGenerateServiceKey = "false,", - ConnectionRedundancyRequired = "false,", - ApiConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs - { - ApiAvailable = true, - IntegrationId = "Example-Connect-01", - BandwidthFromApi = false, - }, - ConnectionLabel = "Virtual Circuit Name", - AuthenticationKey = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs - { - Required = true, - Label = "Example ACCOUNT ID", - }, - }, - }, - Account = new Equinix.Fabric.Inputs.ServiceProfileAccountArgs - { - OrganizationName = "Example Cloud", - GlobalOrganizationName = "Example Global", - }, - Metros = null, - Visibility = "PUBLIC", - MarketingInfo = new Equinix.Fabric.Inputs.ServiceProfileMarketingInfoArgs - { - Promotion = true, - }, - }); - - return new Dictionary - { - ["profileId"] = profile.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.fabric.ServiceProfile; -import com.equinix.pulumi.fabric.ServiceProfileArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccountArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileMarketingInfoArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var profile = new ServiceProfile("profile", ServiceProfileArgs.builder() - .name("Example Cloud Provider") - .description("50 to 500 Mbps Hosted Connection to Example Cloud") - .type("L2_PROFILE") - .accessPointTypeConfigs(ServiceProfileAccessPointTypeConfigArgs.builder() - .type("COLO") - .supportedBandwidths( - 50, - 100, - 200, - 500) - .allowRemoteConnections(true) - .allowCustomBandwidth(false) - .allowBandwidthAutoApproval(false) - .linkProtocolConfig(ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs.builder() - .encapsulationStrategy("CTAGED") - .reuseVlanSTag(false) - .encapsulation("DOT1Q") - .build()) - .enableAutoGenerateServiceKey(false) - .connectionRedundancyRequired(false) - .apiConfig(ServiceProfileAccessPointTypeConfigApiConfigArgs.builder() - .apiAvailable(true) - .integrationId("Example-Connect-01") - .bandwidthFromApi(false) - .build()) - .connectionLabel("Virtual Circuit Name") - .authenticationKey(ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs.builder() - .required(true) - .label("Example ACCOUNT ID") - .build()) - .build()) - .account(ServiceProfileAccountArgs.builder() - .organizationName("Example Cloud") - .globalOrganizationName("Example Global") - .build()) - .visibility("PUBLIC") - .marketingInfo(ServiceProfileMarketingInfoArgs.builder() - .promotion(true) - .build()) - .build()); - - ctx.export("profileId", profile.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -resources: - profile: - type: equinix:fabric:ServiceProfile - properties: - name: Example Cloud Provider - description: 50 to 500 Mbps Hosted Connection to Example Cloud - type: L2_PROFILE - accessPointTypeConfigs: - - type: COLO - supportedBandwidths: [ 50, 100, 200, 500] - allowRemoteConnections: true - allowCustomBandwidth: false - allowBandwidthAutoApproval: false - linkProtocolConfig: - encapsulationStrategy: CTAGED - reuseVlanSTag: false - encapsulation: DOT1Q - enableAutoGenerateServiceKey: false, - connectionRedundancyRequired: false, - apiConfig: - apiAvailable: true - integrationId: Example-Connect-01 - bandwidthFromApi: false - connectionLabel: Virtual Circuit Name - authenticationKey: - required: true - label: Example ACCOUNT ID - account: - organizationName: Example Cloud - globalOrganizationName: Example Global - metros: - visibility: PUBLIC - marketingInfo: - promotion: true -outputs: - profileId: ${profile.id} -``` - -{{% /choosable %}} diff --git a/examples/fabric/service_profile/go/Pulumi.yaml b/examples/fabric/service_profile/go/Pulumi.yaml index befb03a7..09e99b08 100644 --- a/examples/fabric/service_profile/go/Pulumi.yaml +++ b/examples/fabric/service_profile/go/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-fabric-service-profile +name: equinix-fabric-service_profile runtime: go -description: An Equinix Fabric service profile resource diff --git a/examples/fabric/service_profile/go/go.mod b/examples/fabric/service_profile/go/go.mod index de82d904..13e2f1b1 100644 --- a/examples/fabric/service_profile/go/go.mod +++ b/examples/fabric/service_profile/go/go.mod @@ -1,58 +1,94 @@ -module equinix-fabric-service-profile +module equinix-fabric-service_profile -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/fabric/service_profile/go/main.go b/examples/fabric/service_profile/go/main.go index 15640699..734a93b9 100644 --- a/examples/fabric/service_profile/go/main.go +++ b/examples/fabric/service_profile/go/main.go @@ -7,55 +7,48 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - profile, err := fabric.NewServiceProfile(ctx, "profile", &fabric.ServiceProfileArgs{ - Name: pulumi.String("Example Cloud Provider"), - Description: pulumi.String("50 to 500 Mbps Hosted Connection to Example Cloud"), - Type: pulumi.String("L2_PROFILE"), + _, err := fabric.NewServiceProfile(ctx, "newServiceProfile", &fabric.ServiceProfileArgs{ + Description: pulumi.String("Service Profile for Receiving Connections"), + Name: pulumi.String("Name Of Business + Use Case Tag"), + Type: pulumi.String(fabric.ProfileTypeL2Profile), + Visibility: pulumi.String(fabric.ProfileVisibilityPublic), + Notifications: fabric.ServiceProfileNotificationArray{ + &fabric.ServiceProfileNotificationArgs{ + Emails: pulumi.StringArray{ + pulumi.String("someone@sample.com"), + }, + Type: pulumi.String("BANDWIDTH_ALERT"), + }, + }, + AllowedEmails: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + pulumi.String("testagain@equinix.com"), + }, + Ports: fabric.ServiceProfilePortArray{ + &fabric.ServiceProfilePortArgs{ + Uuid: pulumi.String("c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee"), + Type: pulumi.String("XF_PORT"), + }, + }, AccessPointTypeConfigs: fabric.ServiceProfileAccessPointTypeConfigArray{ &fabric.ServiceProfileAccessPointTypeConfigArgs{ - Type: pulumi.String("COLO"), + Type: pulumi.String(fabric.ProfileAccessPointTypeColo), + AllowRemoteConnections: pulumi.Bool(true), + AllowCustomBandwidth: pulumi.Bool(true), + AllowBandwidthAutoApproval: pulumi.Bool(false), + ConnectionRedundancyRequired: pulumi.Bool(false), + ConnectionLabel: pulumi.String("Service Profile Tag1"), + BandwidthAlertThreshold: pulumi.Float64(10), SupportedBandwidths: pulumi.IntArray{ - pulumi.Int(50), pulumi.Int(100), - pulumi.Int(200), pulumi.Int(500), }, - AllowRemoteConnections: pulumi.Bool(true), - AllowCustomBandwidth: pulumi.Bool(false), - AllowBandwidthAutoApproval: pulumi.Bool(false), - LinkProtocolConfig: &fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs{ - EncapsulationStrategy: pulumi.String("CTAGED"), - ReuseVlanSTag: pulumi.Bool(false), - Encapsulation: pulumi.String("DOT1Q"), - }, - EnableAutoGenerateServiceKey: pulumi.Bool("false,"), - ConnectionRedundancyRequired: pulumi.Bool("false,"), - ApiConfig: &fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs{ - ApiAvailable: pulumi.Bool(true), - IntegrationId: pulumi.String("Example-Connect-01"), - BandwidthFromApi: pulumi.Bool(false), - }, - ConnectionLabel: pulumi.String("Virtual Circuit Name"), - AuthenticationKey: &fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs{ - Required: pulumi.Bool(true), - Label: pulumi.String("Example ACCOUNT ID"), - }, }, }, - Account: &fabric.ServiceProfileAccountArgs{ - OrganizationName: pulumi.String("Example Cloud"), - GlobalOrganizationName: pulumi.String("Example Global"), - }, - Metros: nil, - Visibility: pulumi.String("PUBLIC"), - MarketingInfo: &fabric.ServiceProfileMarketingInfoArgs{ - Promotion: pulumi.Bool(true), - }, }) if err != nil { return err } - ctx.Export("profileId", profile.ID()) return nil }) } diff --git a/examples/fabric/service_profile/java/.gitignore b/examples/fabric/service_profile/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/fabric/service_profile/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/fabric/service_profile/java/Pulumi.yaml b/examples/fabric/service_profile/java/Pulumi.yaml index c2bfe4b9..54b576e2 100644 --- a/examples/fabric/service_profile/java/Pulumi.yaml +++ b/examples/fabric/service_profile/java/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-fabric-service-profile +name: equinix-fabric-service_profile runtime: java -description: An Equinix Fabric service profile resource diff --git a/examples/fabric/service_profile/java/pom.xml b/examples/fabric/service_profile/java/pom.xml index 976ff7e0..d4aeb3f1 100644 --- a/examples/fabric/service_profile/java/pom.xml +++ b/examples/fabric/service_profile/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-fabric-service-profile + equinix-fabric-service_profile 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/fabric/service_profile/java/src/main/java/generated_program/App.java b/examples/fabric/service_profile/java/src/main/java/generated_program/App.java index 3dd05b24..a778da44 100644 --- a/examples/fabric/service_profile/java/src/main/java/generated_program/App.java +++ b/examples/fabric/service_profile/java/src/main/java/generated_program/App.java @@ -2,14 +2,18 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.fabric.ServiceProfile; -import com.equinix.pulumi.fabric.ServiceProfileArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileAccountArgs; -import com.equinix.pulumi.fabric.inputs.ServiceProfileMarketingInfoArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.fabric.ServiceProfile; +import com.pulumi.equinix.fabric.ServiceProfileArgs; +import com.pulumi.equinix.fabric.inputs.ServiceProfileNotificationArgs; +import com.pulumi.equinix.fabric.inputs.ServiceProfilePortArgs; +import com.pulumi.equinix.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -17,48 +21,35 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - var profile = new ServiceProfile("profile", ServiceProfileArgs.builder() - .name("Example Cloud Provider") - .description("50 to 500 Mbps Hosted Connection to Example Cloud") + var newServiceProfile = new ServiceProfile("newServiceProfile", ServiceProfileArgs.builder() + .description("Service Profile for Receiving Connections") + .name("Name Of Business + Use Case Tag") .type("L2_PROFILE") + .visibility("PUBLIC") + .notifications(ServiceProfileNotificationArgs.builder() + .emails("someone@sample.com") + .type("BANDWIDTH_ALERT") + .build()) + .allowedEmails( + "test@equinix.com", + "testagain@equinix.com") + .ports(ServiceProfilePortArgs.builder() + .uuid("c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee") + .type("XF_PORT") + .build()) .accessPointTypeConfigs(ServiceProfileAccessPointTypeConfigArgs.builder() .type("COLO") - .supportedBandwidths( - 50, - 100, - 200, - 500) .allowRemoteConnections(true) - .allowCustomBandwidth(false) + .allowCustomBandwidth(true) .allowBandwidthAutoApproval(false) - .linkProtocolConfig(ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs.builder() - .encapsulationStrategy("CTAGED") - .reuseVlanSTag(false) - .encapsulation("DOT1Q") - .build()) - .enableAutoGenerateServiceKey(false) .connectionRedundancyRequired(false) - .apiConfig(ServiceProfileAccessPointTypeConfigApiConfigArgs.builder() - .apiAvailable(true) - .integrationId("Example-Connect-01") - .bandwidthFromApi(false) - .build()) - .connectionLabel("Virtual Circuit Name") - .authenticationKey(ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs.builder() - .required(true) - .label("Example ACCOUNT ID") - .build()) - .build()) - .account(ServiceProfileAccountArgs.builder() - .organizationName("Example Cloud") - .globalOrganizationName("Example Global") - .build()) - .visibility("PUBLIC") - .marketingInfo(ServiceProfileMarketingInfoArgs.builder() - .promotion(true) + .connectionLabel("Service Profile Tag1") + .bandwidthAlertThreshold(10) + .supportedBandwidths( + 100, + 500) .build()) .build()); - ctx.export("profileId", profile.id()); } } diff --git a/examples/fabric/service_profile/python/Pulumi.yaml b/examples/fabric/service_profile/python/Pulumi.yaml index 7cdeb8d6..48a24575 100644 --- a/examples/fabric/service_profile/python/Pulumi.yaml +++ b/examples/fabric/service_profile/python/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-fabric-service-profile +name: equinix-fabric-service_profile runtime: python -description: An Equinix Fabric service profile resource diff --git a/examples/fabric/service_profile/python/__main__.py b/examples/fabric/service_profile/python/__main__.py index b8faffa8..fcf7139f 100644 --- a/examples/fabric/service_profile/python/__main__.py +++ b/examples/fabric/service_profile/python/__main__.py @@ -1,46 +1,33 @@ import pulumi import pulumi_equinix as equinix -profile = equinix.fabric.ServiceProfile("profile", - name="Example Cloud Provider", - description="50 to 500 Mbps Hosted Connection to Example Cloud", - type="L2_PROFILE", +new_service_profile = equinix.fabric.ServiceProfile("newServiceProfile", + description="Service Profile for Receiving Connections", + name="Name Of Business + Use Case Tag", + type=equinix.fabric.ProfileType.L2_PROFILE, + visibility=equinix.fabric.ProfileVisibility.PUBLIC, + notifications=[equinix.fabric.ServiceProfileNotificationArgs( + emails=["someone@sample.com"], + type="BANDWIDTH_ALERT", + )], + allowed_emails=[ + "test@equinix.com", + "testagain@equinix.com", + ], + ports=[equinix.fabric.ServiceProfilePortArgs( + uuid="c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee", + type="XF_PORT", + )], access_point_type_configs=[equinix.fabric.ServiceProfileAccessPointTypeConfigArgs( - type="COLO", + type=equinix.fabric.ProfileAccessPointType.COLO, + allow_remote_connections=True, + allow_custom_bandwidth=True, + allow_bandwidth_auto_approval=False, + connection_redundancy_required=False, + connection_label="Service Profile Tag1", + bandwidth_alert_threshold=10, supported_bandwidths=[ - 50, 100, - 200, 500, ], - allow_remote_connections=True, - allow_custom_bandwidth=False, - allow_bandwidth_auto_approval=False, - link_protocol_config=equinix.fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs( - encapsulation_strategy="CTAGED", - reuse_vlan_s_tag=False, - encapsulation="DOT1Q", - ), - enable_auto_generate_service_key="false,", - connection_redundancy_required="false,", - api_config=equinix.fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs( - api_available=True, - integration_id="Example-Connect-01", - bandwidth_from_api=False, - ), - connection_label="Virtual Circuit Name", - authentication_key=equinix.fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs( - required=True, - label="Example ACCOUNT ID", - ), - )], - account=equinix.fabric.ServiceProfileAccountArgs( - organization_name="Example Cloud", - global_organization_name="Example Global", - ), - metros=None, - visibility="PUBLIC", - marketing_info=equinix.fabric.ServiceProfileMarketingInfoArgs( - promotion=True, - )) -pulumi.export("profileId", profile.id) + )]) diff --git a/examples/fabric/service_profile/python/requirements.txt b/examples/fabric/service_profile/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/fabric/service_profile/python/requirements.txt +++ b/examples/fabric/service_profile/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/fabric/service_profile/typescript/Pulumi.yaml b/examples/fabric/service_profile/typescript/Pulumi.yaml index ad517c1a..ed2257ab 100644 --- a/examples/fabric/service_profile/typescript/Pulumi.yaml +++ b/examples/fabric/service_profile/typescript/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-fabric-service-profile +name: equinix-fabric-service_profile runtime: nodejs -description: An Equinix Fabric service profile resource diff --git a/examples/fabric/service_profile/typescript/index.ts b/examples/fabric/service_profile/typescript/index.ts index d46d0c39..5607d1fe 100644 --- a/examples/fabric/service_profile/typescript/index.ts +++ b/examples/fabric/service_profile/typescript/index.ts @@ -1,47 +1,34 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const profile = new equinix.fabric.ServiceProfile("profile", { - name: "Example Cloud Provider", - description: "50 to 500 Mbps Hosted Connection to Example Cloud", - type: "L2_PROFILE", +const newServiceProfile = new equinix.fabric.ServiceProfile("newServiceProfile", { + description: "Service Profile for Receiving Connections", + name: "Name Of Business + Use Case Tag", + type: equinix.fabric.ProfileType.L2Profile, + visibility: equinix.fabric.ProfileVisibility.Public, + notifications: [{ + emails: ["someone@sample.com"], + type: "BANDWIDTH_ALERT", + }], + allowedEmails: [ + "test@equinix.com", + "testagain@equinix.com", + ], + ports: [{ + uuid: "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee", + type: "XF_PORT", + }], accessPointTypeConfigs: [{ - type: "COLO", + type: equinix.fabric.ProfileAccessPointType.Colo, + allowRemoteConnections: true, + allowCustomBandwidth: true, + allowBandwidthAutoApproval: false, + connectionRedundancyRequired: false, + connectionLabel: "Service Profile Tag1", + bandwidthAlertThreshold: 10, supportedBandwidths: [ - 50, 100, - 200, 500, ], - allowRemoteConnections: true, - allowCustomBandwidth: false, - allowBandwidthAutoApproval: false, - linkProtocolConfig: { - encapsulationStrategy: "CTAGED", - reuseVlanSTag: false, - encapsulation: "DOT1Q", - }, - enableAutoGenerateServiceKey: "false,", - connectionRedundancyRequired: "false,", - apiConfig: { - apiAvailable: true, - integrationId: "Example-Connect-01", - bandwidthFromApi: false, - }, - connectionLabel: "Virtual Circuit Name", - authenticationKey: { - required: true, - label: "Example ACCOUNT ID", - }, }], - account: { - organizationName: "Example Cloud", - globalOrganizationName: "Example Global", - }, - metros: undefined, - visibility: "PUBLIC", - marketingInfo: { - promotion: true, - }, }); -export const profileId = profile.id; diff --git a/examples/fabric/service_profile/typescript/package.json b/examples/fabric/service_profile/typescript/package.json index ea6d0909..17c1f441 100644 --- a/examples/fabric/service_profile/typescript/package.json +++ b/examples/fabric/service_profile/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-fabric-service-profile", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-fabric-service_profile", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/fabric/service_profile/typescript/tsconfig.json b/examples/fabric/service_profile/typescript/tsconfig.json index 2ed7ea95..11fc69af 100644 --- a/examples/fabric/service_profile/typescript/tsconfig.json +++ b/examples/fabric/service_profile/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts", - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/fabric/service_profile/yaml/Pulumi.yaml b/examples/fabric/service_profile/yaml/Pulumi.yaml deleted file mode 100644 index 94f61299..00000000 --- a/examples/fabric/service_profile/yaml/Pulumi.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: equinix-fabric-service-profile -runtime: yaml -description: An Equinix Fabric service profile resource -resources: - profile: - type: equinix:fabric:ServiceProfile - properties: - name: Example Cloud Provider - description: 50 to 500 Mbps Hosted Connection to Example Cloud - type: L2_PROFILE - accessPointTypeConfigs: - - type: COLO - supportedBandwidths: [ 50, 100, 200, 500] - allowRemoteConnections: true - allowCustomBandwidth: false - allowBandwidthAutoApproval: false - linkProtocolConfig: - encapsulationStrategy: CTAGED - reuseVlanSTag: false - encapsulation: DOT1Q - enableAutoGenerateServiceKey: false, - connectionRedundancyRequired: false, - apiConfig: - apiAvailable: true - integrationId: Example-Connect-01 - bandwidthFromApi: false - connectionLabel: Virtual Circuit Name - authenticationKey: - required: true - label: Example ACCOUNT ID - account: - organizationName: Example Cloud - globalOrganizationName: Example Global - metros: - visibility: PUBLIC - marketingInfo: - promotion: true -outputs: - profileId: ${profile.id} diff --git a/examples/generate.sh b/examples/generate.sh deleted file mode 100755 index 8f8b0930..00000000 --- a/examples/generate.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -pulumi convert --language python --out python --generate-only || true -pulumi convert --language typescript --out typescript --generate-only || true -pulumi convert --language java --out java --generate-only || true -pulumi convert --language go --out go || true -pulumi convert --language csharp --out csharp || true - -# Read each source file -TS_SRC=$(cat typescript/index.ts) -PY_SRC=$(cat python/__main__.py) -GO_SRC=$(cat go/main.go) -CS_SRC=$(cat csharp/Program.cs) -JAVA_SRC=$(cat java/src/main/java/generated_program/App.java) -## Skip first 3 lines -YAML_SRC=$(cat Pulumi.yaml | tail -n +4) - -CHOOSER='{{< chooser language "typescript,python,go,csharp,java,yaml" / >}}' -TS_BLOCK=$(printf "%s\n" '{{% choosable language "javascript,typescript" %}}' '' '```typescript' "$TS_SRC" '```' '' '{{% /choosable %}}') -PY_BLOCK=$(printf "%s\n" '{{% choosable language python %}}' '' '```python' "$PY_SRC" '```' '' '{{% /choosable %}}') -GO_BLOCK=$(printf "%s\n" '{{% choosable language go %}}' '' '```go' "$GO_SRC" '```' '' '{{% /choosable %}}') -CS_BLOCK=$(printf "%s\n" '{{% choosable language csharp %}}' '' '```csharp' "$CS_SRC" '```' '' '{{% /choosable %}}') -JAVA_BLOCK=$(printf "%s\n" '{{% choosable language java %}}' '' '```java' "$JAVA_SRC" '```' '' '{{% /choosable %}}') -YAML_BLOCK=$(printf "%s\n" '{{% choosable language yaml %}}' '' '```yaml' "$YAML_SRC" '```' '' '{{% /choosable %}}') - -# Write out to a file -printf "%s\n" "$CHOOSER" "" "$TS_BLOCK" "" "$PY_BLOCK" "" "$GO_BLOCK" "" "$CS_BLOCK" "" "$JAVA_BLOCK" "" "$YAML_BLOCK" > example.md diff --git a/examples/go.mod b/examples/go.mod index 299747c4..0d8a1f40 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -6,8 +6,7 @@ require github.com/pulumi/pulumi/pkg/v3 v3.121.0 require ( cloud.google.com/go v0.112.1 // indirect - cloud.google.com/go/compute v1.25.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/kms v1.15.7 // indirect cloud.google.com/go/logging v1.9.0 // indirect @@ -57,7 +56,6 @@ require ( github.com/djherbis/times v1.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect @@ -65,6 +63,7 @@ require ( github.com/go-jose/go-jose/v3 v3.0.3 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-test/deep v1.0.7 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect @@ -81,15 +80,14 @@ require ( github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.5 // indirect + github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.6 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/hcl/v2 v2.20.0 // indirect + github.com/hashicorp/hcl/v2 v2.20.1 // indirect github.com/hashicorp/vault/api v1.12.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect diff --git a/examples/go.sum b/examples/go.sum index c18846ad..58c13abe 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -1,10 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= -cloud.google.com/go/compute v1.25.0 h1:H1/4SqSUhjPFE7L5ddzHOfY2bCAvjwNRZPNl6Ni5oYU= -cloud.google.com/go/compute v1.25.0/go.mod h1:GR7F0ZPZH8EhChlMo9FkLd7eUTwEymjqQagxzilIxIE= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/kms v1.15.7 h1:7caV9K3yIxvlQPAcaFffhlT7d1qpxjB1wHBtjWa13SM= @@ -138,7 +135,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -160,8 +156,7 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -227,13 +222,10 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= -github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= -github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 h1:iBt4Ew4XEGLfh6/bPk4rSYmuZJGizr6/x/AEizP0CQc= @@ -244,8 +236,7 @@ github.com/hashicorp/go-sockaddr v1.0.6 h1:RSG8rKU28VTUTvEKghe5gIhIQpv8evvNpnDEy github.com/hashicorp/go-sockaddr v1.0.6/go.mod h1:uoUUmtwU7n9Dv3O4SNLeFvg0SxQ3lyjsj6+CCykpaxI= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= -github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= +github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc= github.com/hashicorp/vault/api v1.12.0 h1:meCpJSesvzQyao8FCOgk2fGdoADAnbDu2WPJN1lDLJ4= github.com/hashicorp/vault/api v1.12.0/go.mod h1:si+lJCYO7oGkIoNPAN8j3azBLTn9SjMGS+jFaHd1Cck= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -275,14 +266,10 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= @@ -387,7 +374,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= @@ -479,8 +465,7 @@ golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= -golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -498,8 +483,6 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -507,10 +490,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/examples/metal/bgp_session/Pulumi.yaml b/examples/metal/bgp_session/Pulumi.yaml new file mode 100644 index 00000000..e67090f4 --- /dev/null +++ b/examples/metal/bgp_session/Pulumi.yaml @@ -0,0 +1,72 @@ +name: equinix-metal-bgp_session +runtime: yaml +resources: + # you need to enable BGP config for the project. If you decide to create new + # project, you can use the bgp_config section to enable BGP. + # resource "equinix_metal_project" "test" { + # name = "testpro" + # bgp_config { + # deployment_type = "local" + # md5 = local.bgp_password + # asn = 65000 + # } + # } + addr: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: ny + quantity: 1 + test: + type: equinix:metal:Device + properties: + hostname: terraform-test-bgp-sesh + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + testBgpSession: + type: equinix:metal:BgpSession + name: test + properties: + deviceId: ${test.id} + addressFamily: ipv4 + configureBird: + type: null:Resource + name: configure_bird + properties: + triggers: + bird_conf: ${birdConf} + interface: ${interfaceLo0} +variables: + bgpPassword: 955dB0b81Ef + projectId: + interfaceLo0: | + auto lo:0 + iface lo:0 inet static + address ${addr.address} + netmask ${addr.netmask} + birdConf: | + filter equinix_metal_bgp { + if net = ${addr.address}/${addr.cidr} then accept; + } + router id ${test.network[2].address}; + protocol direct { + interface "lo"; + } + protocol kernel { + scan time 10; + persist; + import all; + export all; + } + protocol device { + scan time 10; + } + protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor ${test.network[2].gateway} as 65530; + password "${bgpPassword}"; + } diff --git a/examples/metal/bgp_session/csharp/Program.cs b/examples/metal/bgp_session/csharp/Program.cs index a44d05ce..6215c916 100644 --- a/examples/metal/bgp_session/csharp/Program.cs +++ b/examples/metal/bgp_session/csharp/Program.cs @@ -1,20 +1,88 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; +using Null = Pulumi.Null; return await Deployment.RunAsync(() => { - var config = new Config(); - var deviceId = config.Require("deviceId"); - var bgp = new Equinix.Metal.BgpSession("bgp", new() + var bgpPassword = "955dB0b81Ef"; + + var projectId = ""; + + var addr = new Equinix.Metal.ReservedIpBlock("addr", new() + { + ProjectId = projectId, + Metro = "ny", + Quantity = 1, + }); + + var interfaceLo0 = Output.Tuple(addr.Address, addr.Netmask).Apply(values => + { + var address = values.Item1; + var netmask = values.Item2; + return @$"auto lo:0 +iface lo:0 inet static + address {address} + netmask {netmask} +"; + }); + + var test = new Equinix.Metal.Device("test", new() { - DeviceId = deviceId, + Hostname = "terraform-test-bgp-sesh", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }); + + var birdConf = Output.Tuple(addr.Address, addr.Cidr, test.Network, test.Network).Apply(values => + { + var address = values.Item1; + var cidr = values.Item2; + var testNetwork = values.Item3; + var testNetwork1 = values.Item4; + return @$"filter equinix_metal_bgp {{ + if net = {address}/{cidr} then accept; +}} +router id {testNetwork[2].Address}; +protocol direct {{ + interface ""lo""; +}} +protocol kernel {{ + scan time 10; + persist; + import all; + export all; +}} +protocol device {{ + scan time 10; +}} +protocol bgp {{ + export filter equinix_metal_bgp; + local as 65000; + neighbor {testNetwork1[2].Gateway} as 65530; + password ""{bgpPassword}""; +}} +"; + }); + + var testBgpSession = new Equinix.Metal.BgpSession("testBgpSession", new() + { + DeviceId = test.Id, AddressFamily = "ipv4", }); - return new Dictionary + var configureBird = new Null.Resource("configureBird", new() { - ["bgpSessionStatus"] = bgp.Status, - }; + Triggers = + { + { "bird_conf", birdConf }, + { "interface", interfaceLo0 }, + }, + }); + }); diff --git a/examples/metal/bgp_session/csharp/Pulumi.yaml b/examples/metal/bgp_session/csharp/Pulumi.yaml index 3404e3a5..b7b44c1e 100644 --- a/examples/metal/bgp_session/csharp/Pulumi.yaml +++ b/examples/metal/bgp_session/csharp/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-bgp-session +name: equinix-metal-bgp_session runtime: dotnet -description: An Equinix Metal BGP Session resource. Refer to [Equinix Metal BGP documentation](https://deploy.equinix.com/developers/docs/metal/bgp/bgp-on-equinix-metal/) for more details -config: - deviceId: - type: string diff --git a/examples/metal/bgp_session/csharp/bgp_session.csproj b/examples/metal/bgp_session/csharp/bgp_session.csproj new file mode 100644 index 00000000..7a70e7fc --- /dev/null +++ b/examples/metal/bgp_session/csharp/bgp_session.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + + + + + + + + \ No newline at end of file diff --git a/examples/metal/bgp_session/csharp/equinix-metal-bgp-session.csproj b/examples/metal/bgp_session/csharp/equinix-metal-bgp-session.csproj index 1565d39e..36182104 100644 --- a/examples/metal/bgp_session/csharp/equinix-metal-bgp-session.csproj +++ b/examples/metal/bgp_session/csharp/equinix-metal-bgp-session.csproj @@ -5,10 +5,9 @@ net6.0 enable - - + \ No newline at end of file diff --git a/examples/metal/bgp_session/csharp/equinix-metal-bgp_session.csproj b/examples/metal/bgp_session/csharp/equinix-metal-bgp_session.csproj new file mode 100644 index 00000000..cf53253e --- /dev/null +++ b/examples/metal/bgp_session/csharp/equinix-metal-bgp_session.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + + + + + + + + \ No newline at end of file diff --git a/examples/metal/bgp_session/csharp/equinix-metal-device.csproj b/examples/metal/bgp_session/csharp/equinix-metal-device.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/bgp_session/csharp/equinix-metal-device.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/bgp_session/example.md b/examples/metal/bgp_session/example.md deleted file mode 100644 index f3bf7c61..00000000 --- a/examples/metal/bgp_session/example.md +++ /dev/null @@ -1,138 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const bgp = new equinix.metal.BgpSession("bgp", { - deviceId: deviceId, - addressFamily: "ipv4", -}); -export const bgpSessionStatus = bgp.status; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -device_id = config.require("deviceId") -bgp = equinix.metal.BgpSession("bgp", - device_id=device_id, - address_family="ipv4") -pulumi.export("bgpSessionStatus", bgp.status) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - bgp, err := metal.NewBgpSession(ctx, "bgp", &metal.BgpSessionArgs{ - DeviceId: pulumi.String(deviceId), - AddressFamily: pulumi.String("ipv4"), - }) - if err != nil { - return err - } - ctx.Export("bgpSessionStatus", bgp.Status) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var deviceId = config.Require("deviceId"); - var bgp = new Equinix.Metal.BgpSession("bgp", new() - { - DeviceId = deviceId, - AddressFamily = "ipv4", - }); - - return new Dictionary - { - ["bgpSessionStatus"] = bgp.Status, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.BgpSession; -import com.equinix.pulumi.metal.BgpSessionArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - var bgp = new BgpSession("bgp", BgpSessionArgs.builder() - .deviceId(deviceId) - .addressFamily("ipv4") - .build()); - - ctx.export("bgpSessionStatus", bgp.status()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - deviceId: - type: string -resources: - bgp: - type: equinix:metal:BgpSession - properties: - deviceId: ${deviceId} - addressFamily: ipv4 -outputs: - bgpSessionStatus: ${bgp.status} -``` - -{{% /choosable %}} diff --git a/examples/metal/bgp_session/go/Pulumi.yaml b/examples/metal/bgp_session/go/Pulumi.yaml index c692bce9..5a32dbfd 100644 --- a/examples/metal/bgp_session/go/Pulumi.yaml +++ b/examples/metal/bgp_session/go/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-bgp-session +name: equinix-metal-bgp_session runtime: go -description: An Equinix Metal BGP Session resource. Refer to [Equinix Metal BGP documentation](https://deploy.equinix.com/developers/docs/metal/bgp/bgp-on-equinix-metal/) for more details -config: - deviceId: - type: string diff --git a/examples/metal/bgp_session/go/go.mod b/examples/metal/bgp_session/go/go.mod index 281b4169..5e5f5caa 100644 --- a/examples/metal/bgp_session/go/go.mod +++ b/examples/metal/bgp_session/go/go.mod @@ -1,59 +1,95 @@ -module equinix-metal-bgp-session +module equinix-metal-bgp_session -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi-null/sdk v0.0.4 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/bgp_session/go/main.go b/examples/metal/bgp_session/go/main.go index f9dac135..f46baeae 100644 --- a/examples/metal/bgp_session/go/main.go +++ b/examples/metal/bgp_session/go/main.go @@ -1,23 +1,86 @@ package main import ( + "fmt" + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi-null/sdk/go/null" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - bgp, err := metal.NewBgpSession(ctx, "bgp", &metal.BgpSessionArgs{ - DeviceId: pulumi.String(deviceId), + bgpPassword := "955dB0b81Ef" + projectId := "" + addr, err := metal.NewReservedIpBlock(ctx, "addr", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.String(projectId), + Metro: pulumi.String("ny"), + Quantity: pulumi.Int(1), + }) + if err != nil { + return err + } + interfaceLo0 := pulumi.All(addr.Address, addr.Netmask).ApplyT(func(_args []interface{}) (string, error) { + address := _args[0].(string) + netmask := _args[1].(string) + return fmt.Sprintf("auto lo:0\niface lo:0 inet static\n address %v\n netmask %v\n", address, netmask), nil + }).(pulumi.StringOutput) + test, err := metal.NewDevice(ctx, "test", &metal.DeviceArgs{ + Hostname: pulumi.String("terraform-test-bgp-sesh"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.String(projectId), + }) + if err != nil { + return err + } + birdConf := pulumi.All(addr.Address, addr.Cidr, test.Network, test.Network).ApplyT(func(_args []interface{}) (string, error) { + address := _args[0].(string) + cidr := _args[1].(int) + testNetwork := _args[2].([]metal.DeviceNetwork) + testNetwork1 := _args[3].([]metal.DeviceNetwork) + return fmt.Sprintf(`filter equinix_metal_bgp { + if net = %v/%v then accept; +} +router id %v; +protocol direct { + interface "lo"; +} +protocol kernel { + scan time 10; + persist; + import all; + export all; +} +protocol device { + scan time 10; +} +protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor %v as 65530; + password "%v"; +} +`, address, cidr, testNetwork[2].Address, testNetwork1[2].Gateway, bgpPassword), nil + }).(pulumi.StringOutput) + _, err = metal.NewBgpSession(ctx, "testBgpSession", &metal.BgpSessionArgs{ + DeviceId: test.ID(), AddressFamily: pulumi.String("ipv4"), }) if err != nil { return err } - ctx.Export("bgpSessionStatus", bgp.Status) + _, err = null.NewResource(ctx, "configureBird", &null.ResourceArgs{ + Triggers: pulumi.StringMap{ + "bird_conf": pulumi.String(birdConf), + "interface": pulumi.String(interfaceLo0), + }, + }) + if err != nil { + return err + } return nil }) } diff --git a/examples/metal/bgp_session/java/.gitignore b/examples/metal/bgp_session/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/bgp_session/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/bgp_session/java/Pulumi.yaml b/examples/metal/bgp_session/java/Pulumi.yaml index 85c355a0..8c8ac630 100644 --- a/examples/metal/bgp_session/java/Pulumi.yaml +++ b/examples/metal/bgp_session/java/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-bgp-session +name: equinix-metal-bgp_session runtime: java -description: An Equinix Metal BGP Session resource. Refer to [Equinix Metal BGP documentation](https://deploy.equinix.com/developers/docs/metal/bgp/bgp-on-equinix-metal/) for more details -config: - deviceId: - type: string diff --git a/examples/metal/bgp_session/java/pom.xml b/examples/metal/bgp_session/java/pom.xml index 8024fafd..2aae0065 100644 --- a/examples/metal/bgp_session/java/pom.xml +++ b/examples/metal/bgp_session/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-bgp-session + equinix-metal-bgp_session 1.0-SNAPSHOT @@ -18,16 +18,20 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + + com.pulumi + null + 0.0.4 + diff --git a/examples/metal/bgp_session/java/src/main/java/generated_program/App.java b/examples/metal/bgp_session/java/src/main/java/generated_program/App.java index 58181b4d..545e91cc 100644 --- a/examples/metal/bgp_session/java/src/main/java/generated_program/App.java +++ b/examples/metal/bgp_session/java/src/main/java/generated_program/App.java @@ -2,8 +2,21 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.BgpSession; -import com.equinix.pulumi.metal.BgpSessionArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.BgpSession; +import com.pulumi.equinix.metal.BgpSessionArgs; +import com.pulumi.null.Resource; +import com.pulumi.null.ResourceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -11,13 +24,78 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - var bgp = new BgpSession("bgp", BgpSessionArgs.builder() - .deviceId(deviceId) + final var bgpPassword = "955dB0b81Ef"; + + final var projectId = ""; + + var addr = new ReservedIpBlock("addr", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("ny") + .quantity(1) + .build()); + + final var interfaceLo0 = Output.tuple(addr.address(), addr.netmask()).applyValue(values -> { + var address = values.t1; + var netmask = values.t2; + return """ +auto lo:0 +iface lo:0 inet static + address %s + netmask %s +", address,netmask); + }); + + var test = new Device("test", DeviceArgs.builder() + .hostname("terraform-test-bgp-sesh") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + final var birdConf = Output.tuple(addr.address(), addr.cidr(), test.network(), test.network()).applyValue(values -> { + var address = values.t1; + var cidr = values.t2; + var testNetwork = values.t3; + var testNetwork1 = values.t4; + return """ +filter equinix_metal_bgp { + if net = %s/%s then accept; +} +router id %s; +protocol direct { + interface "lo"; +} +protocol kernel { + scan time 10; + persist; + import all; + export all; +} +protocol device { + scan time 10; +} +protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor %s as 65530; + password "%s"; +} +", address,cidr,testNetwork[2].address(),testNetwork1[2].gateway(),bgpPassword); + }); + + var testBgpSession = new BgpSession("testBgpSession", BgpSessionArgs.builder() + .deviceId(test.id()) .addressFamily("ipv4") .build()); - ctx.export("bgpSessionStatus", bgp.status()); + var configureBird = new Resource("configureBird", ResourceArgs.builder() + .triggers(Map.ofEntries( + Map.entry("bird_conf", birdConf), + Map.entry("interface", interfaceLo0) + )) + .build()); + } } diff --git a/examples/metal/bgp_session/python/Pulumi.yaml b/examples/metal/bgp_session/python/Pulumi.yaml index 9c9d8ade..cbca2f16 100644 --- a/examples/metal/bgp_session/python/Pulumi.yaml +++ b/examples/metal/bgp_session/python/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-bgp-session +name: equinix-metal-bgp_session runtime: python -description: An Equinix Metal BGP Session resource. Refer to [Equinix Metal BGP documentation](https://deploy.equinix.com/developers/docs/metal/bgp/bgp-on-equinix-metal/) for more details -config: - deviceId: - type: string diff --git a/examples/metal/bgp_session/python/__main__.py b/examples/metal/bgp_session/python/__main__.py index 7141ba23..8f432267 100644 --- a/examples/metal/bgp_session/python/__main__.py +++ b/examples/metal/bgp_session/python/__main__.py @@ -1,9 +1,52 @@ import pulumi import pulumi_equinix as equinix +import pulumi_null as null -config = pulumi.Config() -device_id = config.require("deviceId") -bgp = equinix.metal.BgpSession("bgp", - device_id=device_id, +bgp_password = "955dB0b81Ef" +project_id = "" +addr = equinix.metal.ReservedIpBlock("addr", + project_id=project_id, + metro="ny", + quantity=1) +interface_lo0 = pulumi.Output.all(addr.address, addr.netmask).apply(lambda address, netmask: f"""auto lo:0 +iface lo:0 inet static + address {address} + netmask {netmask} +""") +test = equinix.metal.Device("test", + hostname="terraform-test-bgp-sesh", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id) +bird_conf = pulumi.Output.all(addr.address, addr.cidr, test.network, test.network).apply(lambda address, cidr, testNetwork, testNetwork1: f"""filter equinix_metal_bgp {{ + if net = {address}/{cidr} then accept; +}} +router id {test_network[2].address}; +protocol direct {{ + interface "lo"; +}} +protocol kernel {{ + scan time 10; + persist; + import all; + export all; +}} +protocol device {{ + scan time 10; +}} +protocol bgp {{ + export filter equinix_metal_bgp; + local as 65000; + neighbor {test_network1[2].gateway} as 65530; + password "{bgp_password}"; +}} +""") +test_bgp_session = equinix.metal.BgpSession("testBgpSession", + device_id=test.id, address_family="ipv4") -pulumi.export("bgpSessionStatus", bgp.status) +configure_bird = null.Resource("configureBird", triggers={ + "bird_conf": bird_conf, + "interface": interface_lo0, +}) diff --git a/examples/metal/bgp_session/python/requirements.txt b/examples/metal/bgp_session/python/requirements.txt index 805364e7..bbee7489 100644 --- a/examples/metal/bgp_session/python/requirements.txt +++ b/examples/metal/bgp_session/python/requirements.txt @@ -1,2 +1,3 @@ +pulumi-null==0.0.4 pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/bgp_session/typescript/Pulumi.yaml b/examples/metal/bgp_session/typescript/Pulumi.yaml index 9225b4c7..aaf781b5 100644 --- a/examples/metal/bgp_session/typescript/Pulumi.yaml +++ b/examples/metal/bgp_session/typescript/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-bgp-session +name: equinix-metal-bgp_session runtime: nodejs -description: An Equinix Metal BGP Session resource. Refer to [Equinix Metal BGP documentation](https://deploy.equinix.com/developers/docs/metal/bgp/bgp-on-equinix-metal/) for more details -config: - deviceId: - type: string diff --git a/examples/metal/bgp_session/typescript/index.ts b/examples/metal/bgp_session/typescript/index.ts index fec3341b..3c2d86d2 100644 --- a/examples/metal/bgp_session/typescript/index.ts +++ b/examples/metal/bgp_session/typescript/index.ts @@ -1,10 +1,55 @@ import * as pulumi from "@pulumi/pulumi"; +import * as _null from "@pulumi/null"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const bgp = new equinix.metal.BgpSession("bgp", { - deviceId: deviceId, +const bgpPassword = "955dB0b81Ef"; +const projectId = ""; +const addr = new equinix.metal.ReservedIpBlock("addr", { + projectId: projectId, + metro: "ny", + quantity: 1, +}); +const interfaceLo0 = pulumi.interpolate`auto lo:0 +iface lo:0 inet static + address ${addr.address} + netmask ${addr.netmask} +`; +const test = new equinix.metal.Device("test", { + hostname: "terraform-test-bgp-sesh", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}); +const birdConf = pulumi.all([addr.address, addr.cidr, test.network, test.network]).apply(([address, cidr, testNetwork, testNetwork1]) => `filter equinix_metal_bgp { + if net = ${address}/${cidr} then accept; +} +router id ${testNetwork[2].address}; +protocol direct { + interface "lo"; +} +protocol kernel { + scan time 10; + persist; + import all; + export all; +} +protocol device { + scan time 10; +} +protocol bgp { + export filter equinix_metal_bgp; + local as 65000; + neighbor ${testNetwork1[2].gateway} as 65530; + password "${bgpPassword}"; +} +`); +const testBgpSession = new equinix.metal.BgpSession("testBgpSession", { + deviceId: test.id, addressFamily: "ipv4", }); -export const bgpSessionStatus = bgp.status; +const configureBird = new _null.Resource("configureBird", {triggers: { + bird_conf: birdConf, + "interface": interfaceLo0, +}}); diff --git a/examples/metal/bgp_session/typescript/package.json b/examples/metal/bgp_session/typescript/package.json index 528fc927..a50910a4 100644 --- a/examples/metal/bgp_session/typescript/package.json +++ b/examples/metal/bgp_session/typescript/package.json @@ -1,11 +1,12 @@ { - "name": "equinix-metal-bgp-session", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-bgp_session", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0", + "@pulumi/null": "0.0.4" + } } \ No newline at end of file diff --git a/examples/metal/bgp_session/typescript/tsconfig.json b/examples/metal/bgp_session/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/bgp_session/typescript/tsconfig.json +++ b/examples/metal/bgp_session/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/bgp_session/yaml/Pulumi.yaml b/examples/metal/bgp_session/yaml/Pulumi.yaml deleted file mode 100644 index 81f22dbf..00000000 --- a/examples/metal/bgp_session/yaml/Pulumi.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: equinix-metal-bgp-session -runtime: yaml -description: An Equinix Metal BGP Session resource. Refer to [Equinix Metal BGP documentation](https://deploy.equinix.com/developers/docs/metal/bgp/bgp-on-equinix-metal/) for more details -config: - deviceId: - type: string -resources: - bgp: - type: equinix:metal:BgpSession - properties: - deviceId: ${deviceId} - addressFamily: ipv4 -outputs: - bgpSessionStatus: ${bgp.status} diff --git a/examples/metal/connection/example_fabric_billed/Pulumi.yaml b/examples/metal/connection/example_fabric_billed/Pulumi.yaml new file mode 100644 index 00000000..74b564d8 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/Pulumi.yaml @@ -0,0 +1,26 @@ +name: equinix-metal-connection-example-fabric-billed-token +runtime: yaml +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource +config: + projectId: + type: string + metro: + type: string + default: SV + speedInMbps: + type: integer + default: 200 +resources: + connection: + type: equinix:metal:Interconnection + properties: + name: fabric-port-to-metal + projectId: ${projectId} + type: shared + redundancy: primary + metro: ${metro} + speed: ${speedInMbps}Mbps + serviceTokenType: z_side +outputs: + connectionStatus: ${connection.status} + connectionTokens: ${connection.serviceTokens} diff --git a/examples/metal/connection/example_fabric_billed/csharp/.gitignore b/examples/metal/connection/example_fabric_billed/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/connection/example_fabric_billed/csharp/Program.cs b/examples/metal/connection/example_fabric_billed/csharp/Program.cs new file mode 100644 index 00000000..ae2cca70 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/csharp/Program.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var config = new Config(); + var projectId = config.Require("projectId"); + var metro = config.Get("metro") ?? "SV"; + var speedInMbps = config.GetInt32("speedInMbps") ?? 200; + var connection = new Equinix.Metal.Interconnection("connection", new() + { + Name = "fabric-port-to-metal", + ProjectId = projectId, + Type = "shared", + Redundancy = "primary", + Metro = metro, + Speed = $"{speedInMbps}Mbps", + ServiceTokenType = "z_side", + }); + + return new Dictionary + { + ["connectionStatus"] = connection.Status, + ["connectionTokens"] = connection.ServiceTokens, + }; +}); + diff --git a/examples/metal/connection/example_fabric_billed/csharp/Pulumi.yaml b/examples/metal/connection/example_fabric_billed/csharp/Pulumi.yaml new file mode 100644 index 00000000..aeb2dc93 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/csharp/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-fabric-billed-token +runtime: dotnet +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 200 diff --git a/examples/metal/connection/example_fabric_billed/csharp/equinix-metal-connection-example-fabric-billed-token.csproj b/examples/metal/connection/example_fabric_billed/csharp/equinix-metal-connection-example-fabric-billed-token.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/csharp/equinix-metal-connection-example-fabric-billed-token.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/connection/example_fabric_billed/csharp/equinix-metal-connection-fabric-billed-token.csproj b/examples/metal/connection/example_fabric_billed/csharp/equinix-metal-connection-fabric-billed-token.csproj new file mode 100644 index 00000000..ad20437e --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/csharp/equinix-metal-connection-fabric-billed-token.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/connection/example_fabric_billed/go/Pulumi.yaml b/examples/metal/connection/example_fabric_billed/go/Pulumi.yaml new file mode 100644 index 00000000..21e83049 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/go/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-fabric-billed-token +runtime: go +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 200 diff --git a/examples/metal/connection/example_fabric_billed/go/go.mod b/examples/metal/connection/example_fabric_billed/go/go.mod new file mode 100644 index 00000000..701b392c --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/go/go.mod @@ -0,0 +1,95 @@ +module equinix-metal-connection-example-fabric-billed-token + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/cast v1.5.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/connection/fabric_billed/go/main.go b/examples/metal/connection/example_fabric_billed/go/main.go similarity index 100% rename from examples/metal/connection/fabric_billed/go/main.go rename to examples/metal/connection/example_fabric_billed/go/main.go diff --git a/examples/metal/connection/example_fabric_billed/java/Pulumi.yaml b/examples/metal/connection/example_fabric_billed/java/Pulumi.yaml new file mode 100644 index 00000000..028e4ec1 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/java/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-fabric-billed-token +runtime: java +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 200 diff --git a/examples/metal/connection/example_fabric_billed/java/pom.xml b/examples/metal/connection/example_fabric_billed/java/pom.xml new file mode 100644 index 00000000..22f4a724 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-connection-example-fabric-billed-token + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/connection/example_fabric_billed/java/src/main/java/generated_program/App.java b/examples/metal/connection/example_fabric_billed/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..27151018 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/java/src/main/java/generated_program/App.java @@ -0,0 +1,38 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Interconnection; +import com.pulumi.equinix.metal.InterconnectionArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var config = ctx.config(); + final var projectId = config.get("projectId"); + final var metro = config.get("metro").orElse("SV"); + final var speedInMbps = config.get("speedInMbps").orElse(200); + var connection = new Interconnection("connection", InterconnectionArgs.builder() + .name("fabric-port-to-metal") + .projectId(projectId) + .type("shared") + .redundancy("primary") + .metro(metro) + .speed(String.format("%sMbps", speedInMbps)) + .serviceTokenType("z_side") + .build()); + + ctx.export("connectionStatus", connection.status()); + ctx.export("connectionTokens", connection.serviceTokens()); + } +} diff --git a/examples/metal/connection/example_fabric_billed/python/.gitignore b/examples/metal/connection/example_fabric_billed/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/connection/example_fabric_billed/python/Pulumi.yaml b/examples/metal/connection/example_fabric_billed/python/Pulumi.yaml new file mode 100644 index 00000000..c0361a95 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/python/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-fabric-billed-token +runtime: python +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 200 diff --git a/examples/metal/connection/fabric_billed/python/__main__.py b/examples/metal/connection/example_fabric_billed/python/__main__.py similarity index 100% rename from examples/metal/connection/fabric_billed/python/__main__.py rename to examples/metal/connection/example_fabric_billed/python/__main__.py diff --git a/examples/metal/connection/example_fabric_billed/python/requirements.txt b/examples/metal/connection/example_fabric_billed/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/connection/example_fabric_billed/typescript/.gitignore b/examples/metal/connection/example_fabric_billed/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/connection/example_fabric_billed/typescript/Pulumi.yaml b/examples/metal/connection/example_fabric_billed/typescript/Pulumi.yaml new file mode 100644 index 00000000..7cb9b6c2 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/typescript/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-fabric-billed-token +runtime: nodejs +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 200 diff --git a/examples/metal/connection/fabric_billed/typescript/index.ts b/examples/metal/connection/example_fabric_billed/typescript/index.ts similarity index 100% rename from examples/metal/connection/fabric_billed/typescript/index.ts rename to examples/metal/connection/example_fabric_billed/typescript/index.ts diff --git a/examples/metal/connection/example_fabric_billed/typescript/package.json b/examples/metal/connection/example_fabric_billed/typescript/package.json new file mode 100644 index 00000000..99159eb3 --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-connection-example-fabric-billed-token", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/connection/example_fabric_billed/typescript/tsconfig.json b/examples/metal/connection/example_fabric_billed/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/connection/example_fabric_billed/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/connection/example_metal_billed/Pulumi.yaml b/examples/metal/connection/example_metal_billed/Pulumi.yaml new file mode 100644 index 00000000..def819d2 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/Pulumi.yaml @@ -0,0 +1,26 @@ +name: equinix-metal-connection-example-metal-billed-token +runtime: yaml +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource +config: + projectId: + type: string + metro: + type: string + default: SV + speedInMbps: + type: integer + default: 1000 +resources: + connection: + type: equinix:metal:Interconnection + properties: + name: metal-to-cloudprovider + projectId: ${projectId} + type: shared + redundancy: primary + metro: ${metro} + speed: ${speedInMbps}Mbps + serviceTokenType: a_side +outputs: + connectionStatus: ${connection.status} + connectionTokens: ${connection.serviceTokens} diff --git a/examples/metal/connection/example_metal_billed/csharp/.gitignore b/examples/metal/connection/example_metal_billed/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/connection/example_metal_billed/csharp/Program.cs b/examples/metal/connection/example_metal_billed/csharp/Program.cs new file mode 100644 index 00000000..fd3d7ab1 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/csharp/Program.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var config = new Config(); + var projectId = config.Require("projectId"); + var metro = config.Get("metro") ?? "SV"; + var speedInMbps = config.GetInt32("speedInMbps") ?? 1000; + var connection = new Equinix.Metal.Interconnection("connection", new() + { + Name = "metal-to-cloudprovider", + ProjectId = projectId, + Type = "shared", + Redundancy = "primary", + Metro = metro, + Speed = $"{speedInMbps}Mbps", + ServiceTokenType = "a_side", + }); + + return new Dictionary + { + ["connectionStatus"] = connection.Status, + ["connectionTokens"] = connection.ServiceTokens, + }; +}); + diff --git a/examples/metal/connection/example_metal_billed/csharp/Pulumi.yaml b/examples/metal/connection/example_metal_billed/csharp/Pulumi.yaml new file mode 100644 index 00000000..ed9613b3 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/csharp/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-metal-billed-token +runtime: dotnet +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 1000 diff --git a/examples/metal/connection/example_metal_billed/csharp/equinix-metal-connection-example-metal-billed-token.csproj b/examples/metal/connection/example_metal_billed/csharp/equinix-metal-connection-example-metal-billed-token.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/csharp/equinix-metal-connection-example-metal-billed-token.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/connection/example_metal_billed/csharp/equinix-metal-connection-metal-billed-token.csproj b/examples/metal/connection/example_metal_billed/csharp/equinix-metal-connection-metal-billed-token.csproj new file mode 100644 index 00000000..ad20437e --- /dev/null +++ b/examples/metal/connection/example_metal_billed/csharp/equinix-metal-connection-metal-billed-token.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/connection/example_metal_billed/go/Pulumi.yaml b/examples/metal/connection/example_metal_billed/go/Pulumi.yaml new file mode 100644 index 00000000..60102ac0 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/go/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-metal-billed-token +runtime: go +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 1000 diff --git a/examples/metal/connection/example_metal_billed/go/go.mod b/examples/metal/connection/example_metal_billed/go/go.mod new file mode 100644 index 00000000..2a056967 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/go/go.mod @@ -0,0 +1,95 @@ +module equinix-metal-connection-example-metal-billed-token + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/cast v1.5.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/connection/metal_billed/go/main.go b/examples/metal/connection/example_metal_billed/go/main.go similarity index 100% rename from examples/metal/connection/metal_billed/go/main.go rename to examples/metal/connection/example_metal_billed/go/main.go diff --git a/examples/metal/connection/example_metal_billed/java/Pulumi.yaml b/examples/metal/connection/example_metal_billed/java/Pulumi.yaml new file mode 100644 index 00000000..ff8307ce --- /dev/null +++ b/examples/metal/connection/example_metal_billed/java/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-metal-billed-token +runtime: java +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 1000 diff --git a/examples/metal/connection/example_metal_billed/java/pom.xml b/examples/metal/connection/example_metal_billed/java/pom.xml new file mode 100644 index 00000000..5395ab8f --- /dev/null +++ b/examples/metal/connection/example_metal_billed/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-connection-example-metal-billed-token + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/connection/example_metal_billed/java/src/main/java/generated_program/App.java b/examples/metal/connection/example_metal_billed/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..2871d1c4 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/java/src/main/java/generated_program/App.java @@ -0,0 +1,38 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Interconnection; +import com.pulumi.equinix.metal.InterconnectionArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var config = ctx.config(); + final var projectId = config.get("projectId"); + final var metro = config.get("metro").orElse("SV"); + final var speedInMbps = config.get("speedInMbps").orElse(1000); + var connection = new Interconnection("connection", InterconnectionArgs.builder() + .name("metal-to-cloudprovider") + .projectId(projectId) + .type("shared") + .redundancy("primary") + .metro(metro) + .speed(String.format("%sMbps", speedInMbps)) + .serviceTokenType("a_side") + .build()); + + ctx.export("connectionStatus", connection.status()); + ctx.export("connectionTokens", connection.serviceTokens()); + } +} diff --git a/examples/metal/connection/example_metal_billed/python/.gitignore b/examples/metal/connection/example_metal_billed/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/connection/example_metal_billed/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/connection/example_metal_billed/python/Pulumi.yaml b/examples/metal/connection/example_metal_billed/python/Pulumi.yaml new file mode 100644 index 00000000..8c223b6f --- /dev/null +++ b/examples/metal/connection/example_metal_billed/python/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-metal-billed-token +runtime: python +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 1000 diff --git a/examples/metal/connection/metal_billed/python/__main__.py b/examples/metal/connection/example_metal_billed/python/__main__.py similarity index 100% rename from examples/metal/connection/metal_billed/python/__main__.py rename to examples/metal/connection/example_metal_billed/python/__main__.py diff --git a/examples/metal/connection/example_metal_billed/python/requirements.txt b/examples/metal/connection/example_metal_billed/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/connection/example_metal_billed/typescript/.gitignore b/examples/metal/connection/example_metal_billed/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/connection/example_metal_billed/typescript/Pulumi.yaml b/examples/metal/connection/example_metal_billed/typescript/Pulumi.yaml new file mode 100644 index 00000000..adbd7c5b --- /dev/null +++ b/examples/metal/connection/example_metal_billed/typescript/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-connection-example-metal-billed-token +runtime: nodejs +description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource +config: + metro: + type: string + default: SV + projectId: + type: string + speedInMbps: + type: integer + default: 1000 diff --git a/examples/metal/connection/metal_billed/typescript/index.ts b/examples/metal/connection/example_metal_billed/typescript/index.ts similarity index 100% rename from examples/metal/connection/metal_billed/typescript/index.ts rename to examples/metal/connection/example_metal_billed/typescript/index.ts diff --git a/examples/metal/connection/example_metal_billed/typescript/package.json b/examples/metal/connection/example_metal_billed/typescript/package.json new file mode 100644 index 00000000..1240ca30 --- /dev/null +++ b/examples/metal/connection/example_metal_billed/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-connection-example-metal-billed-token", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/connection/example_metal_billed/typescript/tsconfig.json b/examples/metal/connection/example_metal_billed/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/connection/example_metal_billed/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/connection/fabric_billed/csharp/Program.cs b/examples/metal/connection/fabric_billed/csharp/Program.cs deleted file mode 100644 index afac7166..00000000 --- a/examples/metal/connection/fabric_billed/csharp/Program.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "SV"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 200; - var connection = new Equinix.Metal.Interconnection("connection", new() - { - Name = "fabric-port-to-metal", - ProjectId = projectId, - Type = "shared", - Redundancy = "primary", - Metro = metro, - Speed = $"{speedInMbps}Mbps", - ServiceTokenType = "z_side", - }); - - return new Dictionary - { - ["connectionStatus"] = connection.Status, - ["connectionTokens"] = connection.ServiceTokens, - }; -}); - diff --git a/examples/metal/connection/fabric_billed/csharp/Pulumi.yaml b/examples/metal/connection/fabric_billed/csharp/Pulumi.yaml deleted file mode 100644 index 1346408f..00000000 --- a/examples/metal/connection/fabric_billed/csharp/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-fabric-billed-token -runtime: dotnet -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 200 diff --git a/examples/metal/connection/fabric_billed/csharp/equinix-metal-interconnection-fabric-billed-token.csproj b/examples/metal/connection/fabric_billed/csharp/equinix-metal-interconnection-fabric-billed-token.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/connection/fabric_billed/csharp/equinix-metal-interconnection-fabric-billed-token.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/connection/fabric_billed/example.md b/examples/metal/connection/fabric_billed/example.md deleted file mode 100644 index b2cf4e52..00000000 --- a/examples/metal/connection/fabric_billed/example.md +++ /dev/null @@ -1,209 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "SV"; -const speedInMbps = config.getNumber("speedInMbps") || 200; -const connection = new equinix.metal.Interconnection("connection", { - name: "fabric-port-to-metal", - projectId: projectId, - type: "shared", - redundancy: "primary", - metro: metro, - speed: `${speedInMbps}Mbps`, - serviceTokenType: "z_side", -}); -export const connectionStatus = connection.status; -export const connectionTokens = connection.serviceTokens; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "SV" -speed_in_mbps = config.get_int("speedInMbps") -if speed_in_mbps is None: - speed_in_mbps = 200 -connection = equinix.metal.Interconnection("connection", - name="fabric-port-to-metal", - project_id=project_id, - type="shared", - redundancy="primary", - metro=metro, - speed=f"{speed_in_mbps}Mbps", - service_token_type="z_side") -pulumi.export("connectionStatus", connection.status) -pulumi.export("connectionTokens", connection.service_tokens) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "fmt" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param - } - speedInMbps := 200 - if param := cfg.GetInt("speedInMbps"); param != 0 { - speedInMbps = param - } - connection, err := metal.NewInterconnection(ctx, "connection", &metal.InterconnectionArgs{ - Name: pulumi.String("fabric-port-to-metal"), - ProjectId: pulumi.String(projectId), - Type: pulumi.String("shared"), - Redundancy: pulumi.String("primary"), - Metro: pulumi.String(metro), - Speed: pulumi.String(fmt.Sprintf("%vMbps", speedInMbps)), - ServiceTokenType: pulumi.String("z_side"), - }) - if err != nil { - return err - } - ctx.Export("connectionStatus", connection.Status) - ctx.Export("connectionTokens", connection.ServiceTokens) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "SV"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 200; - var connection = new Equinix.Metal.Interconnection("connection", new() - { - Name = "fabric-port-to-metal", - ProjectId = projectId, - Type = "shared", - Redundancy = "primary", - Metro = metro, - Speed = $"{speedInMbps}Mbps", - ServiceTokenType = "z_side", - }); - - return new Dictionary - { - ["connectionStatus"] = connection.Status, - ["connectionTokens"] = connection.ServiceTokens, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Interconnection; -import com.equinix.pulumi.metal.InterconnectionArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("SV"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("200")); - var connection = new Interconnection("connection", InterconnectionArgs.builder() - .name("fabric-port-to-metal") - .projectId(projectId) - .type("shared") - .redundancy("primary") - .metro(metro) - .speed(String.format("%sMbps", speedInMbps)) - .serviceTokenType("z_side") - .build()); - - ctx.export("connectionStatus", connection.status()); - ctx.export("connectionTokens", connection.serviceTokens()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - metro: - type: string - default: SV - speedInMbps: - type: integer - default: 200 -resources: - connection: - type: equinix:metal:Interconnection - properties: - name: fabric-port-to-metal - projectId: ${projectId} - type: shared - redundancy: primary - metro: ${metro} - speed: ${speedInMbps}Mbps - serviceTokenType: z_side -outputs: - connectionStatus: ${connection.status} - connectionTokens: ${connection.serviceTokens} -``` - -{{% /choosable %}} diff --git a/examples/metal/connection/fabric_billed/go/Pulumi.yaml b/examples/metal/connection/fabric_billed/go/Pulumi.yaml deleted file mode 100644 index cbb7bd0b..00000000 --- a/examples/metal/connection/fabric_billed/go/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-fabric-billed-token -runtime: go -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 200 diff --git a/examples/metal/connection/fabric_billed/go/go.mod b/examples/metal/connection/fabric_billed/go/go.mod deleted file mode 100644 index fe52e0b8..00000000 --- a/examples/metal/connection/fabric_billed/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-interconnection-fabric-billed-token - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/connection/fabric_billed/java/.gitignore b/examples/metal/connection/fabric_billed/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/connection/fabric_billed/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/connection/fabric_billed/java/Pulumi.yaml b/examples/metal/connection/fabric_billed/java/Pulumi.yaml deleted file mode 100644 index 9f2aaebb..00000000 --- a/examples/metal/connection/fabric_billed/java/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-fabric-billed-token -runtime: java -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: string - default: "200" diff --git a/examples/metal/connection/fabric_billed/java/pom.xml b/examples/metal/connection/fabric_billed/java/pom.xml deleted file mode 100644 index 12fb3b83..00000000 --- a/examples/metal/connection/fabric_billed/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-interconnection-fabric-billed-token - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/connection/fabric_billed/java/src/main/java/generated_program/App.java b/examples/metal/connection/fabric_billed/java/src/main/java/generated_program/App.java deleted file mode 100644 index 368eb866..00000000 --- a/examples/metal/connection/fabric_billed/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,38 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Interconnection; -import com.equinix.pulumi.metal.InterconnectionArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("SV"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("200")); - var connection = new Interconnection("connection", InterconnectionArgs.builder() - .name("fabric-port-to-metal") - .projectId(projectId) - .type("shared") - .redundancy("primary") - .metro(metro) - .speed(String.format("%sMbps", speedInMbps)) - .serviceTokenType("z_side") - .build()); - - ctx.export("connectionStatus", connection.status()); - ctx.export("connectionTokens", connection.serviceTokens()); - } -} diff --git a/examples/metal/connection/fabric_billed/python/Pulumi.yaml b/examples/metal/connection/fabric_billed/python/Pulumi.yaml deleted file mode 100644 index d85161fc..00000000 --- a/examples/metal/connection/fabric_billed/python/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-fabric-billed-token -runtime: python -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 200 diff --git a/examples/metal/connection/fabric_billed/python/requirements.txt b/examples/metal/connection/fabric_billed/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/connection/fabric_billed/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/connection/fabric_billed/typescript/Pulumi.yaml b/examples/metal/connection/fabric_billed/typescript/Pulumi.yaml deleted file mode 100644 index 1c61f966..00000000 --- a/examples/metal/connection/fabric_billed/typescript/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-fabric-billed-token -runtime: nodejs -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 200 diff --git a/examples/metal/connection/fabric_billed/typescript/package.json b/examples/metal/connection/fabric_billed/typescript/package.json deleted file mode 100644 index 11a50ff0..00000000 --- a/examples/metal/connection/fabric_billed/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-interconnection-fabric-billed-token", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/connection/fabric_billed/typescript/tsconfig.json b/examples/metal/connection/fabric_billed/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/connection/fabric_billed/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/connection/fabric_billed/yaml/Pulumi.yaml b/examples/metal/connection/fabric_billed/yaml/Pulumi.yaml deleted file mode 100644 index 9a935006..00000000 --- a/examples/metal/connection/fabric_billed/yaml/Pulumi.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: equinix-metal-interconnection-fabric-billed-token -runtime: yaml -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-fabric-billed) -Fabric Billed- resource -config: - projectId: - type: string - metro: - type: string - default: SV - speedInMbps: - type: integer - default: 200 -resources: - connection: - type: equinix:metal:Interconnection - properties: - name: fabric-port-to-metal - projectId: ${projectId} - type: shared - redundancy: primary - metro: ${metro} - speed: ${speedInMbps}Mbps - serviceTokenType: z_side -outputs: - connectionStatus: ${connection.status} - connectionTokens: ${connection.serviceTokens} diff --git a/examples/metal/connection/metal_billed/csharp/Program.cs b/examples/metal/connection/metal_billed/csharp/Program.cs deleted file mode 100644 index 63be04bb..00000000 --- a/examples/metal/connection/metal_billed/csharp/Program.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "SV"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 1000; - var connection = new Equinix.Metal.Interconnection("connection", new() - { - Name = "metal-to-cloudprovider", - ProjectId = projectId, - Type = "shared", - Redundancy = "primary", - Metro = metro, - Speed = $"{speedInMbps}Mbps", - ServiceTokenType = "a_side", - }); - - return new Dictionary - { - ["connectionStatus"] = connection.Status, - ["connectionTokens"] = connection.ServiceTokens, - }; -}); - diff --git a/examples/metal/connection/metal_billed/csharp/Pulumi.yaml b/examples/metal/connection/metal_billed/csharp/Pulumi.yaml deleted file mode 100644 index a151c03c..00000000 --- a/examples/metal/connection/metal_billed/csharp/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-metal-billed-token -runtime: dotnet -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 1000 diff --git a/examples/metal/connection/metal_billed/csharp/equinix-metal-interconnection-metal-billed-token.csproj b/examples/metal/connection/metal_billed/csharp/equinix-metal-interconnection-metal-billed-token.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/connection/metal_billed/csharp/equinix-metal-interconnection-metal-billed-token.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/connection/metal_billed/example.md b/examples/metal/connection/metal_billed/example.md deleted file mode 100644 index 6449cdf9..00000000 --- a/examples/metal/connection/metal_billed/example.md +++ /dev/null @@ -1,210 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "SV"; -const speedInMbps = config.getNumber("speedInMbps") || 1000; -const connection = new equinix.metal.Interconnection("connection", { - name: "metal-to-cloudprovider", - projectId: projectId, - type: "shared", - redundancy: "primary", - metro: metro, - speed: `${speedInMbps}Mbps`, - serviceTokenType: "a_side", -}); -export const connectionStatus = connection.status; -export const connectionTokens = connection.serviceTokens; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "SV" -speed_in_mbps = config.get_int("speedInMbps") -if speed_in_mbps is None: - speed_in_mbps = 1000 -connection = equinix.metal.Interconnection("connection", - name="metal-to-cloudprovider", - project_id=project_id, - type="shared", - redundancy="primary", - metro=metro, - speed=f"{speed_in_mbps}Mbps", - service_token_type="a_side") -pulumi.export("connectionStatus", connection.status) -pulumi.export("connectionTokens", connection.service_tokens) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "fmt" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param - } - speedInMbps := 1000 - if param := cfg.GetInt("speedInMbps"); param != 0 { - speedInMbps = param - } - connection, err := metal.NewInterconnection(ctx, "connection", &metal.InterconnectionArgs{ - Name: pulumi.String("metal-to-cloudprovider"), - ProjectId: pulumi.String(projectId), - Type: pulumi.String("shared"), - Redundancy: pulumi.String("primary"), - Metro: pulumi.String(metro), - Speed: pulumi.String(fmt.Sprintf("%vMbps", speedInMbps)), - ServiceTokenType: pulumi.String("a_side"), - }) - if err != nil { - return err - } - ctx.Export("connectionStatus", connection.Status) - ctx.Export("connectionTokens", connection.ServiceTokens) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "SV"; - var speedInMbps = config.GetNumber("speedInMbps") ?? 1000; - var connection = new Equinix.Metal.Interconnection("connection", new() - { - Name = "metal-to-cloudprovider", - ProjectId = projectId, - Type = "shared", - Redundancy = "primary", - Metro = metro, - Speed = $"{speedInMbps}Mbps", - ServiceTokenType = "a_side", - }); - - return new Dictionary - { - ["connectionStatus"] = connection.Status, - ["connectionTokens"] = connection.ServiceTokens, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Interconnection; -import com.equinix.pulumi.metal.InterconnectionArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("SV"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("1000")); - - var connection = new Interconnection("connection", InterconnectionArgs.builder() - .name("metal-to-cloudprovider") - .projectId(projectId) - .type("shared") - .redundancy("primary") - .metro(metro) - .speed(String.format("%sMbps", speedInMbps)) - .serviceTokenType("a_side") - .build()); - - ctx.export("connectionStatus", connection.status()); - ctx.export("connectionTokens", connection.serviceTokens()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - metro: - type: string - default: SV - speedInMbps: - type: integer - default: 1000 -resources: - connection: - type: equinix:metal:Interconnection - properties: - name: metal-to-cloudprovider - projectId: ${projectId} - type: shared - redundancy: primary - metro: ${metro} - speed: ${speedInMbps}Mbps - serviceTokenType: a_side -outputs: - connectionStatus: ${connection.status} - connectionTokens: ${connection.serviceTokens} -``` - -{{% /choosable %}} diff --git a/examples/metal/connection/metal_billed/go/Pulumi.yaml b/examples/metal/connection/metal_billed/go/Pulumi.yaml deleted file mode 100644 index 5accddd4..00000000 --- a/examples/metal/connection/metal_billed/go/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-metal-billed-token -runtime: go -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 1000 diff --git a/examples/metal/connection/metal_billed/go/go.mod b/examples/metal/connection/metal_billed/go/go.mod deleted file mode 100644 index aaf2ca11..00000000 --- a/examples/metal/connection/metal_billed/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-interconnection-metal-billed-token - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/connection/metal_billed/java/.gitignore b/examples/metal/connection/metal_billed/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/connection/metal_billed/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/connection/metal_billed/java/Pulumi.yaml b/examples/metal/connection/metal_billed/java/Pulumi.yaml deleted file mode 100644 index 88ca9444..00000000 --- a/examples/metal/connection/metal_billed/java/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-metal-billed-token -runtime: java -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: string - default: "1000" diff --git a/examples/metal/connection/metal_billed/java/pom.xml b/examples/metal/connection/metal_billed/java/pom.xml deleted file mode 100644 index d1aa79ae..00000000 --- a/examples/metal/connection/metal_billed/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-interconnection-metal-billed-token - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/connection/metal_billed/java/src/main/java/generated_program/App.java b/examples/metal/connection/metal_billed/java/src/main/java/generated_program/App.java deleted file mode 100644 index 636a46af..00000000 --- a/examples/metal/connection/metal_billed/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,39 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Interconnection; -import com.equinix.pulumi.metal.InterconnectionArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("SV"); - final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("1000")); - - var connection = new Interconnection("connection", InterconnectionArgs.builder() - .name("metal-to-cloudprovider") - .projectId(projectId) - .type("shared") - .redundancy("primary") - .metro(metro) - .speed(String.format("%sMbps", speedInMbps)) - .serviceTokenType("a_side") - .build()); - - ctx.export("connectionStatus", connection.status()); - ctx.export("connectionTokens", connection.serviceTokens()); - } -} diff --git a/examples/metal/connection/metal_billed/python/Pulumi.yaml b/examples/metal/connection/metal_billed/python/Pulumi.yaml deleted file mode 100644 index 8030f830..00000000 --- a/examples/metal/connection/metal_billed/python/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-metal-billed-token -runtime: python -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 1000 diff --git a/examples/metal/connection/metal_billed/python/requirements.txt b/examples/metal/connection/metal_billed/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/connection/metal_billed/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/connection/metal_billed/typescript.zip b/examples/metal/connection/metal_billed/typescript.zip deleted file mode 100644 index c6504b15..00000000 Binary files a/examples/metal/connection/metal_billed/typescript.zip and /dev/null differ diff --git a/examples/metal/connection/metal_billed/typescript/Pulumi.yaml b/examples/metal/connection/metal_billed/typescript/Pulumi.yaml deleted file mode 100644 index b7bc69bc..00000000 --- a/examples/metal/connection/metal_billed/typescript/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-interconnection-metal-billed-token -runtime: nodejs -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource -config: - metro: - type: string - default: SV - projectId: - type: string - speedInMbps: - type: integer - default: 1000 diff --git a/examples/metal/connection/metal_billed/typescript/package.json b/examples/metal/connection/metal_billed/typescript/package.json deleted file mode 100644 index 1065986c..00000000 --- a/examples/metal/connection/metal_billed/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-interconnection-metal-billed-token", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/connection/metal_billed/typescript/tsconfig.json b/examples/metal/connection/metal_billed/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/connection/metal_billed/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/connection/metal_billed/yaml/Pulumi.yaml b/examples/metal/connection/metal_billed/yaml/Pulumi.yaml deleted file mode 100644 index c05c6905..00000000 --- a/examples/metal/connection/metal_billed/yaml/Pulumi.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: equinix-metal-interconnection-metal-billed-token -runtime: yaml -description: An [Equinix Metal Interconnection](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#fabric-virtual-connections-metal-billed) -Metal Billed- resource -config: - projectId: - type: string - metro: - type: string - default: SV - speedInMbps: - type: integer - default: 1000 -resources: - connection: - type: equinix:metal:Interconnection - properties: - name: metal-to-cloudprovider - projectId: ${projectId} - type: shared - redundancy: primary - metro: ${metro} - speed: ${speedInMbps}Mbps - serviceTokenType: a_side -outputs: - connectionStatus: ${connection.status} - connectionTokens: ${connection.serviceTokens} diff --git a/examples/metal/device/csharp/Program.cs b/examples/metal/device/csharp/Program.cs deleted file mode 100644 index 21802f82..00000000 --- a/examples/metal/device/csharp/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var web = new Equinix.Metal.Device("web", new() - { - Hostname = "webserver1", - Plan = "c3.small.x86", - OperatingSystem = "ubuntu_20_04", - Metro = "sv", - BillingCycle = "hourly", - ProjectId = projectId, - }); - - return new Dictionary - { - ["webPublicIp"] = web.AccessPublicIpv4.Apply(accessPublicIpv4 => $"http://{accessPublicIpv4}"), - }; -}); - diff --git a/examples/metal/device/csharp/Pulumi.yaml b/examples/metal/device/csharp/Pulumi.yaml deleted file mode 100644 index 23b8635b..00000000 --- a/examples/metal/device/csharp/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-device -runtime: dotnet -description: An Equinix Metal device resource -config: - projectId: - type: string diff --git a/examples/metal/device/csharp/equinix-metal-device.csproj b/examples/metal/device/csharp/equinix-metal-device.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/device/csharp/equinix-metal-device.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/device/example.md b/examples/metal/device/example.md deleted file mode 100644 index b729c877..00000000 --- a/examples/metal/device/example.md +++ /dev/null @@ -1,166 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const web = new equinix.metal.Device("web", { - hostname: "webserver1", - plan: "c3.small.x86", - operatingSystem: "ubuntu_20_04", - metro: "sv", - billingCycle: "hourly", - projectId: projectId, -}); -export const webPublicIp = pulumi.interpolate`http://${web.accessPublicIpv4}`; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -web = equinix.metal.Device("web", - hostname="webserver1", - plan="c3.small.x86", - operating_system="ubuntu_20_04", - metro="sv", - billing_cycle="hourly", - project_id=project_id) -pulumi.export("webPublicIp", web.access_public_ipv4.apply(lambda access_public_ipv4: f"http://{access_public_ipv4}")) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "fmt" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - web, err := metal.NewDevice(ctx, "web", &metal.DeviceArgs{ - Hostname: pulumi.String("webserver1"), - Plan: pulumi.String("c3.small.x86"), - OperatingSystem: pulumi.String("ubuntu_20_04"), - Metro: pulumi.String("sv"), - BillingCycle: pulumi.String("hourly"), - ProjectId: pulumi.String(projectId), - }) - if err != nil { - return err - } - ctx.Export("webPublicIp", web.AccessPublicIpv4.ApplyT(func(accessPublicIpv4 string) (string, error) { - return fmt.Sprintf("http://%v", accessPublicIpv4), nil - }).(pulumi.StringOutput)) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var web = new Equinix.Metal.Device("web", new() - { - Hostname = "webserver1", - Plan = "c3.small.x86", - OperatingSystem = "ubuntu_20_04", - Metro = "sv", - BillingCycle = "hourly", - ProjectId = projectId, - }); - - return new Dictionary - { - ["webPublicIp"] = web.AccessPublicIpv4.Apply(accessPublicIpv4 => $"http://{accessPublicIpv4}"), - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Device; -import com.equinix.pulumi.metal.DeviceArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - var web = new Device("web", DeviceArgs.builder() - .hostname("webserver1") - .plan("c3.small.x86") - .operatingSystem("ubuntu_20_04") - .metro("sv") - .billingCycle("hourly") - .projectId(projectId) - .build()); - - ctx.export("webPublicIp", web.accessPublicIpv4().applyValue(accessPublicIpv4 -> String.format("http://%s", accessPublicIpv4))); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string -resources: - web: - type: equinix:metal:Device - properties: - hostname: webserver1 - plan: c3.small.x86 - operatingSystem: ubuntu_20_04 - metro: sv - billingCycle: hourly - projectId: ${projectId} -outputs: - webPublicIp: http://${web.accessPublicIpv4} -``` - -{{% /choosable %}} diff --git a/examples/metal/device/example_1/Pulumi.yaml b/examples/metal/device/example_1/Pulumi.yaml new file mode 100644 index 00000000..4e6d10e1 --- /dev/null +++ b/examples/metal/device/example_1/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-device-example_1 +runtime: yaml +resources: + web1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2 + plan: c3.small.x86 + metro: sv + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} diff --git a/examples/metal/device/example_1/csharp/.gitignore b/examples/metal/device/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/device/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/device/example_1/csharp/Program.cs b/examples/metal/device/example_1/csharp/Program.cs new file mode 100644 index 00000000..07927004 --- /dev/null +++ b/examples/metal/device/example_1/csharp/Program.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var web1 = new Equinix.Metal.Device("web1", new() + { + Hostname = "tf.coreos2", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "sv", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }); + +}); + diff --git a/examples/metal/device/example_1/csharp/Pulumi.yaml b/examples/metal/device/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..b0a05c4b --- /dev/null +++ b/examples/metal/device/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_1 +runtime: dotnet diff --git a/examples/metal/device/example_1/csharp/equinix-metal-device-example_1.csproj b/examples/metal/device/example_1/csharp/equinix-metal-device-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/device/example_1/csharp/equinix-metal-device-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_1/go/Pulumi.yaml b/examples/metal/device/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..88f5ab3b --- /dev/null +++ b/examples/metal/device/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_1 +runtime: go diff --git a/examples/metal/device/example_1/go/go.mod b/examples/metal/device/example_1/go/go.mod new file mode 100644 index 00000000..1d0d4791 --- /dev/null +++ b/examples/metal/device/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-device-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/device/example_1/go/main.go b/examples/metal/device/example_1/go/main.go new file mode 100644 index 00000000..a0500eef --- /dev/null +++ b/examples/metal/device/example_1/go/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("sv"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/device/example_1/java/Pulumi.yaml b/examples/metal/device/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..abf5d023 --- /dev/null +++ b/examples/metal/device/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_1 +runtime: java diff --git a/examples/metal/device/example_1/java/pom.xml b/examples/metal/device/example_1/java/pom.xml new file mode 100644 index 00000000..6728e229 --- /dev/null +++ b/examples/metal/device/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-device-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_1/java/src/main/java/generated_program/App.java b/examples/metal/device/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..4216d2b2 --- /dev/null +++ b/examples/metal/device/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,31 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var web1 = new Device("web1", DeviceArgs.builder() + .hostname("tf.coreos2") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + } +} diff --git a/examples/metal/device/example_1/python/.gitignore b/examples/metal/device/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/device/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/device/example_1/python/Pulumi.yaml b/examples/metal/device/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..b44e43cc --- /dev/null +++ b/examples/metal/device/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_1 +runtime: python diff --git a/examples/metal/device/example_1/python/__main__.py b/examples/metal/device/example_1/python/__main__.py new file mode 100644 index 00000000..f234bb56 --- /dev/null +++ b/examples/metal/device/example_1/python/__main__.py @@ -0,0 +1,10 @@ +import pulumi +import pulumi_equinix as equinix + +web1 = equinix.metal.Device("web1", + hostname="tf.coreos2", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="sv", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id) diff --git a/examples/metal/device/example_1/python/requirements.txt b/examples/metal/device/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/device/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/device/example_1/typescript/.gitignore b/examples/metal/device/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/device/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/device/example_1/typescript/Pulumi.yaml b/examples/metal/device/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..b720c6f2 --- /dev/null +++ b/examples/metal/device/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_1 +runtime: nodejs diff --git a/examples/metal/device/example_1/typescript/index.ts b/examples/metal/device/example_1/typescript/index.ts new file mode 100644 index 00000000..4936b15d --- /dev/null +++ b/examples/metal/device/example_1/typescript/index.ts @@ -0,0 +1,11 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const web1 = new equinix.metal.Device("web1", { + hostname: "tf.coreos2", + plan: equinix.metal.Plan.C3SmallX86, + metro: "sv", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}); diff --git a/examples/metal/device/example_1/typescript/package.json b/examples/metal/device/example_1/typescript/package.json new file mode 100644 index 00000000..770383f8 --- /dev/null +++ b/examples/metal/device/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-device-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/device/example_1/typescript/tsconfig.json b/examples/metal/device/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/device/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/device/example_2/Pulumi.yaml b/examples/metal/device/example_2/Pulumi.yaml new file mode 100644 index 00000000..cc041a61 --- /dev/null +++ b/examples/metal/device/example_2/Pulumi.yaml @@ -0,0 +1,15 @@ +name: equinix-metal-device-example_2 +runtime: yaml +resources: + pxe1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2-pxe + plan: c3.small.x86 + metro: sv + operatingSystem: custom_ipxe + billingCycle: hourly + projectId: ${projectId} + ipxeScriptUrl: https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe + alwaysPxe: 'false' + userData: ${example.rendered} diff --git a/examples/metal/device/example_2/csharp/.gitignore b/examples/metal/device/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/device/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/device/example_2/csharp/Program.cs b/examples/metal/device/example_2/csharp/Program.cs new file mode 100644 index 00000000..b9461c86 --- /dev/null +++ b/examples/metal/device/example_2/csharp/Program.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var pxe1 = new Equinix.Metal.Device("pxe1", new() + { + Hostname = "tf.coreos2-pxe", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "sv", + OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + IpxeScriptUrl = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + AlwaysPxe = false, + UserData = example.Rendered, + }); + +}); + diff --git a/examples/metal/device/example_2/csharp/Pulumi.yaml b/examples/metal/device/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..676a8172 --- /dev/null +++ b/examples/metal/device/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_2 +runtime: dotnet diff --git a/examples/metal/device/example_2/csharp/equinix-metal-device-example_2.csproj b/examples/metal/device/example_2/csharp/equinix-metal-device-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/device/example_2/csharp/equinix-metal-device-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_2/go/Pulumi.yaml b/examples/metal/device/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..2395351a --- /dev/null +++ b/examples/metal/device/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_2 +runtime: go diff --git a/examples/metal/device/example_2/go/go.mod b/examples/metal/device/example_2/go/go.mod new file mode 100644 index 00000000..bbd43865 --- /dev/null +++ b/examples/metal/device/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-device-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/device/example_2/go/main.go b/examples/metal/device/example_2/go/main.go new file mode 100644 index 00000000..5deb9c5a --- /dev/null +++ b/examples/metal/device/example_2/go/main.go @@ -0,0 +1,26 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "pxe1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2-pxe"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("sv"), + OperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + IpxeScriptUrl: pulumi.String("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe"), + AlwaysPxe: pulumi.Bool(false), + UserData: pulumi.Any(example.Rendered), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/device/example_2/java/Pulumi.yaml b/examples/metal/device/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..0cd365ba --- /dev/null +++ b/examples/metal/device/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_2 +runtime: java diff --git a/examples/metal/device/example_2/java/pom.xml b/examples/metal/device/example_2/java/pom.xml new file mode 100644 index 00000000..fec0bbe0 --- /dev/null +++ b/examples/metal/device/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-device-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_2/java/src/main/java/generated_program/App.java b/examples/metal/device/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..c823ab35 --- /dev/null +++ b/examples/metal/device/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,34 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var pxe1 = new Device("pxe1", DeviceArgs.builder() + .hostname("tf.coreos2-pxe") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("custom_ipxe") + .billingCycle("hourly") + .projectId(projectId) + .ipxeScriptUrl("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe") + .alwaysPxe("false") + .userData(example.rendered()) + .build()); + + } +} diff --git a/examples/metal/device/example_2/python/.gitignore b/examples/metal/device/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/device/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/device/example_2/python/Pulumi.yaml b/examples/metal/device/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..a595ee96 --- /dev/null +++ b/examples/metal/device/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_2 +runtime: python diff --git a/examples/metal/device/example_2/python/__main__.py b/examples/metal/device/example_2/python/__main__.py new file mode 100644 index 00000000..b63cafcb --- /dev/null +++ b/examples/metal/device/example_2/python/__main__.py @@ -0,0 +1,13 @@ +import pulumi +import pulumi_equinix as equinix + +pxe1 = equinix.metal.Device("pxe1", + hostname="tf.coreos2-pxe", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="sv", + operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + always_pxe=False, + user_data=example["rendered"]) diff --git a/examples/metal/device/example_2/python/requirements.txt b/examples/metal/device/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/device/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/device/example_2/typescript/.gitignore b/examples/metal/device/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/device/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/device/example_2/typescript/Pulumi.yaml b/examples/metal/device/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..74fbaf37 --- /dev/null +++ b/examples/metal/device/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_2 +runtime: nodejs diff --git a/examples/metal/device/example_2/typescript/index.ts b/examples/metal/device/example_2/typescript/index.ts new file mode 100644 index 00000000..f502a246 --- /dev/null +++ b/examples/metal/device/example_2/typescript/index.ts @@ -0,0 +1,14 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const pxe1 = new equinix.metal.Device("pxe1", { + hostname: "tf.coreos2-pxe", + plan: equinix.metal.Plan.C3SmallX86, + metro: "sv", + operatingSystem: equinix.metal.OperatingSystem.CustomIPXE, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + ipxeScriptUrl: "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + alwaysPxe: false, + userData: example.rendered, +}); diff --git a/examples/metal/device/example_2/typescript/package.json b/examples/metal/device/example_2/typescript/package.json new file mode 100644 index 00000000..4eab5d4e --- /dev/null +++ b/examples/metal/device/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-device-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/device/example_2/typescript/tsconfig.json b/examples/metal/device/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/device/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/device/example_3/Pulumi.yaml b/examples/metal/device/example_3/Pulumi.yaml new file mode 100644 index 00000000..312967fe --- /dev/null +++ b/examples/metal/device/example_3/Pulumi.yaml @@ -0,0 +1,15 @@ +name: equinix-metal-device-example_3 +runtime: yaml +resources: + web1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2 + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + ipAddresses: + - type: private_ipv4 + cidr: 30 diff --git a/examples/metal/device/example_3/csharp/.gitignore b/examples/metal/device/example_3/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/device/example_3/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/device/example_3/csharp/Program.cs b/examples/metal/device/example_3/csharp/Program.cs new file mode 100644 index 00000000..21c5df3b --- /dev/null +++ b/examples/metal/device/example_3/csharp/Program.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var web1 = new Equinix.Metal.Device("web1", new() + { + Hostname = "tf.coreos2", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + IpAddresses = new[] + { + new Equinix.Metal.Inputs.DeviceIpAddressArgs + { + Type = "private_ipv4", + Cidr = 30, + }, + }, + }); + +}); + diff --git a/examples/metal/device/example_3/csharp/Pulumi.yaml b/examples/metal/device/example_3/csharp/Pulumi.yaml new file mode 100644 index 00000000..b50d25e2 --- /dev/null +++ b/examples/metal/device/example_3/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_3 +runtime: dotnet diff --git a/examples/metal/device/example_3/csharp/equinix-metal-device-example_3.csproj b/examples/metal/device/example_3/csharp/equinix-metal-device-example_3.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/device/example_3/csharp/equinix-metal-device-example_3.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_3/go/Pulumi.yaml b/examples/metal/device/example_3/go/Pulumi.yaml new file mode 100644 index 00000000..df96b28b --- /dev/null +++ b/examples/metal/device/example_3/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_3 +runtime: go diff --git a/examples/metal/device/example_3/go/go.mod b/examples/metal/device/example_3/go/go.mod new file mode 100644 index 00000000..b972a491 --- /dev/null +++ b/examples/metal/device/example_3/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-device-example_3 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/device/example_3/go/main.go b/examples/metal/device/example_3/go/main.go new file mode 100644 index 00000000..6315cc87 --- /dev/null +++ b/examples/metal/device/example_3/go/main.go @@ -0,0 +1,29 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + IpAddresses: metal.DeviceIpAddressArray{ + &metal.DeviceIpAddressArgs{ + Type: pulumi.String("private_ipv4"), + Cidr: pulumi.Int(30), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/device/example_3/java/Pulumi.yaml b/examples/metal/device/example_3/java/Pulumi.yaml new file mode 100644 index 00000000..622b2e7a --- /dev/null +++ b/examples/metal/device/example_3/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_3 +runtime: java diff --git a/examples/metal/device/example_3/java/pom.xml b/examples/metal/device/example_3/java/pom.xml new file mode 100644 index 00000000..9f006196 --- /dev/null +++ b/examples/metal/device/example_3/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-device-example_3 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_3/java/src/main/java/generated_program/App.java b/examples/metal/device/example_3/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..183a9d36 --- /dev/null +++ b/examples/metal/device/example_3/java/src/main/java/generated_program/App.java @@ -0,0 +1,36 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var web1 = new Device("web1", DeviceArgs.builder() + .hostname("tf.coreos2") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .ipAddresses(DeviceIpAddressArgs.builder() + .type("private_ipv4") + .cidr(30) + .build()) + .build()); + + } +} diff --git a/examples/metal/device/example_3/python/.gitignore b/examples/metal/device/example_3/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/device/example_3/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/device/example_3/python/Pulumi.yaml b/examples/metal/device/example_3/python/Pulumi.yaml new file mode 100644 index 00000000..dfcfd778 --- /dev/null +++ b/examples/metal/device/example_3/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_3 +runtime: python diff --git a/examples/metal/device/example_3/python/__main__.py b/examples/metal/device/example_3/python/__main__.py new file mode 100644 index 00000000..454ceb69 --- /dev/null +++ b/examples/metal/device/example_3/python/__main__.py @@ -0,0 +1,14 @@ +import pulumi +import pulumi_equinix as equinix + +web1 = equinix.metal.Device("web1", + hostname="tf.coreos2", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + ip_addresses=[equinix.metal.DeviceIpAddressArgs( + type="private_ipv4", + cidr=30, + )]) diff --git a/examples/metal/device/example_3/python/requirements.txt b/examples/metal/device/example_3/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/device/example_3/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/device/example_3/typescript/.gitignore b/examples/metal/device/example_3/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/device/example_3/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/device/example_3/typescript/Pulumi.yaml b/examples/metal/device/example_3/typescript/Pulumi.yaml new file mode 100644 index 00000000..e1ceb553 --- /dev/null +++ b/examples/metal/device/example_3/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_3 +runtime: nodejs diff --git a/examples/metal/device/example_3/typescript/index.ts b/examples/metal/device/example_3/typescript/index.ts new file mode 100644 index 00000000..e8a6a628 --- /dev/null +++ b/examples/metal/device/example_3/typescript/index.ts @@ -0,0 +1,15 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const web1 = new equinix.metal.Device("web1", { + hostname: "tf.coreos2", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + ipAddresses: [{ + type: "private_ipv4", + cidr: 30, + }], +}); diff --git a/examples/metal/device/example_3/typescript/package.json b/examples/metal/device/example_3/typescript/package.json new file mode 100644 index 00000000..09d92437 --- /dev/null +++ b/examples/metal/device/example_3/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-device-example_3", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/device/example_3/typescript/tsconfig.json b/examples/metal/device/example_3/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/device/example_3/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/device/example_4/Pulumi.yaml b/examples/metal/device/example_4/Pulumi.yaml new file mode 100644 index 00000000..f51d33ba --- /dev/null +++ b/examples/metal/device/example_4/Pulumi.yaml @@ -0,0 +1,67 @@ +name: equinix-metal-device-example_4 +runtime: yaml +resources: + web1: + type: equinix:metal:Device + properties: + hostname: tftest + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + hardwareReservationId: next-available + storage: | + { + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] + } diff --git a/examples/metal/device/example_4/csharp/.gitignore b/examples/metal/device/example_4/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/device/example_4/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/device/example_4/csharp/Program.cs b/examples/metal/device/example_4/csharp/Program.cs new file mode 100644 index 00000000..cde1307e --- /dev/null +++ b/examples/metal/device/example_4/csharp/Program.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var web1 = new Equinix.Metal.Device("web1", new() + { + Hostname = "tftest", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + HardwareReservationId = "next-available", + Storage = @"{ + ""disks"": [ + { + ""device"": ""/dev/sda"", + ""wipeTable"": true, + ""partitions"": [ + { + ""label"": ""BIOS"", + ""number"": 1, + ""size"": ""4096"" + }, + { + ""label"": ""SWAP"", + ""number"": 2, + ""size"": ""3993600"" + }, + { + ""label"": ""ROOT"", + ""number"": 3, + ""size"": ""0"" + } + ] + } + ], + ""filesystems"": [ + { + ""mount"": { + ""device"": ""/dev/sda3"", + ""format"": ""ext4"", + ""point"": ""/"", + ""create"": { + ""options"": [ + ""-L"", + ""ROOT"" + ] + } + } + }, + { + ""mount"": { + ""device"": ""/dev/sda2"", + ""format"": ""swap"", + ""point"": ""none"", + ""create"": { + ""options"": [ + ""-L"", + ""SWAP"" + ] + } + } + } + ] +} +", + }); + +}); + diff --git a/examples/metal/device/example_4/csharp/Pulumi.yaml b/examples/metal/device/example_4/csharp/Pulumi.yaml new file mode 100644 index 00000000..11f570d0 --- /dev/null +++ b/examples/metal/device/example_4/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_4 +runtime: dotnet diff --git a/examples/metal/device/example_4/csharp/equinix-metal-device-example_4.csproj b/examples/metal/device/example_4/csharp/equinix-metal-device-example_4.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/device/example_4/csharp/equinix-metal-device-example_4.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_4/go/Pulumi.yaml b/examples/metal/device/example_4/go/Pulumi.yaml new file mode 100644 index 00000000..bd5141bc --- /dev/null +++ b/examples/metal/device/example_4/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_4 +runtime: go diff --git a/examples/metal/device/example_4/go/go.mod b/examples/metal/device/example_4/go/go.mod new file mode 100644 index 00000000..f048dbc3 --- /dev/null +++ b/examples/metal/device/example_4/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-device-example_4 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/device/example_4/go/main.go b/examples/metal/device/example_4/go/main.go new file mode 100644 index 00000000..068f01fa --- /dev/null +++ b/examples/metal/device/example_4/go/main.go @@ -0,0 +1,78 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ + Hostname: pulumi.String("tftest"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + HardwareReservationId: pulumi.String("next-available"), + Storage: pulumi.String(`{ + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} +`), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/device/example_4/java/Pulumi.yaml b/examples/metal/device/example_4/java/Pulumi.yaml new file mode 100644 index 00000000..7b103013 --- /dev/null +++ b/examples/metal/device/example_4/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_4 +runtime: java diff --git a/examples/metal/device/example_4/java/pom.xml b/examples/metal/device/example_4/java/pom.xml new file mode 100644 index 00000000..46a1d349 --- /dev/null +++ b/examples/metal/device/example_4/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-device-example_4 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_4/java/src/main/java/generated_program/App.java b/examples/metal/device/example_4/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..e4e1e32d --- /dev/null +++ b/examples/metal/device/example_4/java/src/main/java/generated_program/App.java @@ -0,0 +1,87 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var web1 = new Device("web1", DeviceArgs.builder() + .hostname("tftest") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .hardwareReservationId("next-available") + .storage(""" +{ + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} + """) + .build()); + + } +} diff --git a/examples/metal/device/example_4/python/.gitignore b/examples/metal/device/example_4/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/device/example_4/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/device/example_4/python/Pulumi.yaml b/examples/metal/device/example_4/python/Pulumi.yaml new file mode 100644 index 00000000..0a38f11d --- /dev/null +++ b/examples/metal/device/example_4/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_4 +runtime: python diff --git a/examples/metal/device/example_4/python/__main__.py b/examples/metal/device/example_4/python/__main__.py new file mode 100644 index 00000000..604c2075 --- /dev/null +++ b/examples/metal/device/example_4/python/__main__.py @@ -0,0 +1,65 @@ +import pulumi +import pulumi_equinix as equinix + +web1 = equinix.metal.Device("web1", + hostname="tftest", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + hardware_reservation_id="next-available", + storage="""{ + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} +""") diff --git a/examples/metal/device/example_4/python/requirements.txt b/examples/metal/device/example_4/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/device/example_4/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/device/example_4/typescript/.gitignore b/examples/metal/device/example_4/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/device/example_4/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/device/example_4/typescript/Pulumi.yaml b/examples/metal/device/example_4/typescript/Pulumi.yaml new file mode 100644 index 00000000..fdb47e60 --- /dev/null +++ b/examples/metal/device/example_4/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_4 +runtime: nodejs diff --git a/examples/metal/device/example_4/typescript/index.ts b/examples/metal/device/example_4/typescript/index.ts new file mode 100644 index 00000000..459c91bb --- /dev/null +++ b/examples/metal/device/example_4/typescript/index.ts @@ -0,0 +1,66 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const web1 = new equinix.metal.Device("web1", { + hostname: "tftest", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + hardwareReservationId: "next-available", + storage: `{ + "disks": [ + { + "device": "/dev/sda", + "wipeTable": true, + "partitions": [ + { + "label": "BIOS", + "number": 1, + "size": "4096" + }, + { + "label": "SWAP", + "number": 2, + "size": "3993600" + }, + { + "label": "ROOT", + "number": 3, + "size": "0" + } + ] + } + ], + "filesystems": [ + { + "mount": { + "device": "/dev/sda3", + "format": "ext4", + "point": "/", + "create": { + "options": [ + "-L", + "ROOT" + ] + } + } + }, + { + "mount": { + "device": "/dev/sda2", + "format": "swap", + "point": "none", + "create": { + "options": [ + "-L", + "SWAP" + ] + } + } + } + ] +} +`, +}); diff --git a/examples/metal/device/example_4/typescript/package.json b/examples/metal/device/example_4/typescript/package.json new file mode 100644 index 00000000..e9883982 --- /dev/null +++ b/examples/metal/device/example_4/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-device-example_4", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/device/example_4/typescript/tsconfig.json b/examples/metal/device/example_4/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/device/example_4/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/device/example_5/Pulumi.yaml b/examples/metal/device/example_5/Pulumi.yaml new file mode 100644 index 00000000..9741284d --- /dev/null +++ b/examples/metal/device/example_5/Pulumi.yaml @@ -0,0 +1,20 @@ +name: equinix-metal-device-example_5 +runtime: yaml +resources: + pxe1: + type: equinix:metal:Device + properties: + hostname: tf.coreos2-pxe + plan: c3.small.x86 + metro: sv + operatingSystem: custom_ipxe + billingCycle: hourly + projectId: ${projectId} + ipxeScriptUrl: https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe + alwaysPxe: 'false' + userData: ${userData} + customData: ${customData} + behavior: + allowChanges: + - custom_data + - user_data diff --git a/examples/metal/device/example_5/csharp/.gitignore b/examples/metal/device/example_5/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/device/example_5/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/device/example_5/csharp/Program.cs b/examples/metal/device/example_5/csharp/Program.cs new file mode 100644 index 00000000..9a0a2b30 --- /dev/null +++ b/examples/metal/device/example_5/csharp/Program.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var pxe1 = new Equinix.Metal.Device("pxe1", new() + { + Hostname = "tf.coreos2-pxe", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "sv", + OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + IpxeScriptUrl = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + AlwaysPxe = false, + UserData = userData, + CustomData = customData, + Behavior = new Equinix.Metal.Inputs.DeviceBehaviorArgs + { + AllowChanges = new[] + { + "custom_data", + "user_data", + }, + }, + }); + +}); + diff --git a/examples/metal/device/example_5/csharp/Pulumi.yaml b/examples/metal/device/example_5/csharp/Pulumi.yaml new file mode 100644 index 00000000..9d1cc5aa --- /dev/null +++ b/examples/metal/device/example_5/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_5 +runtime: dotnet diff --git a/examples/metal/device/example_5/csharp/equinix-metal-device-example_5.csproj b/examples/metal/device/example_5/csharp/equinix-metal-device-example_5.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/device/example_5/csharp/equinix-metal-device-example_5.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_5/go/Pulumi.yaml b/examples/metal/device/example_5/go/Pulumi.yaml new file mode 100644 index 00000000..e7f491da --- /dev/null +++ b/examples/metal/device/example_5/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_5 +runtime: go diff --git a/examples/metal/device/example_5/go/go.mod b/examples/metal/device/example_5/go/go.mod new file mode 100644 index 00000000..f49f6459 --- /dev/null +++ b/examples/metal/device/example_5/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-device-example_5 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/device/example_5/go/main.go b/examples/metal/device/example_5/go/main.go new file mode 100644 index 00000000..04ec0590 --- /dev/null +++ b/examples/metal/device/example_5/go/main.go @@ -0,0 +1,33 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewDevice(ctx, "pxe1", &metal.DeviceArgs{ + Hostname: pulumi.String("tf.coreos2-pxe"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("sv"), + OperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + IpxeScriptUrl: pulumi.String("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe"), + AlwaysPxe: pulumi.Bool(false), + UserData: pulumi.Any(userData), + CustomData: pulumi.Any(customData), + Behavior: &metal.DeviceBehaviorArgs{ + AllowChanges: pulumi.StringArray{ + pulumi.String("custom_data"), + pulumi.String("user_data"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/device/example_5/java/Pulumi.yaml b/examples/metal/device/example_5/java/Pulumi.yaml new file mode 100644 index 00000000..e057f977 --- /dev/null +++ b/examples/metal/device/example_5/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_5 +runtime: java diff --git a/examples/metal/device/example_5/java/pom.xml b/examples/metal/device/example_5/java/pom.xml new file mode 100644 index 00000000..fa508ba8 --- /dev/null +++ b/examples/metal/device/example_5/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-device-example_5 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/device/example_5/java/src/main/java/generated_program/App.java b/examples/metal/device/example_5/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..ede3d9cd --- /dev/null +++ b/examples/metal/device/example_5/java/src/main/java/generated_program/App.java @@ -0,0 +1,41 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.inputs.DeviceBehaviorArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var pxe1 = new Device("pxe1", DeviceArgs.builder() + .hostname("tf.coreos2-pxe") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("custom_ipxe") + .billingCycle("hourly") + .projectId(projectId) + .ipxeScriptUrl("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe") + .alwaysPxe("false") + .userData(userData) + .customData(customData) + .behavior(DeviceBehaviorArgs.builder() + .allowChanges( + "custom_data", + "user_data") + .build()) + .build()); + + } +} diff --git a/examples/metal/device/example_5/python/.gitignore b/examples/metal/device/example_5/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/device/example_5/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/device/example_5/python/Pulumi.yaml b/examples/metal/device/example_5/python/Pulumi.yaml new file mode 100644 index 00000000..ebf47522 --- /dev/null +++ b/examples/metal/device/example_5/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_5 +runtime: python diff --git a/examples/metal/device/example_5/python/__main__.py b/examples/metal/device/example_5/python/__main__.py new file mode 100644 index 00000000..1ebfb5df --- /dev/null +++ b/examples/metal/device/example_5/python/__main__.py @@ -0,0 +1,20 @@ +import pulumi +import pulumi_equinix as equinix + +pxe1 = equinix.metal.Device("pxe1", + hostname="tf.coreos2-pxe", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="sv", + operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + always_pxe=False, + user_data=user_data, + custom_data=custom_data, + behavior=equinix.metal.DeviceBehaviorArgs( + allow_changes=[ + "custom_data", + "user_data", + ], + )) diff --git a/examples/metal/device/example_5/python/requirements.txt b/examples/metal/device/example_5/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/device/example_5/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/device/example_5/typescript/.gitignore b/examples/metal/device/example_5/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/device/example_5/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/device/example_5/typescript/Pulumi.yaml b/examples/metal/device/example_5/typescript/Pulumi.yaml new file mode 100644 index 00000000..648e9d00 --- /dev/null +++ b/examples/metal/device/example_5/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-device-example_5 +runtime: nodejs diff --git a/examples/metal/device/example_5/typescript/index.ts b/examples/metal/device/example_5/typescript/index.ts new file mode 100644 index 00000000..ddab0328 --- /dev/null +++ b/examples/metal/device/example_5/typescript/index.ts @@ -0,0 +1,21 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const pxe1 = new equinix.metal.Device("pxe1", { + hostname: "tf.coreos2-pxe", + plan: equinix.metal.Plan.C3SmallX86, + metro: "sv", + operatingSystem: equinix.metal.OperatingSystem.CustomIPXE, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, + ipxeScriptUrl: "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + alwaysPxe: false, + userData: userData, + customData: customData, + behavior: { + allowChanges: [ + "custom_data", + "user_data", + ], + }, +}); diff --git a/examples/metal/device/example_5/typescript/package.json b/examples/metal/device/example_5/typescript/package.json new file mode 100644 index 00000000..783ce0d0 --- /dev/null +++ b/examples/metal/device/example_5/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-device-example_5", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/device/example_5/typescript/tsconfig.json b/examples/metal/device/example_5/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/device/example_5/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/device/go/Pulumi.yaml b/examples/metal/device/go/Pulumi.yaml deleted file mode 100644 index 4dc76b30..00000000 --- a/examples/metal/device/go/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-device -runtime: go -description: An Equinix Metal device resource -config: - projectId: - type: string diff --git a/examples/metal/device/go/go.mod b/examples/metal/device/go/go.mod deleted file mode 100644 index 5ec42e24..00000000 --- a/examples/metal/device/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-device - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/device/go/main.go b/examples/metal/device/go/main.go deleted file mode 100644 index 12e36d4b..00000000 --- a/examples/metal/device/go/main.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - web, err := metal.NewDevice(ctx, "web", &metal.DeviceArgs{ - Hostname: pulumi.String("webserver1"), - Plan: pulumi.String("c3.small.x86"), - OperatingSystem: pulumi.String("ubuntu_20_04"), - Metro: pulumi.String("sv"), - BillingCycle: pulumi.String("hourly"), - ProjectId: pulumi.String(projectId), - }) - if err != nil { - return err - } - ctx.Export("webPublicIp", web.AccessPublicIpv4.ApplyT(func(accessPublicIpv4 string) (string, error) { - return fmt.Sprintf("http://%v", accessPublicIpv4), nil - }).(pulumi.StringOutput)) - return nil - }) -} diff --git a/examples/metal/device/java/.gitignore b/examples/metal/device/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/device/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/device/java/Pulumi.yaml b/examples/metal/device/java/Pulumi.yaml deleted file mode 100644 index 442d68b9..00000000 --- a/examples/metal/device/java/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-device -runtime: java -description: An Equinix Metal device resource -config: - projectId: - type: string diff --git a/examples/metal/device/java/pom.xml b/examples/metal/device/java/pom.xml deleted file mode 100644 index c1102a31..00000000 --- a/examples/metal/device/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-device - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/device/java/src/main/java/generated_program/App.java b/examples/metal/device/java/src/main/java/generated_program/App.java deleted file mode 100644 index 7f066af5..00000000 --- a/examples/metal/device/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,27 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Device; -import com.equinix.pulumi.metal.DeviceArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - var web = new Device("web", DeviceArgs.builder() - .hostname("webserver1") - .plan("c3.small.x86") - .operatingSystem("ubuntu_20_04") - .metro("sv") - .billingCycle("hourly") - .projectId(projectId) - .build()); - - ctx.export("webPublicIp", web.accessPublicIpv4().applyValue(accessPublicIpv4 -> String.format("http://%s", accessPublicIpv4))); - } -} diff --git a/examples/metal/device/python/Pulumi.yaml b/examples/metal/device/python/Pulumi.yaml deleted file mode 100644 index cd27d1fe..00000000 --- a/examples/metal/device/python/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-device -runtime: python -description: An Equinix Metal device resource -config: - projectId: - type: string diff --git a/examples/metal/device/python/__main__.py b/examples/metal/device/python/__main__.py deleted file mode 100644 index 6cecfe91..00000000 --- a/examples/metal/device/python/__main__.py +++ /dev/null @@ -1,13 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -web = equinix.metal.Device("web", - hostname="webserver1", - plan="c3.small.x86", - operating_system="ubuntu_20_04", - metro="sv", - billing_cycle="hourly", - project_id=project_id) -pulumi.export("webPublicIp", web.access_public_ipv4.apply(lambda access_public_ipv4: f"http://{access_public_ipv4}")) diff --git a/examples/metal/device/python/requirements.txt b/examples/metal/device/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/device/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/device/typescript/Pulumi.yaml b/examples/metal/device/typescript/Pulumi.yaml deleted file mode 100644 index 607a21fe..00000000 --- a/examples/metal/device/typescript/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-device -runtime: nodejs -description: An Equinix Metal device resource -config: - projectId: - type: string diff --git a/examples/metal/device/typescript/index.ts b/examples/metal/device/typescript/index.ts deleted file mode 100644 index 3971fa8b..00000000 --- a/examples/metal/device/typescript/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const web = new equinix.metal.Device("web", { - hostname: "webserver1", - plan: "c3.small.x86", - operatingSystem: "ubuntu_20_04", - metro: "sv", - billingCycle: "hourly", - projectId: projectId, -}); -export const webPublicIp = pulumi.interpolate`http://${web.accessPublicIpv4}`; diff --git a/examples/metal/device/typescript/package.json b/examples/metal/device/typescript/package.json deleted file mode 100644 index 68cc7e5e..00000000 --- a/examples/metal/device/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-device", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/device/typescript/tsconfig.json b/examples/metal/device/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/device/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/device/yaml/Pulumi.yaml b/examples/metal/device/yaml/Pulumi.yaml deleted file mode 100644 index 50214892..00000000 --- a/examples/metal/device/yaml/Pulumi.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: equinix-metal-device -runtime: yaml -description: An Equinix Metal Device resource -config: - projectId: - type: string -resources: - web: - type: equinix:metal:Device - properties: - hostname: webserver1 - plan: c3.small.x86 - operatingSystem: ubuntu_20_04 - metro: sv - billingCycle: hourly - projectId: ${projectId} -outputs: - webPublicIp: http://${web.accessPublicIpv4} diff --git a/examples/metal/device_network_type/Pulumi.yaml b/examples/metal/device_network_type/Pulumi.yaml new file mode 100644 index 00000000..2eaeeca8 --- /dev/null +++ b/examples/metal/device_network_type/Pulumi.yaml @@ -0,0 +1,17 @@ +name: equinix-metal-device-network-type +runtime: yaml +description: An Equinix Metal Device Network Type resource +config: + deviceId: + type: string + networkType: + type: string + default: hybrid +resources: + deviceNetwork: + type: equinix:metal:DeviceNetworkType + properties: + deviceId: ${deviceId} + type: ${networkType} +outputs: + deviceNetworkId: ${deviceNetwork.id} \ No newline at end of file diff --git a/examples/metal/device_network_type/csharp/Program.cs b/examples/metal/device_network_type/csharp/Program.cs index 1903bc5d..5365727f 100644 --- a/examples/metal/device_network_type/csharp/Program.cs +++ b/examples/metal/device_network_type/csharp/Program.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; diff --git a/examples/metal/device_network_type/csharp/equinix-metal-device-network-type.csproj b/examples/metal/device_network_type/csharp/equinix-metal-device-network-type.csproj index 1565d39e..36182104 100644 --- a/examples/metal/device_network_type/csharp/equinix-metal-device-network-type.csproj +++ b/examples/metal/device_network_type/csharp/equinix-metal-device-network-type.csproj @@ -5,10 +5,9 @@ net6.0 enable - - + \ No newline at end of file diff --git a/examples/metal/device_network_type/example.md b/examples/metal/device_network_type/example.md deleted file mode 100644 index 0d22eaa6..00000000 --- a/examples/metal/device_network_type/example.md +++ /dev/null @@ -1,151 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const networkType = config.get("networkType") || "hybrid"; -const deviceNetwork = new equinix.metal.DeviceNetworkType("deviceNetwork", { - deviceId: deviceId, - type: networkType, -}); -export const deviceNetworkId = deviceNetwork.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -device_id = config.require("deviceId") -network_type = config.get("networkType") -if network_type is None: - network_type = "hybrid" -device_network = equinix.metal.DeviceNetworkType("deviceNetwork", - device_id=device_id, - type=network_type) -pulumi.export("deviceNetworkId", device_network.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - networkType := "hybrid" - if param := cfg.Get("networkType"); param != "" { - networkType = param - } - deviceNetwork, err := metal.NewDeviceNetworkType(ctx, "deviceNetwork", &metal.DeviceNetworkTypeArgs{ - DeviceId: pulumi.String(deviceId), - Type: pulumi.String(networkType), - }) - if err != nil { - return err - } - ctx.Export("deviceNetworkId", deviceNetwork.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var deviceId = config.Require("deviceId"); - var networkType = config.Get("networkType") ?? "hybrid"; - var deviceNetwork = new Equinix.Metal.DeviceNetworkType("deviceNetwork", new() - { - DeviceId = deviceId, - Type = networkType, - }); - - return new Dictionary - { - ["deviceNetworkId"] = deviceNetwork.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.DeviceNetworkType; -import com.equinix.pulumi.metal.DeviceNetworkTypeArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - final var networkType = config.get("networkType").orElse("hybrid"); - var deviceNetwork = new DeviceNetworkType("deviceNetwork", DeviceNetworkTypeArgs.builder() - .deviceId(deviceId) - .type(networkType) - .build()); - - ctx.export("deviceNetworkId", deviceNetwork.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - deviceId: - type: string - networkType: - type: string - default: hybrid -resources: - deviceNetwork: - type: equinix:metal:DeviceNetworkType - properties: - deviceId: ${deviceId} - type: ${networkType} -outputs: - deviceNetworkId: ${deviceNetwork.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/device_network_type/go/go.mod b/examples/metal/device_network_type/go/go.mod index aba4385a..a5ac95a6 100644 --- a/examples/metal/device_network_type/go/go.mod +++ b/examples/metal/device_network_type/go/go.mod @@ -1,59 +1,95 @@ module equinix-metal-device-network-type -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/cast v1.5.0 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/device_network_type/java/.gitignore b/examples/metal/device_network_type/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/device_network_type/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/device_network_type/java/pom.xml b/examples/metal/device_network_type/java/pom.xml index a96dbb69..7b25a5ad 100644 --- a/examples/metal/device_network_type/java/pom.xml +++ b/examples/metal/device_network_type/java/pom.xml @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/metal/device_network_type/java/src/main/java/generated_program/App.java b/examples/metal/device_network_type/java/src/main/java/generated_program/App.java index e62e0d89..c99b2352 100644 --- a/examples/metal/device_network_type/java/src/main/java/generated_program/App.java +++ b/examples/metal/device_network_type/java/src/main/java/generated_program/App.java @@ -2,8 +2,15 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.DeviceNetworkType; -import com.equinix.pulumi.metal.DeviceNetworkTypeArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.DeviceNetworkType; +import com.pulumi.equinix.metal.DeviceNetworkTypeArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -12,9 +19,9 @@ public static void main(String[] args) { public static void stack(Context ctx) { final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); + final var deviceId = config.get("deviceId"); final var networkType = config.get("networkType").orElse("hybrid"); - var deviceNetwork = new DeviceNetworkType("deviceNetwork", DeviceNetworkTypeArgs.builder() + var deviceNetwork = new DeviceNetworkType("deviceNetwork", DeviceNetworkTypeArgs.builder() .deviceId(deviceId) .type(networkType) .build()); diff --git a/examples/metal/device_network_type/python/requirements.txt b/examples/metal/device_network_type/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/metal/device_network_type/python/requirements.txt +++ b/examples/metal/device_network_type/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/device_network_type/typescript/package.json b/examples/metal/device_network_type/typescript/package.json index b4615ee2..26f12c66 100644 --- a/examples/metal/device_network_type/typescript/package.json +++ b/examples/metal/device_network_type/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-metal-device-network-type", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-device-network-type", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/device_network_type/typescript/tsconfig.json b/examples/metal/device_network_type/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/device_network_type/typescript/tsconfig.json +++ b/examples/metal/device_network_type/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/device_network_type/yaml/Pulumi.yaml b/examples/metal/device_network_type/yaml/Pulumi.yaml deleted file mode 100644 index 3a7eae6d..00000000 --- a/examples/metal/device_network_type/yaml/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-metal-device-network-type -runtime: yaml -description: An Equinix Metal Device Network Type resource -config: - deviceId: - type: string - networkType: - type: string - default: hybrid -resources: - deviceNetwork: - type: equinix:metal:DeviceNetworkType - properties: - deviceId: ${deviceId} - type: ${networkType} -outputs: - deviceNetworkId: ${deviceNetwork.id} diff --git a/examples/metal/gateway/csharp/Program.cs b/examples/metal/gateway/csharp/Program.cs deleted file mode 100644 index bd8b132c..00000000 --- a/examples/metal/gateway/csharp/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var vlanId = config.Require("vlanId"); - var gateway = new Equinix.Metal.Gateway("gateway", new() - { - ProjectId = projectId, - VlanId = vlanId, - PrivateIpv4SubnetSize = 8, - }); - - return new Dictionary - { - ["gatewayState"] = gateway.State, - }; -}); - diff --git a/examples/metal/gateway/csharp/Pulumi.yaml b/examples/metal/gateway/csharp/Pulumi.yaml deleted file mode 100644 index dda4b0ec..00000000 --- a/examples/metal/gateway/csharp/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-gateway -runtime: dotnet -description: An Equinix Metal Gateway resource -config: - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/gateway/csharp/equinix-metal-gateway.csproj b/examples/metal/gateway/csharp/equinix-metal-gateway.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/gateway/csharp/equinix-metal-gateway.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/gateway/example.md b/examples/metal/gateway/example.md deleted file mode 100644 index 19f65c56..00000000 --- a/examples/metal/gateway/example.md +++ /dev/null @@ -1,151 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const vlanId = config.require("vlanId"); -const gateway = new equinix.metal.Gateway("gateway", { - projectId: projectId, - vlanId: vlanId, - privateIpv4SubnetSize: 8, -}); -export const gatewayState = gateway.state; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -vlan_id = config.require("vlanId") -gateway = equinix.metal.Gateway("gateway", - project_id=project_id, - vlan_id=vlan_id, - private_ipv4_subnet_size=8) -pulumi.export("gatewayState", gateway.state) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - vlanId := cfg.Require("vlanId") - gateway, err := metal.NewGateway(ctx, "gateway", &metal.GatewayArgs{ - ProjectId: pulumi.String(projectId), - VlanId: pulumi.String(vlanId), - PrivateIpv4SubnetSize: pulumi.Int(8), - }) - if err != nil { - return err - } - ctx.Export("gatewayState", gateway.State) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var vlanId = config.Require("vlanId"); - var gateway = new Equinix.Metal.Gateway("gateway", new() - { - ProjectId = projectId, - VlanId = vlanId, - PrivateIpv4SubnetSize = 8, - }); - - return new Dictionary - { - ["gatewayState"] = gateway.State, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Gateway; -import com.equinix.pulumi.metal.GatewayArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var vlanId = config.get("vlanId").get(); - var gateway = new Gateway("gateway", GatewayArgs.builder() - .projectId(projectId) - .vlanId(vlanId) - .privateIpv4SubnetSize(8) - .build()); - - ctx.export("gatewayState", gateway.state()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - vlanId: - type: string -resources: - gateway: - type: equinix:metal:Gateway - properties: - projectId: ${projectId} - vlanId: ${vlanId} - privateIpv4SubnetSize: 8 -outputs: - gatewayState: ${gateway.state} -``` - -{{% /choosable %}} diff --git a/examples/metal/gateway/example_1/Pulumi.yaml b/examples/metal/gateway/example_1/Pulumi.yaml new file mode 100644 index 00000000..ac51f569 --- /dev/null +++ b/examples/metal/gateway/example_1/Pulumi.yaml @@ -0,0 +1,17 @@ +name: equinix-metal-gateway-example_1 +runtime: yaml +resources: + # Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses + test: + type: equinix:metal:Vlan + properties: + description: test VLAN in SV + metro: sv + projectId: ${projectId} + testGateway: + type: equinix:metal:Gateway + name: test + properties: + projectId: ${projectId} + vlanId: ${test.id} + privateIpv4SubnetSize: 8 diff --git a/examples/metal/gateway/example_1/csharp/.gitignore b/examples/metal/gateway/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/gateway/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/gateway/example_1/csharp/Program.cs b/examples/metal/gateway/example_1/csharp/Program.cs new file mode 100644 index 00000000..6ff5099c --- /dev/null +++ b/examples/metal/gateway/example_1/csharp/Program.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var test = new Equinix.Metal.Vlan("test", new() + { + Description = "test VLAN in SV", + Metro = "sv", + ProjectId = projectId, + }); + + var testGateway = new Equinix.Metal.Gateway("testGateway", new() + { + ProjectId = projectId, + VlanId = test.Id, + PrivateIpv4SubnetSize = 8, + }); + +}); + diff --git a/examples/metal/gateway/example_1/csharp/Pulumi.yaml b/examples/metal/gateway/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..f122f988 --- /dev/null +++ b/examples/metal/gateway/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_1 +runtime: dotnet diff --git a/examples/metal/gateway/example_1/csharp/equinix-metal-gateway-example_1.csproj b/examples/metal/gateway/example_1/csharp/equinix-metal-gateway-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/gateway/example_1/csharp/equinix-metal-gateway-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/gateway/example_1/go/Pulumi.yaml b/examples/metal/gateway/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..20df0678 --- /dev/null +++ b/examples/metal/gateway/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_1 +runtime: go diff --git a/examples/metal/gateway/example_1/go/go.mod b/examples/metal/gateway/example_1/go/go.mod new file mode 100644 index 00000000..1cf34bd6 --- /dev/null +++ b/examples/metal/gateway/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-gateway-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/gateway/example_1/go/main.go b/examples/metal/gateway/example_1/go/main.go new file mode 100644 index 00000000..a7e27f20 --- /dev/null +++ b/examples/metal/gateway/example_1/go/main.go @@ -0,0 +1,28 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ + Description: pulumi.String("test VLAN in SV"), + Metro: pulumi.String("sv"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + _, err = metal.NewGateway(ctx, "testGateway", &metal.GatewayArgs{ + ProjectId: pulumi.Any(projectId), + VlanId: test.ID(), + PrivateIpv4SubnetSize: pulumi.Int(8), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/gateway/example_1/java/Pulumi.yaml b/examples/metal/gateway/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..56f1e09a --- /dev/null +++ b/examples/metal/gateway/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_1 +runtime: java diff --git a/examples/metal/gateway/example_1/java/pom.xml b/examples/metal/gateway/example_1/java/pom.xml new file mode 100644 index 00000000..0285d0df --- /dev/null +++ b/examples/metal/gateway/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-gateway-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/gateway/example_1/java/src/main/java/generated_program/App.java b/examples/metal/gateway/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..0c146fa5 --- /dev/null +++ b/examples/metal/gateway/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,36 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.Gateway; +import com.pulumi.equinix.metal.GatewayArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var test = new Vlan("test", VlanArgs.builder() + .description("test VLAN in SV") + .metro("sv") + .projectId(projectId) + .build()); + + var testGateway = new Gateway("testGateway", GatewayArgs.builder() + .projectId(projectId) + .vlanId(test.id()) + .privateIpv4SubnetSize(8) + .build()); + + } +} diff --git a/examples/metal/gateway/example_1/python/.gitignore b/examples/metal/gateway/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/gateway/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/gateway/example_1/python/Pulumi.yaml b/examples/metal/gateway/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..9a1dfb7a --- /dev/null +++ b/examples/metal/gateway/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_1 +runtime: python diff --git a/examples/metal/gateway/example_1/python/__main__.py b/examples/metal/gateway/example_1/python/__main__.py new file mode 100644 index 00000000..bc145ea5 --- /dev/null +++ b/examples/metal/gateway/example_1/python/__main__.py @@ -0,0 +1,11 @@ +import pulumi +import pulumi_equinix as equinix + +test = equinix.metal.Vlan("test", + description="test VLAN in SV", + metro="sv", + project_id=project_id) +test_gateway = equinix.metal.Gateway("testGateway", + project_id=project_id, + vlan_id=test.id, + private_ipv4_subnet_size=8) diff --git a/examples/metal/gateway/example_1/python/requirements.txt b/examples/metal/gateway/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/gateway/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/gateway/example_1/typescript/.gitignore b/examples/metal/gateway/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/gateway/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/gateway/example_1/typescript/Pulumi.yaml b/examples/metal/gateway/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..33173e6d --- /dev/null +++ b/examples/metal/gateway/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_1 +runtime: nodejs diff --git a/examples/metal/gateway/example_1/typescript/index.ts b/examples/metal/gateway/example_1/typescript/index.ts new file mode 100644 index 00000000..e899e47f --- /dev/null +++ b/examples/metal/gateway/example_1/typescript/index.ts @@ -0,0 +1,13 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const test = new equinix.metal.Vlan("test", { + description: "test VLAN in SV", + metro: "sv", + projectId: projectId, +}); +const testGateway = new equinix.metal.Gateway("testGateway", { + projectId: projectId, + vlanId: test.id, + privateIpv4SubnetSize: 8, +}); diff --git a/examples/metal/gateway/example_1/typescript/package.json b/examples/metal/gateway/example_1/typescript/package.json new file mode 100644 index 00000000..e2e2cf00 --- /dev/null +++ b/examples/metal/gateway/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-gateway-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/gateway/example_1/typescript/tsconfig.json b/examples/metal/gateway/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/gateway/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/gateway/example_2/Pulumi.yaml b/examples/metal/gateway/example_2/Pulumi.yaml new file mode 100644 index 00000000..471c4aea --- /dev/null +++ b/examples/metal/gateway/example_2/Pulumi.yaml @@ -0,0 +1,23 @@ +name: equinix-metal-gateway-example_2 +runtime: yaml +resources: + # Create Metal Gateway for a VLAN and reserved IP address block + test: + type: equinix:metal:Vlan + properties: + description: test VLAN in SV + metro: sv + projectId: ${projectId} + test1: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: sv + quantity: 8 + testGateway: + type: equinix:metal:Gateway + name: test + properties: + projectId: ${projectId} + vlanId: ${test.id} + ipReservationId: ${testEquinixMetalReservedIpBlock.id} diff --git a/examples/metal/gateway/example_2/csharp/.gitignore b/examples/metal/gateway/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/gateway/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/gateway/example_2/csharp/Program.cs b/examples/metal/gateway/example_2/csharp/Program.cs new file mode 100644 index 00000000..c2cdd9e7 --- /dev/null +++ b/examples/metal/gateway/example_2/csharp/Program.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var test = new Equinix.Metal.Vlan("test", new() + { + Description = "test VLAN in SV", + Metro = "sv", + ProjectId = projectId, + }); + + var test1 = new Equinix.Metal.ReservedIpBlock("test1", new() + { + ProjectId = projectId, + Metro = "sv", + Quantity = 8, + }); + + var testGateway = new Equinix.Metal.Gateway("testGateway", new() + { + ProjectId = projectId, + VlanId = test.Id, + IpReservationId = testEquinixMetalReservedIpBlock.Id, + }); + +}); + diff --git a/examples/metal/gateway/example_2/csharp/Pulumi.yaml b/examples/metal/gateway/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..5bd59705 --- /dev/null +++ b/examples/metal/gateway/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_2 +runtime: dotnet diff --git a/examples/metal/gateway/example_2/csharp/equinix-metal-gateway-example_2.csproj b/examples/metal/gateway/example_2/csharp/equinix-metal-gateway-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/gateway/example_2/csharp/equinix-metal-gateway-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/gateway/example_2/go/Pulumi.yaml b/examples/metal/gateway/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..9289d45c --- /dev/null +++ b/examples/metal/gateway/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_2 +runtime: go diff --git a/examples/metal/gateway/example_2/go/go.mod b/examples/metal/gateway/example_2/go/go.mod new file mode 100644 index 00000000..4fe3f2ea --- /dev/null +++ b/examples/metal/gateway/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-gateway-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/gateway/example_2/go/main.go b/examples/metal/gateway/example_2/go/main.go new file mode 100644 index 00000000..93492c6c --- /dev/null +++ b/examples/metal/gateway/example_2/go/main.go @@ -0,0 +1,36 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ + Description: pulumi.String("test VLAN in SV"), + Metro: pulumi.String("sv"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + _, err = metal.NewReservedIpBlock(ctx, "test1", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(8), + }) + if err != nil { + return err + } + _, err = metal.NewGateway(ctx, "testGateway", &metal.GatewayArgs{ + ProjectId: pulumi.Any(projectId), + VlanId: test.ID(), + IpReservationId: pulumi.Any(testEquinixMetalReservedIpBlock.Id), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/gateway/example_2/java/Pulumi.yaml b/examples/metal/gateway/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..eae0da0d --- /dev/null +++ b/examples/metal/gateway/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_2 +runtime: java diff --git a/examples/metal/gateway/example_2/java/pom.xml b/examples/metal/gateway/example_2/java/pom.xml new file mode 100644 index 00000000..7361da23 --- /dev/null +++ b/examples/metal/gateway/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-gateway-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/gateway/example_2/java/src/main/java/generated_program/App.java b/examples/metal/gateway/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..a1166a5d --- /dev/null +++ b/examples/metal/gateway/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,44 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Gateway; +import com.pulumi.equinix.metal.GatewayArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var test = new Vlan("test", VlanArgs.builder() + .description("test VLAN in SV") + .metro("sv") + .projectId(projectId) + .build()); + + var test1 = new ReservedIpBlock("test1", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("sv") + .quantity(8) + .build()); + + var testGateway = new Gateway("testGateway", GatewayArgs.builder() + .projectId(projectId) + .vlanId(test.id()) + .ipReservationId(testEquinixMetalReservedIpBlock.id()) + .build()); + + } +} diff --git a/examples/metal/gateway/example_2/python/.gitignore b/examples/metal/gateway/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/gateway/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/gateway/example_2/python/Pulumi.yaml b/examples/metal/gateway/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..d54fe164 --- /dev/null +++ b/examples/metal/gateway/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_2 +runtime: python diff --git a/examples/metal/gateway/example_2/python/__main__.py b/examples/metal/gateway/example_2/python/__main__.py new file mode 100644 index 00000000..a69963d9 --- /dev/null +++ b/examples/metal/gateway/example_2/python/__main__.py @@ -0,0 +1,15 @@ +import pulumi +import pulumi_equinix as equinix + +test = equinix.metal.Vlan("test", + description="test VLAN in SV", + metro="sv", + project_id=project_id) +test1 = equinix.metal.ReservedIpBlock("test1", + project_id=project_id, + metro="sv", + quantity=8) +test_gateway = equinix.metal.Gateway("testGateway", + project_id=project_id, + vlan_id=test.id, + ip_reservation_id=test_equinix_metal_reserved_ip_block["id"]) diff --git a/examples/metal/gateway/example_2/python/requirements.txt b/examples/metal/gateway/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/gateway/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/gateway/example_2/typescript/.gitignore b/examples/metal/gateway/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/gateway/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/gateway/example_2/typescript/Pulumi.yaml b/examples/metal/gateway/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..e782d931 --- /dev/null +++ b/examples/metal/gateway/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-gateway-example_2 +runtime: nodejs diff --git a/examples/metal/gateway/example_2/typescript/index.ts b/examples/metal/gateway/example_2/typescript/index.ts new file mode 100644 index 00000000..df34a532 --- /dev/null +++ b/examples/metal/gateway/example_2/typescript/index.ts @@ -0,0 +1,18 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const test = new equinix.metal.Vlan("test", { + description: "test VLAN in SV", + metro: "sv", + projectId: projectId, +}); +const test1 = new equinix.metal.ReservedIpBlock("test1", { + projectId: projectId, + metro: "sv", + quantity: 8, +}); +const testGateway = new equinix.metal.Gateway("testGateway", { + projectId: projectId, + vlanId: test.id, + ipReservationId: testEquinixMetalReservedIpBlock.id, +}); diff --git a/examples/metal/gateway/example_2/typescript/package.json b/examples/metal/gateway/example_2/typescript/package.json new file mode 100644 index 00000000..c528e894 --- /dev/null +++ b/examples/metal/gateway/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-gateway-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/gateway/example_2/typescript/tsconfig.json b/examples/metal/gateway/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/gateway/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/gateway/go/Pulumi.yaml b/examples/metal/gateway/go/Pulumi.yaml deleted file mode 100644 index 491ce0be..00000000 --- a/examples/metal/gateway/go/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-gateway -runtime: go -description: An Equinix Metal Gateway resource -config: - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/gateway/go/go.mod b/examples/metal/gateway/go/go.mod deleted file mode 100644 index eac0dd03..00000000 --- a/examples/metal/gateway/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-gateway - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/gateway/go/main.go b/examples/metal/gateway/go/main.go deleted file mode 100644 index e29f3b92..00000000 --- a/examples/metal/gateway/go/main.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - vlanId := cfg.Require("vlanId") - gateway, err := metal.NewGateway(ctx, "gateway", &metal.GatewayArgs{ - ProjectId: pulumi.String(projectId), - VlanId: pulumi.String(vlanId), - PrivateIpv4SubnetSize: pulumi.Int(8), - }) - if err != nil { - return err - } - ctx.Export("gatewayState", gateway.State) - return nil - }) -} diff --git a/examples/metal/gateway/java/.gitignore b/examples/metal/gateway/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/gateway/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/gateway/java/Pulumi.yaml b/examples/metal/gateway/java/Pulumi.yaml deleted file mode 100644 index 404ce0d1..00000000 --- a/examples/metal/gateway/java/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-gateway -runtime: java -description: An Equinix Metal Gateway resource -config: - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/gateway/java/pom.xml b/examples/metal/gateway/java/pom.xml deleted file mode 100644 index 2ab322b4..00000000 --- a/examples/metal/gateway/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-gateway - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/gateway/java/src/main/java/generated_program/App.java b/examples/metal/gateway/java/src/main/java/generated_program/App.java deleted file mode 100644 index 44e41104..00000000 --- a/examples/metal/gateway/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,25 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Gateway; -import com.equinix.pulumi.metal.GatewayArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var vlanId = config.get("vlanId").get(); - var gateway = new Gateway("gateway", GatewayArgs.builder() - .projectId(projectId) - .vlanId(vlanId) - .privateIpv4SubnetSize(8) - .build()); - - ctx.export("gatewayState", gateway.state()); - } -} diff --git a/examples/metal/gateway/python/Pulumi.yaml b/examples/metal/gateway/python/Pulumi.yaml deleted file mode 100644 index f5b4a9ce..00000000 --- a/examples/metal/gateway/python/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-gateway -runtime: python -description: An Equinix Metal Gateway resource -config: - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/gateway/python/__main__.py b/examples/metal/gateway/python/__main__.py deleted file mode 100644 index 45d1124a..00000000 --- a/examples/metal/gateway/python/__main__.py +++ /dev/null @@ -1,11 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -vlan_id = config.require("vlanId") -gateway = equinix.metal.Gateway("gateway", - project_id=project_id, - vlan_id=vlan_id, - private_ipv4_subnet_size=8) -pulumi.export("gatewayState", gateway.state) diff --git a/examples/metal/gateway/python/requirements.txt b/examples/metal/gateway/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/gateway/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/gateway/typescript/Pulumi.yaml b/examples/metal/gateway/typescript/Pulumi.yaml deleted file mode 100644 index dd1239a9..00000000 --- a/examples/metal/gateway/typescript/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-gateway -runtime: nodejs -description: An Equinix Metal Gateway resource -config: - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/gateway/typescript/index.ts b/examples/metal/gateway/typescript/index.ts deleted file mode 100644 index 8f61a94a..00000000 --- a/examples/metal/gateway/typescript/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const vlanId = config.require("vlanId"); -const gateway = new equinix.metal.Gateway("gateway", { - projectId: projectId, - vlanId: vlanId, - privateIpv4SubnetSize: 8, -}); -export const gatewayState = gateway.state; diff --git a/examples/metal/gateway/typescript/package.json b/examples/metal/gateway/typescript/package.json deleted file mode 100644 index 4ecbacff..00000000 --- a/examples/metal/gateway/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-gateway", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/gateway/typescript/tsconfig.json b/examples/metal/gateway/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/gateway/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/gateway/yaml/Pulumi.yaml b/examples/metal/gateway/yaml/Pulumi.yaml deleted file mode 100644 index 5ebba15b..00000000 --- a/examples/metal/gateway/yaml/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-metal-gateway -runtime: yaml -description: An Equinix Metal Gateway resource -config: - projectId: - type: string - vlanId: - type: string -resources: - gateway: - type: equinix:metal:Gateway - properties: - projectId: ${projectId} - vlanId: ${vlanId} - privateIpv4SubnetSize: 8 -outputs: - gatewayState: ${gateway.state} diff --git a/examples/metal/ip_attachment/Pulumi.yaml b/examples/metal/ip_attachment/Pulumi.yaml new file mode 100644 index 00000000..e4265ad7 --- /dev/null +++ b/examples/metal/ip_attachment/Pulumi.yaml @@ -0,0 +1,30 @@ +name: equinix-metal-ip_attachment +runtime: yaml +resources: + # Reserve /30 block of max 2 public IPv4 addresses in metro ny for myproject + myblock: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: ny + quantity: 2 + # Assign /32 subnet (single address) from reserved block to a device + firstAddressAssignment: + type: equinix:metal:IpAttachment + name: first_address_assignment + properties: + deviceId: ${mydevice.id} + cidrNotation: + fn::invoke: + Function: std:join + Arguments: + separator: / + input: + - fn::invoke: + Function: std:cidrhost + Arguments: + input: ${myblockMetalReservedIpBlock.cidrNotation} + host: 0 + Return: result + - '32' + Return: result diff --git a/examples/metal/ip_attachment/csharp/Program.cs b/examples/metal/ip_attachment/csharp/Program.cs index 99a3e206..71d7421b 100644 --- a/examples/metal/ip_attachment/csharp/Program.cs +++ b/examples/metal/ip_attachment/csharp/Program.cs @@ -1,22 +1,35 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; return await Deployment.RunAsync(() => { - var config = new Config(); - var deviceId = config.Require("deviceId"); - var subnetCidr = config.Get("subnetCidr") ?? "147.229.10.152/31"; - var ipAttachResource = new Equinix.Metal.IpAttachment("ipAttach", new() + var myblock = new Equinix.Metal.ReservedIpBlock("myblock", new() { - DeviceId = deviceId, - CidrNotation = subnetCidr, + ProjectId = projectId, + Metro = "ny", + Quantity = 2, }); - return new Dictionary + var firstAddressAssignment = new Equinix.Metal.IpAttachment("firstAddressAssignment", new() { - ["ipAttach"] = ipAttachResource.Id, - ["ipNetmask"] = ipAttachResource.Netmask, - }; + DeviceId = mydevice.Id, + CidrNotation = Std.Cidrhost.Invoke(new() + { + Input = myblockMetalReservedIpBlock.CidrNotation, + Host = 0, + }).Apply(invoke => Std.Join.Invoke(new() + { + Separator = "/", + Input = new[] + { + invoke.Result, + "32", + }, + })).Apply(invoke => invoke.Result), + }); + }); diff --git a/examples/metal/ip_attachment/csharp/Pulumi.yaml b/examples/metal/ip_attachment/csharp/Pulumi.yaml index 4da8b7a4..81c85206 100644 --- a/examples/metal/ip_attachment/csharp/Pulumi.yaml +++ b/examples/metal/ip_attachment/csharp/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-ip-attachment +name: equinix-metal-ip_attachment runtime: dotnet -description: An Equinix Metal Ip Attachment resource to attach elastic IP subnets to devices -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 diff --git a/examples/metal/ip_attachment/csharp/equinix-metal-ip-attachment.csproj b/examples/metal/ip_attachment/csharp/equinix-metal-ip-attachment.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/ip_attachment/csharp/equinix-metal-ip-attachment.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/ip_attachment/csharp/equinix-metal-ip_attachment.csproj b/examples/metal/ip_attachment/csharp/equinix-metal-ip_attachment.csproj new file mode 100644 index 00000000..ef1958d7 --- /dev/null +++ b/examples/metal/ip_attachment/csharp/equinix-metal-ip_attachment.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + + + + + + + + \ No newline at end of file diff --git a/examples/metal/ip_attachment/example.md b/examples/metal/ip_attachment/example.md deleted file mode 100644 index 7e28fb4c..00000000 --- a/examples/metal/ip_attachment/example.md +++ /dev/null @@ -1,157 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const subnetCidr = config.get("subnetCidr") || "147.229.10.152/31"; -const ipAttachResource = new equinix.metal.IpAttachment("ipAttach", { - deviceId: deviceId, - cidrNotation: subnetCidr, -}); -export const ipAttach = ipAttachResource.id; -export const ipNetmask = ipAttachResource.netmask; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -device_id = config.require("deviceId") -subnet_cidr = config.get("subnetCidr") -if subnet_cidr is None: - subnet_cidr = "147.229.10.152/31" -ip_attach_resource = equinix.metal.IpAttachment("ipAttach", - device_id=device_id, - cidr_notation=subnet_cidr) -pulumi.export("ipAttach", ip_attach_resource.id) -pulumi.export("ipNetmask", ip_attach_resource.netmask) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - subnetCidr := "147.229.10.152/31" - if param := cfg.Get("subnetCidr"); param != "" { - subnetCidr = param - } - ipAttachResource, err := metal.NewIpAttachment(ctx, "ipAttach", &metal.IpAttachmentArgs{ - DeviceId: pulumi.String(deviceId), - CidrNotation: pulumi.String(subnetCidr), - }) - if err != nil { - return err - } - ctx.Export("ipAttach", ipAttachResource.ID()) - ctx.Export("ipNetmask", ipAttachResource.Netmask) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var deviceId = config.Require("deviceId"); - var subnetCidr = config.Get("subnetCidr") ?? "147.229.10.152/31"; - var ipAttachResource = new Equinix.Metal.IpAttachment("ipAttach", new() - { - DeviceId = deviceId, - CidrNotation = subnetCidr, - }); - - return new Dictionary - { - ["ipAttach"] = ipAttachResource.Id, - ["ipNetmask"] = ipAttachResource.Netmask, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.IpAttachment; -import com.equinix.pulumi.metal.IpAttachmentArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - final var subnetCidr = config.get("subnetCidr").orElse("147.229.10.152/31"); - var ipAttachResource = new IpAttachment("ipAttachResource", IpAttachmentArgs.builder() - .deviceId(deviceId) - .cidrNotation(subnetCidr) - .build()); - - ctx.export("ipAttach", ipAttachResource.id()); - ctx.export("ipNetmask", ipAttachResource.netmask()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 -resources: - ipAttach: - type: equinix:metal:IpAttachment - properties: - deviceId: ${deviceId} - cidrNotation: ${subnetCidr} -outputs: - ipAttach: ${ipAttach.id} - ipNetmask: ${ipAttach.netmask} -``` - -{{% /choosable %}} diff --git a/examples/metal/ip_attachment/go/Pulumi.yaml b/examples/metal/ip_attachment/go/Pulumi.yaml index 6c45785e..45e0df2a 100644 --- a/examples/metal/ip_attachment/go/Pulumi.yaml +++ b/examples/metal/ip_attachment/go/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-ip-attachment +name: equinix-metal-ip_attachment runtime: go -description: An Equinix Metal Ip Attachment resource to attach elastic IP subnets to devices -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 diff --git a/examples/metal/ip_attachment/go/go.mod b/examples/metal/ip_attachment/go/go.mod index f1939f2a..de6dea9e 100644 --- a/examples/metal/ip_attachment/go/go.mod +++ b/examples/metal/ip_attachment/go/go.mod @@ -1,59 +1,95 @@ -module equinix-metal-ip-attachment +module equinix-metal-ip_attachment -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi-std/sdk v1.7.2 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/ip_attachment/go/main.go b/examples/metal/ip_attachment/go/main.go index fae13b68..c3976dc0 100644 --- a/examples/metal/ip_attachment/go/main.go +++ b/examples/metal/ip_attachment/go/main.go @@ -2,27 +2,43 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi-std/sdk/go/std" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) - func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - subnetCidr := "147.229.10.152/31" - if param := cfg.Get("subnetCidr"); param != "" { - subnetCidr = param - } - ipAttachResource, err := metal.NewIpAttachment(ctx, "ipAttach", &metal.IpAttachmentArgs{ - DeviceId: pulumi.String(deviceId), - CidrNotation: pulumi.String(subnetCidr), - }) - if err != nil { - return err - } - ctx.Export("ipAttach", ipAttachResource.ID()) - ctx.Export("ipNetmask", ipAttachResource.Netmask) - return nil - }) +pulumi.Run(func(ctx *pulumi.Context) error { +_, err := metal.NewReservedIpBlock(ctx, "myblock", &metal.ReservedIpBlockArgs{ +ProjectId: pulumi.Any(projectId), +Metro: pulumi.String("ny"), +Quantity: pulumi.Int(2), +}) +if err != nil { +return err +} +invokeJoin, err := std.Join(ctx, invokeCidrhost1, err := std.Cidrhost(ctx, &std.CidrhostArgs{ +Input: myblockMetalReservedIpBlock.CidrNotation, +Host: 0, +}, nil) +if err != nil { +return err +} +&std.JoinArgs{ +Separator: "/", +Input: []*string{ +invokeCidrhost1.Result, +"32", +}, +}, nil) +if err != nil { +return err +} +_, err = metal.NewIpAttachment(ctx, "firstAddressAssignment", &metal.IpAttachmentArgs{ +DeviceId: pulumi.Any(mydevice.Id), +CidrNotation: invokeJoin.Result, +}) +if err != nil { +return err +} +return nil +}) } diff --git a/examples/metal/ip_attachment/java/.gitignore b/examples/metal/ip_attachment/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/ip_attachment/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/ip_attachment/java/Pulumi.yaml b/examples/metal/ip_attachment/java/Pulumi.yaml index ccfa1f80..caa3f7c0 100644 --- a/examples/metal/ip_attachment/java/Pulumi.yaml +++ b/examples/metal/ip_attachment/java/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-ip-attachment +name: equinix-metal-ip_attachment runtime: java -description: An Equinix Metal Ip Attachment resource to attach elastic IP subnets to devices -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 diff --git a/examples/metal/ip_attachment/java/pom.xml b/examples/metal/ip_attachment/java/pom.xml index a70c51ea..3e937657 100644 --- a/examples/metal/ip_attachment/java/pom.xml +++ b/examples/metal/ip_attachment/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-ip-attachment + equinix-metal-ip_attachment 1.0-SNAPSHOT @@ -18,16 +18,20 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + + com.pulumi + std + 1.7.2 + diff --git a/examples/metal/ip_attachment/java/src/main/java/generated_program/App.java b/examples/metal/ip_attachment/java/src/main/java/generated_program/App.java index 03a12129..53f4b7de 100644 --- a/examples/metal/ip_attachment/java/src/main/java/generated_program/App.java +++ b/examples/metal/ip_attachment/java/src/main/java/generated_program/App.java @@ -2,8 +2,17 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.IpAttachment; -import com.equinix.pulumi.metal.IpAttachmentArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.IpAttachment; +import com.pulumi.equinix.metal.IpAttachmentArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -11,15 +20,24 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - final var subnetCidr = config.get("subnetCidr").orElse("147.229.10.152/31"); - var ipAttachResource = new IpAttachment("ipAttachResource", IpAttachmentArgs.builder() - .deviceId(deviceId) - .cidrNotation(subnetCidr) + var myblock = new ReservedIpBlock("myblock", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("ny") + .quantity(2) + .build()); + + var firstAddressAssignment = new IpAttachment("firstAddressAssignment", IpAttachmentArgs.builder() + .deviceId(mydevice.id()) + .cidrNotation(StdFunctions.join(JoinArgs.builder() + .separator("/") + .input( + StdFunctions.cidrhost(CidrhostArgs.builder() + .input(myblockMetalReservedIpBlock.cidrNotation()) + .host(0) + .build()).result(), + "32") + .build()).result()) .build()); - ctx.export("ipAttach", ipAttachResource.id()); - ctx.export("ipNetmask", ipAttachResource.netmask()); } } diff --git a/examples/metal/ip_attachment/python/Pulumi.yaml b/examples/metal/ip_attachment/python/Pulumi.yaml index f7fe40ed..9a6fd69e 100644 --- a/examples/metal/ip_attachment/python/Pulumi.yaml +++ b/examples/metal/ip_attachment/python/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-ip-attachment +name: equinix-metal-ip_attachment runtime: python -description: An Equinix Metal Ip Attachment resource to attach elastic IP subnets to devices -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 diff --git a/examples/metal/ip_attachment/python/__main__.py b/examples/metal/ip_attachment/python/__main__.py index f2664332..3bc5ebe4 100644 --- a/examples/metal/ip_attachment/python/__main__.py +++ b/examples/metal/ip_attachment/python/__main__.py @@ -1,13 +1,16 @@ import pulumi import pulumi_equinix as equinix +import pulumi_std as std -config = pulumi.Config() -device_id = config.require("deviceId") -subnet_cidr = config.get("subnetCidr") -if subnet_cidr is None: - subnet_cidr = "147.229.10.152/31" -ip_attach_resource = equinix.metal.IpAttachment("ipAttach", - device_id=device_id, - cidr_notation=subnet_cidr) -pulumi.export("ipAttach", ip_attach_resource.id) -pulumi.export("ipNetmask", ip_attach_resource.netmask) +myblock = equinix.metal.ReservedIpBlock("myblock", + project_id=project_id, + metro="ny", + quantity=2) +first_address_assignment = equinix.metal.IpAttachment("firstAddressAssignment", + device_id=mydevice["id"], + cidr_notation=std.join_output(separator="/", + input=[ + std.cidrhost_output(input=myblock_metal_reserved_ip_block["cidrNotation"], + host=0).apply(lambda invoke: invoke.result), + "32", + ]).apply(lambda invoke: invoke.result)) diff --git a/examples/metal/ip_attachment/python/requirements.txt b/examples/metal/ip_attachment/python/requirements.txt index 805364e7..da9f8ddc 100644 --- a/examples/metal/ip_attachment/python/requirements.txt +++ b/examples/metal/ip_attachment/python/requirements.txt @@ -1,2 +1,3 @@ +pulumi-std==1.7.2 pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/ip_attachment/typescript/Pulumi.yaml b/examples/metal/ip_attachment/typescript/Pulumi.yaml index c442ec32..f050fb3e 100644 --- a/examples/metal/ip_attachment/typescript/Pulumi.yaml +++ b/examples/metal/ip_attachment/typescript/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-ip-attachment +name: equinix-metal-ip_attachment runtime: nodejs -description: An Equinix Metal Ip Attachment resource to attach elastic IP subnets to devices -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 diff --git a/examples/metal/ip_attachment/typescript/index.ts b/examples/metal/ip_attachment/typescript/index.ts index a9875ba4..d3280f9e 100644 --- a/examples/metal/ip_attachment/typescript/index.ts +++ b/examples/metal/ip_attachment/typescript/index.ts @@ -1,12 +1,22 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as std from "@pulumi/std"; -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const subnetCidr = config.get("subnetCidr") || "147.229.10.152/31"; -const ipAttachResource = new equinix.metal.IpAttachment("ipAttach", { - deviceId: deviceId, - cidrNotation: subnetCidr, +const myblock = new equinix.metal.ReservedIpBlock("myblock", { + projectId: projectId, + metro: "ny", + quantity: 2, +}); +const firstAddressAssignment = new equinix.metal.IpAttachment("firstAddressAssignment", { + deviceId: mydevice.id, + cidrNotation: std.joinOutput({ + separator: "/", + input: [ + std.cidrhostOutput({ + input: myblockMetalReservedIpBlock.cidrNotation, + host: 0, + }).apply(invoke => invoke.result), + "32", + ], + }).apply(invoke => invoke.result), }); -export const ipAttach = ipAttachResource.id; -export const ipNetmask = ipAttachResource.netmask; diff --git a/examples/metal/ip_attachment/typescript/package.json b/examples/metal/ip_attachment/typescript/package.json index f1936712..37fffff1 100644 --- a/examples/metal/ip_attachment/typescript/package.json +++ b/examples/metal/ip_attachment/typescript/package.json @@ -1,11 +1,12 @@ { - "name": "equinix-metal-ip-attachment", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-ip_attachment", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0", + "@pulumi/std": "1.7.2" + } } \ No newline at end of file diff --git a/examples/metal/ip_attachment/typescript/tsconfig.json b/examples/metal/ip_attachment/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/ip_attachment/typescript/tsconfig.json +++ b/examples/metal/ip_attachment/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/ip_attachment/yaml/Pulumi.yaml b/examples/metal/ip_attachment/yaml/Pulumi.yaml deleted file mode 100644 index 24d059c1..00000000 --- a/examples/metal/ip_attachment/yaml/Pulumi.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: equinix-metal-ip-attachment -runtime: yaml -description: An Equinix Metal Ip Attachment resource to attach elastic IP subnets to devices -config: - deviceId: - type: string - subnetCidr: - type: string - default: 147.229.10.152/31 -resources: - ipAttach: - type: equinix:metal:IpAttachment - properties: - deviceId: ${deviceId} - cidrNotation: ${subnetCidr} -outputs: - ipAttach: ${ipAttach.id} - ipNetmask: ${ipAttach.netmask} diff --git a/examples/metal/organization/Pulumi.yaml b/examples/metal/organization/Pulumi.yaml new file mode 100644 index 00000000..1b362f11 --- /dev/null +++ b/examples/metal/organization/Pulumi.yaml @@ -0,0 +1,10 @@ +name: equinix-metal-organization +runtime: yaml +resources: + # Create a new Organization + tfOrganization1: + type: equinix:metal:Organization + name: tf_organization_1 + properties: + name: foobar + description: quux diff --git a/examples/metal/organization/csharp/Program.cs b/examples/metal/organization/csharp/Program.cs index 435ab507..1938630b 100644 --- a/examples/metal/organization/csharp/Program.cs +++ b/examples/metal/organization/csharp/Program.cs @@ -1,25 +1,15 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var orgResource = new Equinix.Metal.Organization("org", new() + var tfOrganization1 = new Equinix.Metal.Organization("tfOrganization1", new() { - Name = "Foo Organization", - Address = new Equinix.Metal.Inputs.OrganizationAddressArgs - { - Address = "org street", - City = "london", - Country = "GB", - ZipCode = "12345", - }, - Description = "An organization", + Name = "foobar", + Description = "quux", }); - return new Dictionary - { - ["org"] = orgResource.Id, - }; }); diff --git a/examples/metal/organization/csharp/Pulumi.yaml b/examples/metal/organization/csharp/Pulumi.yaml index ed7216e2..f4b41b51 100644 --- a/examples/metal/organization/csharp/Pulumi.yaml +++ b/examples/metal/organization/csharp/Pulumi.yaml @@ -1,3 +1,2 @@ name: equinix-metal-organization runtime: dotnet -description: An Equinix Metal Organization resource diff --git a/examples/metal/organization/csharp/equinix-metal-organization.csproj b/examples/metal/organization/csharp/equinix-metal-organization.csproj index 3a2fd255..36182104 100644 --- a/examples/metal/organization/csharp/equinix-metal-organization.csproj +++ b/examples/metal/organization/csharp/equinix-metal-organization.csproj @@ -5,10 +5,9 @@ net6.0 enable - - + \ No newline at end of file diff --git a/examples/metal/organization/example.md b/examples/metal/organization/example.md deleted file mode 100644 index ae785826..00000000 --- a/examples/metal/organization/example.md +++ /dev/null @@ -1,168 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const orgResource = new equinix.metal.Organization("org", { - name: "Foo Organization", - address: { - address: "org street", - city: "london", - country: "GB", - zipCode: "12345", - }, - description: "An organization", -}); -export const org = orgResource.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -org_resource = equinix.metal.Organization("org", - name="Foo Organization", - address=equinix.metal.OrganizationAddressArgs( - address="org street", - city="london", - country="GB", - zip_code="12345", - ), - description="An organization") -pulumi.export("org", org_resource.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - orgResource, err := metal.NewOrganization(ctx, "org", &metal.OrganizationArgs{ - Name: pulumi.String("Foo Organization"), - Address: &metal.OrganizationAddressArgs{ - Address: pulumi.String("org street"), - City: pulumi.String("london"), - Country: pulumi.String("GB"), - ZipCode: pulumi.String("12345"), - }, - Description: pulumi.String("An organization"), - }) - if err != nil { - return err - } - ctx.Export("org", orgResource.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var orgResource = new Equinix.Metal.Organization("org", new() - { - Name = "Foo Organization", - Address = new Equinix.Metal.Inputs.OrganizationAddressArgs - { - Address = "org street", - City = "london", - Country = "GB", - ZipCode = "12345", - }, - Description = "An organization", - }); - - return new Dictionary - { - ["org"] = orgResource.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Organization; -import com.equinix.pulumi.metal.OrganizationArgs; -import com.equinix.pulumi.metal.inputs.OrganizationAddressArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var orgResource = new Organization("orgResource", OrganizationArgs.builder() - .name("Foo Organization") - .address(OrganizationAddressArgs.builder() - .address("org street") - .city("london") - .country("GB") - .zipCode("12345") - .build()) - .description("An organization") - .build()); - - ctx.export("org", orgResource.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -resources: - org: - type: equinix:metal:Organization - properties: - name: Foo Organization - address: - address: org street - city: london - country: GB - zipCode: "12345" - description: An organization -outputs: - org: ${org.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/organization/go/Pulumi.yaml b/examples/metal/organization/go/Pulumi.yaml index 99b37892..fc5398a6 100644 --- a/examples/metal/organization/go/Pulumi.yaml +++ b/examples/metal/organization/go/Pulumi.yaml @@ -1,3 +1,2 @@ name: equinix-metal-organization runtime: go -description: An Equinix Metal Organization resource diff --git a/examples/metal/organization/go/go.mod b/examples/metal/organization/go/go.mod index ecfd5195..002adcac 100644 --- a/examples/metal/organization/go/go.mod +++ b/examples/metal/organization/go/go.mod @@ -1,58 +1,94 @@ module equinix-metal-organization -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/organization/go/main.go b/examples/metal/organization/go/main.go index b5737577..f16ccec3 100644 --- a/examples/metal/organization/go/main.go +++ b/examples/metal/organization/go/main.go @@ -7,20 +7,13 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - orgResource, err := metal.NewOrganization(ctx, "org", &metal.OrganizationArgs{ - Name: pulumi.String("Foo Organization"), - Address: &metal.OrganizationAddressArgs{ - Address: pulumi.String("org street"), - City: pulumi.String("london"), - Country: pulumi.String("GB"), - ZipCode: pulumi.String("12345"), - }, - Description: pulumi.String("An organization"), + _, err := metal.NewOrganization(ctx, "tfOrganization1", &metal.OrganizationArgs{ + Name: pulumi.String("foobar"), + Description: pulumi.String("quux"), }) if err != nil { return err } - ctx.Export("org", orgResource.ID()) return nil }) } diff --git a/examples/metal/organization/java/.gitignore b/examples/metal/organization/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/organization/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/organization/java/Pulumi.yaml b/examples/metal/organization/java/Pulumi.yaml index 7de4ffbb..023250fd 100644 --- a/examples/metal/organization/java/Pulumi.yaml +++ b/examples/metal/organization/java/Pulumi.yaml @@ -1,3 +1,2 @@ name: equinix-metal-organization runtime: java -description: An Equinix Metal Organization resource diff --git a/examples/metal/organization/java/pom.xml b/examples/metal/organization/java/pom.xml index 51c6af83..767a5bc5 100644 --- a/examples/metal/organization/java/pom.xml +++ b/examples/metal/organization/java/pom.xml @@ -24,9 +24,9 @@ (,1.0] - com.equinix.pulumi + com.pulumi equinix - [0.1.0,) + (,1.0) diff --git a/examples/metal/organization/java/src/main/java/generated_program/App.java b/examples/metal/organization/java/src/main/java/generated_program/App.java index f9d42949..dd9042bc 100644 --- a/examples/metal/organization/java/src/main/java/generated_program/App.java +++ b/examples/metal/organization/java/src/main/java/generated_program/App.java @@ -3,9 +3,8 @@ import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Organization; -import com.equinix.pulumi.metal.OrganizationArgs; -import com.equinix.pulumi.metal.inputs.OrganizationAddressArgs; +import com.pulumi.equinix.metal.Organization; +import com.pulumi.equinix.metal.OrganizationArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -19,17 +18,10 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - var orgResource = new Organization("orgResource", OrganizationArgs.builder() - .name("Foo Organization") - .address(OrganizationAddressArgs.builder() - .address("org street") - .city("london") - .country("GB") - .zipCode("12345") - .build()) - .description("An organization") + var tfOrganization1 = new Organization("tfOrganization1", OrganizationArgs.builder() + .name("foobar") + .description("quux") .build()); - ctx.export("org", orgResource.id()); } } diff --git a/examples/metal/organization/python/Pulumi.yaml b/examples/metal/organization/python/Pulumi.yaml index ac0f3f63..1a9b76f4 100644 --- a/examples/metal/organization/python/Pulumi.yaml +++ b/examples/metal/organization/python/Pulumi.yaml @@ -1,3 +1,2 @@ name: equinix-metal-organization runtime: python -description: An Equinix Metal Organization resource diff --git a/examples/metal/organization/python/__main__.py b/examples/metal/organization/python/__main__.py index 580ddcc3..f36dca47 100644 --- a/examples/metal/organization/python/__main__.py +++ b/examples/metal/organization/python/__main__.py @@ -1,13 +1,6 @@ import pulumi import pulumi_equinix as equinix -org_resource = equinix.metal.Organization("org", - name="Foo Organization", - address=equinix.metal.OrganizationAddressArgs( - address="org street", - city="london", - country="GB", - zip_code="12345", - ), - description="An organization") -pulumi.export("org", org_resource.id) +tf_organization1 = equinix.metal.Organization("tfOrganization1", + name="foobar", + description="quux") diff --git a/examples/metal/organization/python/requirements.txt b/examples/metal/organization/python/requirements.txt index b16f555d..317d94a1 100644 --- a/examples/metal/organization/python/requirements.txt +++ b/examples/metal/organization/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix==0.0.1-alpha.1679684380+903d5f09.dirty +pulumi_equinix==<1.0.0 diff --git a/examples/metal/organization/typescript/Pulumi.yaml b/examples/metal/organization/typescript/Pulumi.yaml index 05f6ae9b..665c8e6d 100644 --- a/examples/metal/organization/typescript/Pulumi.yaml +++ b/examples/metal/organization/typescript/Pulumi.yaml @@ -1,3 +1,2 @@ name: equinix-metal-organization runtime: nodejs -description: An Equinix Metal Organization resource diff --git a/examples/metal/organization/typescript/index.ts b/examples/metal/organization/typescript/index.ts index 595e19e7..5d0f0ae6 100644 --- a/examples/metal/organization/typescript/index.ts +++ b/examples/metal/organization/typescript/index.ts @@ -1,14 +1,7 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const orgResource = new equinix.metal.Organization("org", { - name: "Foo Organization", - address: { - address: "org street", - city: "london", - country: "GB", - zipCode: "12345", - }, - description: "An organization", +const tfOrganization1 = new equinix.metal.Organization("tfOrganization1", { + name: "foobar", + description: "quux", }); -export const org = orgResource.id; diff --git a/examples/metal/organization/typescript/package.json b/examples/metal/organization/typescript/package.json index ba23b9c7..f759bcb7 100644 --- a/examples/metal/organization/typescript/package.json +++ b/examples/metal/organization/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-metal-organization", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "0.0.1-alpha.1679684380+903d5f09.dirty" - } + "name": "equinix-metal-organization", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/organization/typescript/tsconfig.json b/examples/metal/organization/typescript/tsconfig.json index 2ed7ea95..11fc69af 100644 --- a/examples/metal/organization/typescript/tsconfig.json +++ b/examples/metal/organization/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts", - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/organization/yaml/Pulumi.yaml b/examples/metal/organization/yaml/Pulumi.yaml deleted file mode 100644 index 24e375ef..00000000 --- a/examples/metal/organization/yaml/Pulumi.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: equinix-metal-organization -runtime: yaml -description: An Equinix Metal Organization resource -resources: - org: - type: equinix:metal:Organization - properties: - name: Foo Organization - address: - address: org street - city: london - country: GB - zipCode: "12345" - description: An organization -outputs: - org: ${org.id} diff --git a/examples/metal/organization_member/csharp/Program.cs b/examples/metal/organization_member/csharp/Program.cs deleted file mode 100644 index 4377df75..00000000 --- a/examples/metal/organization_member/csharp/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var organizationId = config.Require("organizationId"); - var projectId = config.Require("projectId"); - var userEmailAddress = config.Require("userEmailAddress"); - var member = new Equinix.Metal.OrganizationMember("member", new() - { - Invitee = userEmailAddress, - Roles = new[] - { - "limited_collaborator", - }, - ProjectsIds = new[] - { - projectId, - }, - OrganizationId = organizationId, - }); - - return new Dictionary - { - ["memberId"] = member.Id, - ["memberState"] = member.State, - }; -}); - diff --git a/examples/metal/organization_member/csharp/Pulumi.yaml b/examples/metal/organization_member/csharp/Pulumi.yaml deleted file mode 100644 index c7fc3d55..00000000 --- a/examples/metal/organization_member/csharp/Pulumi.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: equinix-metal-organization-member -runtime: dotnet -description: An Equinix Metal Organization Member resource to manage the membership of existing and new invitees within an Equinix Metal organization and its projects -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string diff --git a/examples/metal/organization_member/csharp/equinix-metal-organization-member.csproj b/examples/metal/organization_member/csharp/equinix-metal-organization-member.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/organization_member/csharp/equinix-metal-organization-member.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/organization_member/example.md b/examples/metal/organization_member/example.md deleted file mode 100644 index 89b48436..00000000 --- a/examples/metal/organization_member/example.md +++ /dev/null @@ -1,182 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const organizationId = config.require("organizationId"); -const projectId = config.require("projectId"); -const userEmailAddress = config.require("userEmailAddress"); -const member = new equinix.metal.OrganizationMember("member", { - invitee: userEmailAddress, - roles: ["limited_collaborator"], - projectsIds: [projectId], - organizationId: organizationId, -}); -export const memberId = member.id; -export const memberState = member.state; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -organization_id = config.require("organizationId") -project_id = config.require("projectId") -user_email_address = config.require("userEmailAddress") -member = equinix.metal.OrganizationMember("member", - invitee=user_email_address, - roles=["limited_collaborator"], - projects_ids=[project_id], - organization_id=organization_id) -pulumi.export("memberId", member.id) -pulumi.export("memberState", member.state) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - organizationId := cfg.Require("organizationId") - projectId := cfg.Require("projectId") - userEmailAddress := cfg.Require("userEmailAddress") - member, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{ - Invitee: pulumi.String(userEmailAddress), - Roles: pulumi.StringArray{ - pulumi.String("limited_collaborator"), - }, - ProjectsIds: pulumi.StringArray{ - pulumi.String(projectId), - }, - OrganizationId: pulumi.String(organizationId), - }) - if err != nil { - return err - } - ctx.Export("memberId", member.ID()) - ctx.Export("memberState", member.State) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var organizationId = config.Require("organizationId"); - var projectId = config.Require("projectId"); - var userEmailAddress = config.Require("userEmailAddress"); - var member = new Equinix.Metal.OrganizationMember("member", new() - { - Invitee = userEmailAddress, - Roles = new[] - { - "limited_collaborator", - }, - ProjectsIds = new[] - { - projectId, - }, - OrganizationId = organizationId, - }); - - return new Dictionary - { - ["memberId"] = member.Id, - ["memberState"] = member.State, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.OrganizationMember; -import com.equinix.pulumi.metal.OrganizationMemberArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var organizationId = config.get("organizationId").get(); - final var projectId = config.get("projectId").get(); - final var userEmailAddress = config.get("userEmailAddress").get(); - var member = new OrganizationMember("member", OrganizationMemberArgs.builder() - .invitee(userEmailAddress) - .roles("limited_collaborator") - .projectsIds(projectId) - .organizationId(organizationId) - .build()); - - ctx.export("memberId", member.id()); - ctx.export("memberState", member.state()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string -resources: - member: - type: equinix:metal:OrganizationMember - properties: - invitee: ${userEmailAddress} - roles: - - limited_collaborator - projectsIds: - - ${projectId} - organizationId: ${organizationId} -outputs: - memberId: ${member.id} - memberState: ${member.state} -``` - -{{% /choosable %}} diff --git a/examples/metal/organization_member/example_1/Pulumi.yaml b/examples/metal/organization_member/example_1/Pulumi.yaml new file mode 100644 index 00000000..76db4762 --- /dev/null +++ b/examples/metal/organization_member/example_1/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-organization_member-example_1 +runtime: yaml +resources: + member: + type: equinix:metal:OrganizationMember + properties: + invitee: member@example.com + roles: + - limited_collaborator + projectsIds: + - ${projectId} + organizationId: ${organizationId} diff --git a/examples/metal/organization_member/example_1/csharp/.gitignore b/examples/metal/organization_member/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/organization_member/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/organization_member/example_1/csharp/Program.cs b/examples/metal/organization_member/example_1/csharp/Program.cs new file mode 100644 index 00000000..ce856498 --- /dev/null +++ b/examples/metal/organization_member/example_1/csharp/Program.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var member = new Equinix.Metal.OrganizationMember("member", new() + { + Invitee = "member@example.com", + Roles = new[] + { + "limited_collaborator", + }, + ProjectsIds = new[] + { + projectId, + }, + OrganizationId = organizationId, + }); + +}); + diff --git a/examples/metal/organization_member/example_1/csharp/Pulumi.yaml b/examples/metal/organization_member/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..5a0ada60 --- /dev/null +++ b/examples/metal/organization_member/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_1 +runtime: dotnet diff --git a/examples/metal/organization_member/example_1/csharp/equinix-metal-organization_member-example_1.csproj b/examples/metal/organization_member/example_1/csharp/equinix-metal-organization_member-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/organization_member/example_1/csharp/equinix-metal-organization_member-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/organization_member/example_1/go/Pulumi.yaml b/examples/metal/organization_member/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..0f6738fb --- /dev/null +++ b/examples/metal/organization_member/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_1 +runtime: go diff --git a/examples/metal/organization_member/example_1/go/go.mod b/examples/metal/organization_member/example_1/go/go.mod new file mode 100644 index 00000000..f24d04f7 --- /dev/null +++ b/examples/metal/organization_member/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-organization_member-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/organization_member/example_1/go/main.go b/examples/metal/organization_member/example_1/go/main.go new file mode 100644 index 00000000..9b400c02 --- /dev/null +++ b/examples/metal/organization_member/example_1/go/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{ + Invitee: pulumi.String("member@example.com"), + Roles: pulumi.StringArray{ + pulumi.String("limited_collaborator"), + }, + ProjectsIds: pulumi.StringArray{ + projectId, + }, + OrganizationId: pulumi.Any(organizationId), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/organization_member/example_1/java/Pulumi.yaml b/examples/metal/organization_member/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..98ded918 --- /dev/null +++ b/examples/metal/organization_member/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_1 +runtime: java diff --git a/examples/metal/organization_member/example_1/java/pom.xml b/examples/metal/organization_member/example_1/java/pom.xml new file mode 100644 index 00000000..359996d7 --- /dev/null +++ b/examples/metal/organization_member/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-organization_member-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/organization_member/example_1/java/src/main/java/generated_program/App.java b/examples/metal/organization_member/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..77291856 --- /dev/null +++ b/examples/metal/organization_member/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,29 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.OrganizationMember; +import com.pulumi.equinix.metal.OrganizationMemberArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var member = new OrganizationMember("member", OrganizationMemberArgs.builder() + .invitee("member@example.com") + .roles("limited_collaborator") + .projectsIds(projectId) + .organizationId(organizationId) + .build()); + + } +} diff --git a/examples/metal/organization_member/example_1/python/.gitignore b/examples/metal/organization_member/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/organization_member/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/organization_member/example_1/python/Pulumi.yaml b/examples/metal/organization_member/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..32000ad9 --- /dev/null +++ b/examples/metal/organization_member/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_1 +runtime: python diff --git a/examples/metal/organization_member/example_1/python/__main__.py b/examples/metal/organization_member/example_1/python/__main__.py new file mode 100644 index 00000000..1936fb2c --- /dev/null +++ b/examples/metal/organization_member/example_1/python/__main__.py @@ -0,0 +1,8 @@ +import pulumi +import pulumi_equinix as equinix + +member = equinix.metal.OrganizationMember("member", + invitee="member@example.com", + roles=["limited_collaborator"], + projects_ids=[project_id], + organization_id=organization_id) diff --git a/examples/metal/organization_member/example_1/python/requirements.txt b/examples/metal/organization_member/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/organization_member/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/organization_member/example_1/typescript/.gitignore b/examples/metal/organization_member/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/organization_member/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/organization_member/example_1/typescript/Pulumi.yaml b/examples/metal/organization_member/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..355c4f97 --- /dev/null +++ b/examples/metal/organization_member/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_1 +runtime: nodejs diff --git a/examples/metal/organization_member/example_1/typescript/index.ts b/examples/metal/organization_member/example_1/typescript/index.ts new file mode 100644 index 00000000..572157f7 --- /dev/null +++ b/examples/metal/organization_member/example_1/typescript/index.ts @@ -0,0 +1,9 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const member = new equinix.metal.OrganizationMember("member", { + invitee: "member@example.com", + roles: ["limited_collaborator"], + projectsIds: [projectId], + organizationId: organizationId, +}); diff --git a/examples/metal/organization_member/example_1/typescript/package.json b/examples/metal/organization_member/example_1/typescript/package.json new file mode 100644 index 00000000..6b465ddc --- /dev/null +++ b/examples/metal/organization_member/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-organization_member-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/organization_member/example_1/typescript/tsconfig.json b/examples/metal/organization_member/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/organization_member/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/organization_member/example_2/Pulumi.yaml b/examples/metal/organization_member/example_2/Pulumi.yaml new file mode 100644 index 00000000..1e683bd3 --- /dev/null +++ b/examples/metal/organization_member/example_2/Pulumi.yaml @@ -0,0 +1,11 @@ +name: equinix-metal-organization_member-example_2 +runtime: yaml +resources: + owner: + type: equinix:metal:OrganizationMember + properties: + invitee: admin@example.com + roles: + - owner + projectsIds: [] + organizationId: ${organizationId} diff --git a/examples/metal/organization_member/example_2/csharp/.gitignore b/examples/metal/organization_member/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/organization_member/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/organization_member/example_2/csharp/Program.cs b/examples/metal/organization_member/example_2/csharp/Program.cs new file mode 100644 index 00000000..553ce341 --- /dev/null +++ b/examples/metal/organization_member/example_2/csharp/Program.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var owner = new Equinix.Metal.OrganizationMember("owner", new() + { + Invitee = "admin@example.com", + Roles = new[] + { + "owner", + }, + ProjectsIds = new[] {}, + OrganizationId = organizationId, + }); + +}); + diff --git a/examples/metal/organization_member/example_2/csharp/Pulumi.yaml b/examples/metal/organization_member/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..2b26be09 --- /dev/null +++ b/examples/metal/organization_member/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_2 +runtime: dotnet diff --git a/examples/metal/organization_member/example_2/csharp/equinix-metal-organization_member-example_2.csproj b/examples/metal/organization_member/example_2/csharp/equinix-metal-organization_member-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/organization_member/example_2/csharp/equinix-metal-organization_member-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/organization_member/example_2/go/Pulumi.yaml b/examples/metal/organization_member/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..1632611f --- /dev/null +++ b/examples/metal/organization_member/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_2 +runtime: go diff --git a/examples/metal/organization_member/example_2/go/go.mod b/examples/metal/organization_member/example_2/go/go.mod new file mode 100644 index 00000000..cb360ba9 --- /dev/null +++ b/examples/metal/organization_member/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-organization_member-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/organization_member/example_2/go/main.go b/examples/metal/organization_member/example_2/go/main.go new file mode 100644 index 00000000..b7f33496 --- /dev/null +++ b/examples/metal/organization_member/example_2/go/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewOrganizationMember(ctx, "owner", &metal.OrganizationMemberArgs{ + Invitee: pulumi.String("admin@example.com"), + Roles: pulumi.StringArray{ + pulumi.String("owner"), + }, + ProjectsIds: pulumi.StringArray{}, + OrganizationId: pulumi.Any(organizationId), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/organization_member/example_2/java/Pulumi.yaml b/examples/metal/organization_member/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..4ff440b5 --- /dev/null +++ b/examples/metal/organization_member/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_2 +runtime: java diff --git a/examples/metal/organization_member/example_2/java/pom.xml b/examples/metal/organization_member/example_2/java/pom.xml new file mode 100644 index 00000000..42e2f611 --- /dev/null +++ b/examples/metal/organization_member/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-organization_member-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/organization_member/example_2/java/src/main/java/generated_program/App.java b/examples/metal/organization_member/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..19b8d569 --- /dev/null +++ b/examples/metal/organization_member/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,29 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.OrganizationMember; +import com.pulumi.equinix.metal.OrganizationMemberArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var owner = new OrganizationMember("owner", OrganizationMemberArgs.builder() + .invitee("admin@example.com") + .roles("owner") + .projectsIds() + .organizationId(organizationId) + .build()); + + } +} diff --git a/examples/metal/organization_member/example_2/python/.gitignore b/examples/metal/organization_member/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/organization_member/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/organization_member/example_2/python/Pulumi.yaml b/examples/metal/organization_member/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..8baec1b3 --- /dev/null +++ b/examples/metal/organization_member/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_2 +runtime: python diff --git a/examples/metal/organization_member/example_2/python/__main__.py b/examples/metal/organization_member/example_2/python/__main__.py new file mode 100644 index 00000000..af19ca9e --- /dev/null +++ b/examples/metal/organization_member/example_2/python/__main__.py @@ -0,0 +1,8 @@ +import pulumi +import pulumi_equinix as equinix + +owner = equinix.metal.OrganizationMember("owner", + invitee="admin@example.com", + roles=["owner"], + projects_ids=[], + organization_id=organization_id) diff --git a/examples/metal/organization_member/example_2/python/requirements.txt b/examples/metal/organization_member/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/organization_member/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/organization_member/example_2/typescript/.gitignore b/examples/metal/organization_member/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/organization_member/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/organization_member/example_2/typescript/Pulumi.yaml b/examples/metal/organization_member/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..770be4e7 --- /dev/null +++ b/examples/metal/organization_member/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-organization_member-example_2 +runtime: nodejs diff --git a/examples/metal/organization_member/example_2/typescript/index.ts b/examples/metal/organization_member/example_2/typescript/index.ts new file mode 100644 index 00000000..ad33851f --- /dev/null +++ b/examples/metal/organization_member/example_2/typescript/index.ts @@ -0,0 +1,9 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const owner = new equinix.metal.OrganizationMember("owner", { + invitee: "admin@example.com", + roles: ["owner"], + projectsIds: [], + organizationId: organizationId, +}); diff --git a/examples/metal/organization_member/example_2/typescript/package.json b/examples/metal/organization_member/example_2/typescript/package.json new file mode 100644 index 00000000..eea19182 --- /dev/null +++ b/examples/metal/organization_member/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-organization_member-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/organization_member/example_2/typescript/tsconfig.json b/examples/metal/organization_member/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/organization_member/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/organization_member/go/Pulumi.yaml b/examples/metal/organization_member/go/Pulumi.yaml deleted file mode 100644 index 49f015e9..00000000 --- a/examples/metal/organization_member/go/Pulumi.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: equinix-metal-organization-member -runtime: go -description: An Equinix Metal Organization Member resource to manage the membership of existing and new invitees within an Equinix Metal organization and its projects -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string diff --git a/examples/metal/organization_member/go/go.mod b/examples/metal/organization_member/go/go.mod deleted file mode 100644 index 5564f293..00000000 --- a/examples/metal/organization_member/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-organization-member - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/organization_member/go/main.go b/examples/metal/organization_member/go/main.go deleted file mode 100644 index d7a5adf8..00000000 --- a/examples/metal/organization_member/go/main.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - organizationId := cfg.Require("organizationId") - projectId := cfg.Require("projectId") - userEmailAddress := cfg.Require("userEmailAddress") - member, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{ - Invitee: pulumi.String(userEmailAddress), - Roles: pulumi.StringArray{ - pulumi.String("limited_collaborator"), - }, - ProjectsIds: pulumi.StringArray{ - pulumi.String(projectId), - }, - OrganizationId: pulumi.String(organizationId), - }) - if err != nil { - return err - } - ctx.Export("memberId", member.ID()) - ctx.Export("memberState", member.State) - return nil - }) -} diff --git a/examples/metal/organization_member/java/.gitignore b/examples/metal/organization_member/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/organization_member/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/organization_member/java/Pulumi.yaml b/examples/metal/organization_member/java/Pulumi.yaml deleted file mode 100644 index 6b37a713..00000000 --- a/examples/metal/organization_member/java/Pulumi.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: equinix-metal-organization-member -runtime: java -description: An Equinix Metal Organization Member resource to manage the membership of existing and new invitees within an Equinix Metal organization and its projects -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string diff --git a/examples/metal/organization_member/java/pom.xml b/examples/metal/organization_member/java/pom.xml deleted file mode 100644 index 21a99e62..00000000 --- a/examples/metal/organization_member/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-organization-member - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/organization_member/java/src/main/java/generated_program/App.java b/examples/metal/organization_member/java/src/main/java/generated_program/App.java deleted file mode 100644 index 2ba32916..00000000 --- a/examples/metal/organization_member/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,28 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.OrganizationMember; -import com.equinix.pulumi.metal.OrganizationMemberArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var organizationId = config.get("organizationId").get(); - final var projectId = config.get("projectId").get(); - final var userEmailAddress = config.get("userEmailAddress").get(); - var member = new OrganizationMember("member", OrganizationMemberArgs.builder() - .invitee(userEmailAddress) - .roles("limited_collaborator") - .projectsIds(projectId) - .organizationId(organizationId) - .build()); - - ctx.export("memberId", member.id()); - ctx.export("memberState", member.state()); - } -} diff --git a/examples/metal/organization_member/python/Pulumi.yaml b/examples/metal/organization_member/python/Pulumi.yaml deleted file mode 100644 index bf2dd35f..00000000 --- a/examples/metal/organization_member/python/Pulumi.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: equinix-metal-organization-member -runtime: python -description: An Equinix Metal Organization Member resource to manage the membership of existing and new invitees within an Equinix Metal organization and its projects -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string diff --git a/examples/metal/organization_member/python/__main__.py b/examples/metal/organization_member/python/__main__.py deleted file mode 100644 index 4d5bff61..00000000 --- a/examples/metal/organization_member/python/__main__.py +++ /dev/null @@ -1,14 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -organization_id = config.require("organizationId") -project_id = config.require("projectId") -user_email_address = config.require("userEmailAddress") -member = equinix.metal.OrganizationMember("member", - invitee=user_email_address, - roles=["limited_collaborator"], - projects_ids=[project_id], - organization_id=organization_id) -pulumi.export("memberId", member.id) -pulumi.export("memberState", member.state) diff --git a/examples/metal/organization_member/python/requirements.txt b/examples/metal/organization_member/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/organization_member/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/organization_member/typescript/Pulumi.yaml b/examples/metal/organization_member/typescript/Pulumi.yaml deleted file mode 100644 index 886e7d40..00000000 --- a/examples/metal/organization_member/typescript/Pulumi.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: equinix-metal-organization-member -runtime: nodejs -description: An Equinix Metal Organization Member resource to manage the membership of existing and new invitees within an Equinix Metal organization and its projects -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string diff --git a/examples/metal/organization_member/typescript/index.ts b/examples/metal/organization_member/typescript/index.ts deleted file mode 100644 index 689ebce3..00000000 --- a/examples/metal/organization_member/typescript/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const organizationId = config.require("organizationId"); -const projectId = config.require("projectId"); -const userEmailAddress = config.require("userEmailAddress"); -const member = new equinix.metal.OrganizationMember("member", { - invitee: userEmailAddress, - roles: ["limited_collaborator"], - projectsIds: [projectId], - organizationId: organizationId, -}); -export const memberId = member.id; -export const memberState = member.state; diff --git a/examples/metal/organization_member/typescript/package.json b/examples/metal/organization_member/typescript/package.json deleted file mode 100644 index 2a54a57a..00000000 --- a/examples/metal/organization_member/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-organization-member", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/organization_member/typescript/tsconfig.json b/examples/metal/organization_member/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/organization_member/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/organization_member/yaml/Pulumi.yaml b/examples/metal/organization_member/yaml/Pulumi.yaml deleted file mode 100644 index 92de25ef..00000000 --- a/examples/metal/organization_member/yaml/Pulumi.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: equinix-metal-organization-member -runtime: yaml -description: An Equinix Metal Organization Member resource to manage the membership of existing and new invitees within an Equinix Metal organization and its projects -config: - organizationId: - type: string - projectId: - type: string - userEmailAddress: - type: string -resources: - member: - type: equinix:metal:OrganizationMember - properties: - invitee: ${userEmailAddress} - roles: - - limited_collaborator - projectsIds: - - ${projectId} - organizationId: ${organizationId} -outputs: - memberId: ${member.id} - memberState: ${member.state} diff --git a/examples/metal/port/hybrid_bonded/csharp/Program.cs b/examples/metal/port/hybrid_bonded/csharp/Program.cs deleted file mode 100644 index e6d77ee0..00000000 --- a/examples/metal/port/hybrid_bonded/csharp/Program.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var portId = config.Require("portId"); - var vlanId = config.Require("vlanId"); - var port = new Equinix.Metal.Port("port", new() - { - PortId = portId, - Bonded = true, - Layer2 = false, - VlanIds = new[] - { - vlanId, - }, - }); - - return new Dictionary - { - ["portType"] = port.Type, - ["portBondedNetworkType"] = port.NetworkType, - }; -}); - diff --git a/examples/metal/port/hybrid_bonded/csharp/Pulumi.yaml b/examples/metal/port/hybrid_bonded/csharp/Pulumi.yaml deleted file mode 100644 index 712e5b1f..00000000 --- a/examples/metal/port/hybrid_bonded/csharp/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-port -runtime: dotnet -description: An Equinix Metal Port resource -config: - portId: - type: string - vlanId: - type: string diff --git a/examples/metal/port/hybrid_bonded/csharp/equinix-metal-port.csproj b/examples/metal/port/hybrid_bonded/csharp/equinix-metal-port.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/port/hybrid_bonded/csharp/equinix-metal-port.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/port/hybrid_bonded/example.md b/examples/metal/port/hybrid_bonded/example.md deleted file mode 100644 index 44dae6df..00000000 --- a/examples/metal/port/hybrid_bonded/example.md +++ /dev/null @@ -1,176 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const portId = config.require("portId"); -const vlanId = config.require("vlanId"); -const port = new equinix.metal.Port("port", { - portId: portId, - bonded: true, - layer2: false, - vlanIds: [vlanId], -}); -export const portType = port.type; -export const portBondedNetworkType = port.networkType; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -port_id = config.require("portId") -vlan_id = config.require("vlanId") -port = equinix.metal.Port("port", - port_id=port_id, - bonded=True, - layer2=False, - vlan_ids=[vlan_id]) -pulumi.export("portType", port["type"]) -pulumi.export("portBondedNetworkType", port["networkType"]) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - portId := cfg.Require("portId") - vlanId := cfg.Require("vlanId") - port, err := metal.NewPort(ctx, "port", &metal.PortArgs{ - PortId: pulumi.String(portId), - Bonded: pulumi.Bool(true), - Layer2: pulumi.Bool(false), - VlanIds: pulumi.StringArray{ - pulumi.String(vlanId), - }, - }) - if err != nil { - return err - } - ctx.Export("portType", port.Type) - ctx.Export("portBondedNetworkType", port.NetworkType) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var portId = config.Require("portId"); - var vlanId = config.Require("vlanId"); - var port = new Equinix.Metal.Port("port", new() - { - PortId = portId, - Bonded = true, - Layer2 = false, - VlanIds = new[] - { - vlanId, - }, - }); - - return new Dictionary - { - ["portType"] = port.Type, - ["portBondedNetworkType"] = port.NetworkType, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Port; -import com.equinix.pulumi.metal.PortArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var portId = config.get("portId").get(); - final var vlanId = config.get("vlanId").get(); - var port = new Port("port", PortArgs.builder() - .portId(portId) - .bonded(true) - .layer2(false) - .vlanIds(vlanId) - .build()); - - ctx.export("portType", port.type()); - ctx.export("portBondedNetworkType", port.networkType()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - portId: - type: string - vlanId: - type: string -resources: - port: - type: equinix:metal:Port - properties: - portId: ${portId} - bonded: true - layer2: false - vlanIds: - - ${vlanId} -outputs: - portType: ${port.type} - portBondedNetworkType: ${port.networkType} -``` - -{{% /choosable %}} diff --git a/examples/metal/port/hybrid_bonded/go/Pulumi.yaml b/examples/metal/port/hybrid_bonded/go/Pulumi.yaml deleted file mode 100644 index 2553fc7a..00000000 --- a/examples/metal/port/hybrid_bonded/go/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-port -runtime: go -description: An Equinix Metal Port resource -config: - portId: - type: string - vlanId: - type: string diff --git a/examples/metal/port/hybrid_bonded/go/go.mod b/examples/metal/port/hybrid_bonded/go/go.mod deleted file mode 100644 index 7808d9e6..00000000 --- a/examples/metal/port/hybrid_bonded/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-port - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/port/hybrid_bonded/go/main.go b/examples/metal/port/hybrid_bonded/go/main.go deleted file mode 100644 index 4ddade40..00000000 --- a/examples/metal/port/hybrid_bonded/go/main.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - portId := cfg.Require("portId") - vlanId := cfg.Require("vlanId") - port, err := metal.NewPort(ctx, "port", &metal.PortArgs{ - PortId: pulumi.String(portId), - Bonded: pulumi.Bool(true), - Layer2: pulumi.Bool(false), - VlanIds: pulumi.StringArray{ - pulumi.String(vlanId), - }, - }) - if err != nil { - return err - } - ctx.Export("portType", port.Type) - ctx.Export("portBondedNetworkType", port.NetworkType) - return nil - }) -} diff --git a/examples/metal/port/hybrid_bonded/java/.gitignore b/examples/metal/port/hybrid_bonded/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/port/hybrid_bonded/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/port/hybrid_bonded/java/Pulumi.yaml b/examples/metal/port/hybrid_bonded/java/Pulumi.yaml deleted file mode 100644 index 5fba9cde..00000000 --- a/examples/metal/port/hybrid_bonded/java/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-port -runtime: java -description: An Equinix Metal Port resource -config: - portId: - type: string - vlanId: - type: string diff --git a/examples/metal/port/hybrid_bonded/java/pom.xml b/examples/metal/port/hybrid_bonded/java/pom.xml deleted file mode 100644 index ad8a5d76..00000000 --- a/examples/metal/port/hybrid_bonded/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-port - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/port/hybrid_bonded/java/src/main/java/generated_program/App.java b/examples/metal/port/hybrid_bonded/java/src/main/java/generated_program/App.java deleted file mode 100644 index 4c258dc6..00000000 --- a/examples/metal/port/hybrid_bonded/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,34 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Port; -import com.equinix.pulumi.metal.PortArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var portId = config.get("portId").get(); - final var vlanId = config.get("vlanId").get(); - var port = new Port("port", PortArgs.builder() - .portId(portId) - .bonded(true) - .layer2(false) - .vlanIds(vlanId) - .build()); - - ctx.export("portType", port.type()); - ctx.export("portBondedNetworkType", port.networkType()); - } -} diff --git a/examples/metal/port/hybrid_bonded/python/Pulumi.yaml b/examples/metal/port/hybrid_bonded/python/Pulumi.yaml deleted file mode 100644 index c92c8053..00000000 --- a/examples/metal/port/hybrid_bonded/python/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-port -runtime: python -description: An Equinix Metal Port resource -config: - portId: - type: string - vlanId: - type: string diff --git a/examples/metal/port/hybrid_bonded/python/__main__.py b/examples/metal/port/hybrid_bonded/python/__main__.py deleted file mode 100644 index d932b476..00000000 --- a/examples/metal/port/hybrid_bonded/python/__main__.py +++ /dev/null @@ -1,13 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -port_id = config.require("portId") -vlan_id = config.require("vlanId") -port = equinix.metal.Port("port", - port_id=port_id, - bonded=True, - layer2=False, - vlan_ids=[vlan_id]) -pulumi.export("portType", port["type"]) -pulumi.export("portBondedNetworkType", port["networkType"]) diff --git a/examples/metal/port/hybrid_bonded/python/requirements.txt b/examples/metal/port/hybrid_bonded/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/port/hybrid_bonded/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/port/hybrid_bonded/typescript/Pulumi.yaml b/examples/metal/port/hybrid_bonded/typescript/Pulumi.yaml deleted file mode 100644 index 246dacd4..00000000 --- a/examples/metal/port/hybrid_bonded/typescript/Pulumi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: equinix-metal-port -runtime: nodejs -description: An Equinix Metal Port resource -config: - portId: - type: string - vlanId: - type: string diff --git a/examples/metal/port/hybrid_bonded/typescript/index.ts b/examples/metal/port/hybrid_bonded/typescript/index.ts deleted file mode 100644 index 962fa5bd..00000000 --- a/examples/metal/port/hybrid_bonded/typescript/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const portId = config.require("portId"); -const vlanId = config.require("vlanId"); -const port = new equinix.metal.Port("portBond0", { - portId: portId, - bonded: true, - layer2: false, - vlanIds: [vlanId], -}); -export const portType = port.type; -export const portBondedNetworkType = port.networkType; diff --git a/examples/metal/port/hybrid_bonded/typescript/package.json b/examples/metal/port/hybrid_bonded/typescript/package.json deleted file mode 100644 index 3fb0f97d..00000000 --- a/examples/metal/port/hybrid_bonded/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-port", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/port/hybrid_bonded/typescript/tsconfig.json b/examples/metal/port/hybrid_bonded/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/port/hybrid_bonded/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/port/hybrid_bonded/yaml/Pulumi.yaml b/examples/metal/port/hybrid_bonded/yaml/Pulumi.yaml deleted file mode 100644 index 0b790041..00000000 --- a/examples/metal/port/hybrid_bonded/yaml/Pulumi.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: equinix-metal-port -runtime: yaml -description: An Equinix Metal Port resource -config: - portId: - type: string - vlanId: - type: string -resources: - port: - type: equinix:metal:Port - properties: - portId: ${portId} - bonded: true - layer2: false - vlanIds: - - ${vlanId} -outputs: - portType: ${port.type} - portBondedNetworkType: ${port.networkType} diff --git a/examples/metal/port/hybrid_unbonded/csharp/Program.cs b/examples/metal/port/hybrid_unbonded/csharp/Program.cs deleted file mode 100644 index dbe14ca4..00000000 --- a/examples/metal/port/hybrid_unbonded/csharp/Program.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var portId = config.Require("portId"); - var port = new Equinix.Metal.Port("port", new() - { - PortId = portId, - Bonded = false, - }); - - return new Dictionary - { - ["portType"] = port.Type, - }; -}); - diff --git a/examples/metal/port/hybrid_unbonded/csharp/Pulumi.yaml b/examples/metal/port/hybrid_unbonded/csharp/Pulumi.yaml deleted file mode 100644 index 2c757b59..00000000 --- a/examples/metal/port/hybrid_unbonded/csharp/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: dotnet -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/hybrid_unbonded/csharp/equinix-metal-port.csproj b/examples/metal/port/hybrid_unbonded/csharp/equinix-metal-port.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/port/hybrid_unbonded/csharp/equinix-metal-port.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/port/hybrid_unbonded/example.md b/examples/metal/port/hybrid_unbonded/example.md deleted file mode 100644 index 1ae0e275..00000000 --- a/examples/metal/port/hybrid_unbonded/example.md +++ /dev/null @@ -1,145 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const portId = config.require("portId"); -const port = new equinix.metal.Port("port", { - portId: portId, - bonded: false, -}); -export const portType = port.type; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -port_id = config.require("portId") -port = equinix.metal.Port("port", - port_id=port_id, - bonded=False) -pulumi.export("portType", port["type"]) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - portId := cfg.Require("portId") - port, err := metal.NewPort(ctx, "port", &metal.PortArgs{ - PortId: pulumi.String(portId), - Bonded: pulumi.Bool(false), - }) - if err != nil { - return err - } - ctx.Export("portType", port.Type) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var portId = config.Require("portId"); - var port = new Equinix.Metal.Port("port", new() - { - PortId = portId, - Bonded = false, - }); - - return new Dictionary - { - ["portType"] = port.Type, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Port; -import com.equinix.pulumi.metal.PortArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var portId = config.get("portId").get(); - var port = new Port("port", PortArgs.builder() - .portId(portId) - .bonded(false) - .build()); - - ctx.export("portType", port.type()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - portId: - type: string -resources: - port: - type: equinix:metal:Port - properties: - portId: ${portId} - bonded: false -outputs: - portType: ${port.type} -``` - -{{% /choosable %}} diff --git a/examples/metal/port/hybrid_unbonded/go/Pulumi.yaml b/examples/metal/port/hybrid_unbonded/go/Pulumi.yaml deleted file mode 100644 index c556b8ad..00000000 --- a/examples/metal/port/hybrid_unbonded/go/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: go -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/hybrid_unbonded/go/go.mod b/examples/metal/port/hybrid_unbonded/go/go.mod deleted file mode 100644 index 7808d9e6..00000000 --- a/examples/metal/port/hybrid_unbonded/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-port - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/port/hybrid_unbonded/go/main.go b/examples/metal/port/hybrid_unbonded/go/main.go deleted file mode 100644 index 1785fdd4..00000000 --- a/examples/metal/port/hybrid_unbonded/go/main.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - portId := cfg.Require("portId") - port, err := metal.NewPort(ctx, "port", &metal.PortArgs{ - PortId: pulumi.String(portId), - Bonded: pulumi.Bool(false), - }) - if err != nil { - return err - } - ctx.Export("portType", port.Type) - return nil - }) -} diff --git a/examples/metal/port/hybrid_unbonded/java/.gitignore b/examples/metal/port/hybrid_unbonded/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/port/hybrid_unbonded/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/port/hybrid_unbonded/java/Pulumi.yaml b/examples/metal/port/hybrid_unbonded/java/Pulumi.yaml deleted file mode 100644 index d5dd45a5..00000000 --- a/examples/metal/port/hybrid_unbonded/java/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: java -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/hybrid_unbonded/java/pom.xml b/examples/metal/port/hybrid_unbonded/java/pom.xml deleted file mode 100644 index ad8a5d76..00000000 --- a/examples/metal/port/hybrid_unbonded/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-port - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/port/hybrid_unbonded/java/src/main/java/generated_program/App.java b/examples/metal/port/hybrid_unbonded/java/src/main/java/generated_program/App.java deleted file mode 100644 index 975e3cbf..00000000 --- a/examples/metal/port/hybrid_unbonded/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,30 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Port; -import com.equinix.pulumi.metal.PortArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var portId = config.get("portId").get(); - var port = new Port("port", PortArgs.builder() - .portId(portId) - .bonded(false) - .build()); - - ctx.export("portType", port.type()); - } -} diff --git a/examples/metal/port/hybrid_unbonded/python/Pulumi.yaml b/examples/metal/port/hybrid_unbonded/python/Pulumi.yaml deleted file mode 100644 index d081d39e..00000000 --- a/examples/metal/port/hybrid_unbonded/python/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: python -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/hybrid_unbonded/python/__main__.py b/examples/metal/port/hybrid_unbonded/python/__main__.py deleted file mode 100644 index d4680fa6..00000000 --- a/examples/metal/port/hybrid_unbonded/python/__main__.py +++ /dev/null @@ -1,9 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -port_id = config.require("portId") -port = equinix.metal.Port("port", - port_id=port_id, - bonded=False) -pulumi.export("portType", port["type"]) diff --git a/examples/metal/port/hybrid_unbonded/python/requirements.txt b/examples/metal/port/hybrid_unbonded/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/port/hybrid_unbonded/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/port/hybrid_unbonded/typescript/Pulumi.yaml b/examples/metal/port/hybrid_unbonded/typescript/Pulumi.yaml deleted file mode 100644 index 260b78aa..00000000 --- a/examples/metal/port/hybrid_unbonded/typescript/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: nodejs -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/hybrid_unbonded/typescript/index.ts b/examples/metal/port/hybrid_unbonded/typescript/index.ts deleted file mode 100644 index 46a2ee5b..00000000 --- a/examples/metal/port/hybrid_unbonded/typescript/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const portId = config.require("portId"); -const port = new equinix.metal.Port("port", { - portId: portId, - bonded: false, -}); -export const portType = port.type; diff --git a/examples/metal/port/hybrid_unbonded/typescript/package.json b/examples/metal/port/hybrid_unbonded/typescript/package.json deleted file mode 100644 index 3fb0f97d..00000000 --- a/examples/metal/port/hybrid_unbonded/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-port", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/port/hybrid_unbonded/typescript/tsconfig.json b/examples/metal/port/hybrid_unbonded/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/port/hybrid_unbonded/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/port/hybrid_unbonded/yaml/Pulumi.yaml b/examples/metal/port/hybrid_unbonded/yaml/Pulumi.yaml deleted file mode 100644 index 0150ee3c..00000000 --- a/examples/metal/port/hybrid_unbonded/yaml/Pulumi.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: equinix-metal-port -runtime: yaml -description: An Equinix Metal Port resource -config: - portId: - type: string -resources: - port: - type: equinix:metal:Port - properties: - portId: ${portId} - bonded: false -outputs: - portType: ${port.type} diff --git a/examples/metal/port/layer2_bonded/csharp/Program.cs b/examples/metal/port/layer2_bonded/csharp/Program.cs deleted file mode 100644 index 45cde593..00000000 --- a/examples/metal/port/layer2_bonded/csharp/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var portId = config.Require("portId"); - var port = new Equinix.Metal.Port("port", new() - { - PortId = portId, - Bonded = true, - Layer2 = true, - }); - - return new Dictionary - { - ["portType"] = port.Type, - ["portBondedNetworkType"] = port.NetworkType, - }; -}); - diff --git a/examples/metal/port/layer2_bonded/csharp/Pulumi.yaml b/examples/metal/port/layer2_bonded/csharp/Pulumi.yaml deleted file mode 100644 index 2c757b59..00000000 --- a/examples/metal/port/layer2_bonded/csharp/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: dotnet -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/layer2_bonded/csharp/equinix-metal-port.csproj b/examples/metal/port/layer2_bonded/csharp/equinix-metal-port.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/port/layer2_bonded/csharp/equinix-metal-port.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/port/layer2_bonded/example.md b/examples/metal/port/layer2_bonded/example.md deleted file mode 100644 index e021f44e..00000000 --- a/examples/metal/port/layer2_bonded/example.md +++ /dev/null @@ -1,157 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const portId = config.require("portId"); -const port = new equinix.metal.Port("port", { - portId: portId, - bonded: true, - layer2: true, -}); -export const portType = port.type; -export const portBondedNetworkType = port.networkType; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -port_id = config.require("portId") -port = equinix.metal.Port("port", - port_id=port_id, - bonded=True, - layer2=True) -pulumi.export("portType", port["type"]) -pulumi.export("portBondedNetworkType", port["networkType"]) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - portId := cfg.Require("portId") - port, err := metal.NewPort(ctx, "port", &metal.PortArgs{ - PortId: pulumi.String(portId), - Bonded: pulumi.Bool(true), - Layer2: pulumi.Bool(true), - }) - if err != nil { - return err - } - ctx.Export("portType", port.Type) - ctx.Export("portBondedNetworkType", port.NetworkType) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var portId = config.Require("portId"); - var port = new Equinix.Metal.Port("port", new() - { - PortId = portId, - Bonded = true, - Layer2 = true, - }); - - return new Dictionary - { - ["portType"] = port.Type, - ["portBondedNetworkType"] = port.NetworkType, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Port; -import com.equinix.pulumi.metal.PortArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var portId = config.get("portId").get(); - var port = new Port("port", PortArgs.builder() - .portId(portId) - .bonded(true) - .layer2(true) - .build()); - - ctx.export("portType", port.type()); - ctx.export("portBondedNetworkType", port.networkType()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - portId: - type: string -resources: - port: - type: equinix:metal:Port - properties: - portId: ${portId} - bonded: true - layer2: true -outputs: - portType: ${port.type} - portBondedNetworkType: ${port.networkType} -``` - -{{% /choosable %}} diff --git a/examples/metal/port/layer2_bonded/go/Pulumi.yaml b/examples/metal/port/layer2_bonded/go/Pulumi.yaml deleted file mode 100644 index c556b8ad..00000000 --- a/examples/metal/port/layer2_bonded/go/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: go -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/layer2_bonded/go/go.mod b/examples/metal/port/layer2_bonded/go/go.mod deleted file mode 100644 index 7808d9e6..00000000 --- a/examples/metal/port/layer2_bonded/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-port - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/port/layer2_bonded/go/main.go b/examples/metal/port/layer2_bonded/go/main.go deleted file mode 100644 index 9a176363..00000000 --- a/examples/metal/port/layer2_bonded/go/main.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - portId := cfg.Require("portId") - port, err := metal.NewPort(ctx, "port", &metal.PortArgs{ - PortId: pulumi.String(portId), - Bonded: pulumi.Bool(true), - Layer2: pulumi.Bool(true), - }) - if err != nil { - return err - } - ctx.Export("portType", port.Type) - ctx.Export("portBondedNetworkType", port.NetworkType) - return nil - }) -} diff --git a/examples/metal/port/layer2_bonded/java/.gitignore b/examples/metal/port/layer2_bonded/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/port/layer2_bonded/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/port/layer2_bonded/java/Pulumi.yaml b/examples/metal/port/layer2_bonded/java/Pulumi.yaml deleted file mode 100644 index d5dd45a5..00000000 --- a/examples/metal/port/layer2_bonded/java/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: java -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/layer2_bonded/java/pom.xml b/examples/metal/port/layer2_bonded/java/pom.xml deleted file mode 100644 index ad8a5d76..00000000 --- a/examples/metal/port/layer2_bonded/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-port - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/port/layer2_bonded/java/src/main/java/generated_program/App.java b/examples/metal/port/layer2_bonded/java/src/main/java/generated_program/App.java deleted file mode 100644 index 3549e0cd..00000000 --- a/examples/metal/port/layer2_bonded/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,32 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.metal.Port; -import com.equinix.pulumi.metal.PortArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var portId = config.get("portId").get(); - var port = new Port("port", PortArgs.builder() - .portId(portId) - .bonded(true) - .layer2(true) - .build()); - - ctx.export("portType", port.type()); - ctx.export("portBondedNetworkType", port.networkType()); - } -} diff --git a/examples/metal/port/layer2_bonded/python/Pulumi.yaml b/examples/metal/port/layer2_bonded/python/Pulumi.yaml deleted file mode 100644 index d081d39e..00000000 --- a/examples/metal/port/layer2_bonded/python/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: python -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/layer2_bonded/python/__main__.py b/examples/metal/port/layer2_bonded/python/__main__.py deleted file mode 100644 index d0b9b360..00000000 --- a/examples/metal/port/layer2_bonded/python/__main__.py +++ /dev/null @@ -1,11 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -port_id = config.require("portId") -port = equinix.metal.Port("port", - port_id=port_id, - bonded=True, - layer2=True) -pulumi.export("portType", port["type"]) -pulumi.export("portBondedNetworkType", port["networkType"]) diff --git a/examples/metal/port/layer2_bonded/python/requirements.txt b/examples/metal/port/layer2_bonded/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/port/layer2_bonded/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/port/layer2_bonded/typescript/Pulumi.yaml b/examples/metal/port/layer2_bonded/typescript/Pulumi.yaml deleted file mode 100644 index 260b78aa..00000000 --- a/examples/metal/port/layer2_bonded/typescript/Pulumi.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: equinix-metal-port -runtime: nodejs -description: An Equinix Metal Port resource -config: - portId: - type: string diff --git a/examples/metal/port/layer2_bonded/typescript/index.ts b/examples/metal/port/layer2_bonded/typescript/index.ts deleted file mode 100644 index 976e4589..00000000 --- a/examples/metal/port/layer2_bonded/typescript/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const portId = config.require("portId"); -const port = new equinix.metal.Port("port", { - portId: portId, - bonded: true, - layer2: true, -}); -export const portType = port.type; -export const portBondedNetworkType = port.networkType; diff --git a/examples/metal/port/layer2_bonded/typescript/package.json b/examples/metal/port/layer2_bonded/typescript/package.json deleted file mode 100644 index 3fb0f97d..00000000 --- a/examples/metal/port/layer2_bonded/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-port", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/port/layer2_bonded/typescript/tsconfig.json b/examples/metal/port/layer2_bonded/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/port/layer2_bonded/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/port/layer2_bonded/yaml/Pulumi.yaml b/examples/metal/port/layer2_bonded/yaml/Pulumi.yaml deleted file mode 100644 index 051729a6..00000000 --- a/examples/metal/port/layer2_bonded/yaml/Pulumi.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: equinix-metal-port -runtime: yaml -description: An Equinix Metal Port resource -config: - portId: - type: string -resources: - port: - type: equinix:metal:Port - properties: - portId: ${portId} - bonded: true - layer2: true -outputs: - portType: ${port.type} - portBondedNetworkType: ${port.networkType} diff --git a/examples/metal/port_vlan_attachment/csharp/Program.cs b/examples/metal/port_vlan_attachment/csharp/Program.cs deleted file mode 100644 index f7543cfc..00000000 --- a/examples/metal/port_vlan_attachment/csharp/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var deviceId = config.Require("deviceId"); - var portName = config.Get("portName") ?? "eth1"; - var vxlanId = config.GetNumber("vxlanId") ?? 1004; - var attach = new Equinix.Metal.PortVlanAttachment("attach", new() - { - DeviceId = deviceId, - PortName = portName, - VlanVnid = vxlanId, - }); - - return new Dictionary - { - ["attachId"] = attach.Id, - ["portId"] = attach.PortId, - }; -}); - diff --git a/examples/metal/port_vlan_attachment/csharp/Pulumi.yaml b/examples/metal/port_vlan_attachment/csharp/Pulumi.yaml deleted file mode 100644 index cd0f7d50..00000000 --- a/examples/metal/port_vlan_attachment/csharp/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-port-vlan-attachment -runtime: dotnet -description: An Equinix Metal Port Vlan Attachment resource to attach device ports to VLANs -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 diff --git a/examples/metal/port_vlan_attachment/csharp/equinix-metal-port-attachment.csproj b/examples/metal/port_vlan_attachment/csharp/equinix-metal-port-attachment.csproj deleted file mode 100644 index 8bca4b15..00000000 --- a/examples/metal/port_vlan_attachment/csharp/equinix-metal-port-attachment.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/csharp/equinix-metal-port-vlan-attachment.csproj b/examples/metal/port_vlan_attachment/csharp/equinix-metal-port-vlan-attachment.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/port_vlan_attachment/csharp/equinix-metal-port-vlan-attachment.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example.md b/examples/metal/port_vlan_attachment/example.md deleted file mode 100644 index a7f1f3b4..00000000 --- a/examples/metal/port_vlan_attachment/example.md +++ /dev/null @@ -1,177 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const portName = config.get("portName") || "eth1"; -const vxlanId = config.getNumber("vxlanId") || 1004; -const attach = new equinix.metal.PortVlanAttachment("attach", { - deviceId: deviceId, - portName: portName, - vlanVnid: vxlanId, -}); -export const attachId = attach.id; -export const portId = attach.portId; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -device_id = config.require("deviceId") -port_name = config.get("portName") -if port_name is None: - port_name = "eth1" -vxlan_id = config.get_int("vxlanId") -if vxlan_id is None: - vxlan_id = 1004 -attach = equinix.metal.PortVlanAttachment("attach", - device_id=device_id, - port_name=port_name, - vlan_vnid=vxlan_id) -pulumi.export("attachId", attach.id) -pulumi.export("portId", attach.port_id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - portName := "eth1" - if param := cfg.Get("portName"); param != "" { - portName = param - } - vxlanId := 1004 - if param := cfg.GetInt("vxlanId"); param != 0 { - vxlanId = param - } - attach, err := metal.NewPortVlanAttachment(ctx, "attach", &metal.PortVlanAttachmentArgs{ - DeviceId: pulumi.String(deviceId), - PortName: pulumi.String(portName), - VlanVnid: pulumi.Int(vxlanId), - }) - if err != nil { - return err - } - ctx.Export("attachId", attach.ID()) - ctx.Export("portId", attach.PortId) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var deviceId = config.Require("deviceId"); - var portName = config.Get("portName") ?? "eth1"; - var vxlanId = config.GetNumber("vxlanId") ?? 1004; - var attach = new Equinix.Metal.PortVlanAttachment("attach", new() - { - DeviceId = deviceId, - PortName = portName, - VlanVnid = vxlanId, - }); - - return new Dictionary - { - ["attachId"] = attach.Id, - ["portId"] = attach.PortId, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.PortVlanAttachment; -import com.equinix.pulumi.metal.PortVlanAttachmentArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - final var portName = config.get("portName").orElse("eth1"); - final var vxlanId = Integer.parseInt(config.get("vxlanId").orElse("1004")); - - var attach = new PortVlanAttachment("attach", PortVlanAttachmentArgs.builder() - .deviceId(deviceId) - .portName(portName) - .vlanVnid(vxlanId) - .build()); - - ctx.export("attachId", attach.id()); - ctx.export("portId", attach.portId()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 -resources: - attach: - type: equinix:metal:PortVlanAttachment - properties: - deviceId: ${deviceId} - portName: ${portName} - vlanVnid: ${vxlanId} -outputs: - attachId: ${attach.id} - portId: ${attach.portId} -``` - -{{% /choosable %}} diff --git a/examples/metal/port_vlan_attachment/example_1/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_1/Pulumi.yaml new file mode 100644 index 00000000..b51cdff5 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/Pulumi.yaml @@ -0,0 +1,32 @@ +name: equinix-metal-port_vlan_attachment-example_1 +runtime: yaml +resources: + test: + type: equinix:metal:Vlan + properties: + description: VLAN in New York + metro: ny + projectId: ${projectId} + testDevice: + type: equinix:metal:Device + name: test + properties: + hostname: test + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + testDeviceNetworkType: + type: equinix:metal:DeviceNetworkType + name: test + properties: + deviceId: ${testDevice.id} + type: hybrid + testPortVlanAttachment: + type: equinix:metal:PortVlanAttachment + name: test + properties: + deviceId: ${testDeviceNetworkType.id} + portName: eth1 + vlanVnid: ${test.vxlan} diff --git a/examples/metal/port_vlan_attachment/example_1/csharp/.gitignore b/examples/metal/port_vlan_attachment/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/port_vlan_attachment/example_1/csharp/Program.cs b/examples/metal/port_vlan_attachment/example_1/csharp/Program.cs new file mode 100644 index 00000000..4507b02f --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/csharp/Program.cs @@ -0,0 +1,39 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var test = new Equinix.Metal.Vlan("test", new() + { + Description = "VLAN in New York", + Metro = "ny", + ProjectId = projectId, + }); + + var testDevice = new Equinix.Metal.Device("testDevice", new() + { + Hostname = "test", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }); + + var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new() + { + DeviceId = testDevice.Id, + Type = "hybrid", + }); + + var testPortVlanAttachment = new Equinix.Metal.PortVlanAttachment("testPortVlanAttachment", new() + { + DeviceId = testDeviceNetworkType.Id, + PortName = "eth1", + VlanVnid = test.Vxlan, + }); + +}); + diff --git a/examples/metal/port_vlan_attachment/example_1/csharp/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..a4c4f8c5 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_1 +runtime: dotnet diff --git a/examples/metal/port_vlan_attachment/example_1/csharp/equinix-metal-port_vlan_attachment-example_1.csproj b/examples/metal/port_vlan_attachment/example_1/csharp/equinix-metal-port_vlan_attachment-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/csharp/equinix-metal-port_vlan_attachment-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_1/go/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..6ac6a30a --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_1 +runtime: go diff --git a/examples/metal/port_vlan_attachment/example_1/go/go.mod b/examples/metal/port_vlan_attachment/example_1/go/go.mod new file mode 100644 index 00000000..6828f0f5 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-port_vlan_attachment-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/port_vlan_attachment/example_1/go/main.go b/examples/metal/port_vlan_attachment/example_1/go/main.go new file mode 100644 index 00000000..4366ef17 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/go/main.go @@ -0,0 +1,46 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New York"), + Metro: pulumi.String("ny"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + testDevice, err := metal.NewDevice(ctx, "testDevice", &metal.DeviceArgs{ + Hostname: pulumi.String("test"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{ + DeviceId: testDevice.ID(), + Type: pulumi.String("hybrid"), + }) + if err != nil { + return err + } + _, err = metal.NewPortVlanAttachment(ctx, "testPortVlanAttachment", &metal.PortVlanAttachmentArgs{ + DeviceId: testDeviceNetworkType.ID(), + PortName: pulumi.String("eth1"), + VlanVnid: test.Vxlan, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/port_vlan_attachment/example_1/java/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..0224fa1d --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_1 +runtime: java diff --git a/examples/metal/port_vlan_attachment/example_1/java/pom.xml b/examples/metal/port_vlan_attachment/example_1/java/pom.xml new file mode 100644 index 00000000..661e99a8 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-port_vlan_attachment-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_1/java/src/main/java/generated_program/App.java b/examples/metal/port_vlan_attachment/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..c4fd246a --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,54 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.DeviceNetworkType; +import com.pulumi.equinix.metal.DeviceNetworkTypeArgs; +import com.pulumi.equinix.metal.PortVlanAttachment; +import com.pulumi.equinix.metal.PortVlanAttachmentArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var test = new Vlan("test", VlanArgs.builder() + .description("VLAN in New York") + .metro("ny") + .projectId(projectId) + .build()); + + var testDevice = new Device("testDevice", DeviceArgs.builder() + .hostname("test") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder() + .deviceId(testDevice.id()) + .type("hybrid") + .build()); + + var testPortVlanAttachment = new PortVlanAttachment("testPortVlanAttachment", PortVlanAttachmentArgs.builder() + .deviceId(testDeviceNetworkType.id()) + .portName("eth1") + .vlanVnid(test.vxlan()) + .build()); + + } +} diff --git a/examples/metal/port_vlan_attachment/example_1/python/.gitignore b/examples/metal/port_vlan_attachment/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_1/python/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..a1902ab1 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_1 +runtime: python diff --git a/examples/metal/port_vlan_attachment/example_1/python/__main__.py b/examples/metal/port_vlan_attachment/example_1/python/__main__.py new file mode 100644 index 00000000..281a30f5 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/python/__main__.py @@ -0,0 +1,21 @@ +import pulumi +import pulumi_equinix as equinix + +test = equinix.metal.Vlan("test", + description="VLAN in New York", + metro="ny", + project_id=project_id) +test_device = equinix.metal.Device("testDevice", + hostname="test", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id) +test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType", + device_id=test_device.id, + type="hybrid") +test_port_vlan_attachment = equinix.metal.PortVlanAttachment("testPortVlanAttachment", + device_id=test_device_network_type.id, + port_name="eth1", + vlan_vnid=test.vxlan) diff --git a/examples/metal/port_vlan_attachment/example_1/python/requirements.txt b/examples/metal/port_vlan_attachment/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/port_vlan_attachment/example_1/typescript/.gitignore b/examples/metal/port_vlan_attachment/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_1/typescript/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..c0ccdbfb --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_1 +runtime: nodejs diff --git a/examples/metal/port_vlan_attachment/example_1/typescript/index.ts b/examples/metal/port_vlan_attachment/example_1/typescript/index.ts new file mode 100644 index 00000000..a36d317f --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/typescript/index.ts @@ -0,0 +1,25 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const test = new equinix.metal.Vlan("test", { + description: "VLAN in New York", + metro: "ny", + projectId: projectId, +}); +const testDevice = new equinix.metal.Device("testDevice", { + hostname: "test", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}); +const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", { + deviceId: testDevice.id, + type: "hybrid", +}); +const testPortVlanAttachment = new equinix.metal.PortVlanAttachment("testPortVlanAttachment", { + deviceId: testDeviceNetworkType.id, + portName: "eth1", + vlanVnid: test.vxlan, +}); diff --git a/examples/metal/port_vlan_attachment/example_1/typescript/package.json b/examples/metal/port_vlan_attachment/example_1/typescript/package.json new file mode 100644 index 00000000..81a12b69 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-port_vlan_attachment-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_1/typescript/tsconfig.json b/examples/metal/port_vlan_attachment/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_2/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_2/Pulumi.yaml new file mode 100644 index 00000000..7d214473 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/Pulumi.yaml @@ -0,0 +1,48 @@ +name: equinix-metal-port_vlan_attachment-example_2 +runtime: yaml +resources: + test: + type: equinix:metal:Device + properties: + hostname: test + plan: c3.small.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + testDeviceNetworkType: + type: equinix:metal:DeviceNetworkType + name: test + properties: + deviceId: ${test.id} + type: layer2-individual + test1: + type: equinix:metal:Vlan + properties: + description: VLAN in New York + metro: ny + projectId: ${projectId} + test2: + type: equinix:metal:Vlan + properties: + description: VLAN in New Jersey + metro: ny + projectId: ${projectId} + test1PortVlanAttachment: + type: equinix:metal:PortVlanAttachment + name: test1 + properties: + deviceId: ${testDeviceNetworkType.id} + vlanVnid: ${test1.vxlan} + portName: eth1 + test2PortVlanAttachment: + type: equinix:metal:PortVlanAttachment + name: test2 + properties: + deviceId: ${testDeviceNetworkType.id} + vlanVnid: ${test2.vxlan} + portName: eth1 + native: true + options: + dependson: + - ${test1PortVlanAttachment} diff --git a/examples/metal/port_vlan_attachment/example_2/csharp/.gitignore b/examples/metal/port_vlan_attachment/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/port_vlan_attachment/example_2/csharp/Program.cs b/examples/metal/port_vlan_attachment/example_2/csharp/Program.cs new file mode 100644 index 00000000..4405636e --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/csharp/Program.cs @@ -0,0 +1,60 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var test = new Equinix.Metal.Device("test", new() + { + Hostname = "test", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }); + + var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new() + { + DeviceId = test.Id, + Type = "layer2-individual", + }); + + var test1 = new Equinix.Metal.Vlan("test1", new() + { + Description = "VLAN in New York", + Metro = "ny", + ProjectId = projectId, + }); + + var test2 = new Equinix.Metal.Vlan("test2", new() + { + Description = "VLAN in New Jersey", + Metro = "ny", + ProjectId = projectId, + }); + + var test1PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test1PortVlanAttachment", new() + { + DeviceId = testDeviceNetworkType.Id, + VlanVnid = test1.Vxlan, + PortName = "eth1", + }); + + var test2PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test2PortVlanAttachment", new() + { + DeviceId = testDeviceNetworkType.Id, + VlanVnid = test2.Vxlan, + PortName = "eth1", + Native = true, + }, new CustomResourceOptions + { + DependsOn = + { + test1PortVlanAttachment, + }, + }); + +}); + diff --git a/examples/metal/port_vlan_attachment/example_2/csharp/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..39f92ffc --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_2 +runtime: dotnet diff --git a/examples/metal/port_vlan_attachment/example_2/csharp/equinix-metal-port_vlan_attachment-example_2.csproj b/examples/metal/port_vlan_attachment/example_2/csharp/equinix-metal-port_vlan_attachment-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/csharp/equinix-metal-port_vlan_attachment-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_2/go/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..18f41ea9 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_2 +runtime: go diff --git a/examples/metal/port_vlan_attachment/example_2/go/go.mod b/examples/metal/port_vlan_attachment/example_2/go/go.mod new file mode 100644 index 00000000..fb132c5a --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-port_vlan_attachment-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/port_vlan_attachment/example_2/go/main.go b/examples/metal/port_vlan_attachment/example_2/go/main.go new file mode 100644 index 00000000..c36b5292 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/go/main.go @@ -0,0 +1,65 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + test, err := metal.NewDevice(ctx, "test", &metal.DeviceArgs{ + Hostname: pulumi.String("test"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{ + DeviceId: test.ID(), + Type: pulumi.String("layer2-individual"), + }) + if err != nil { + return err + } + test1, err := metal.NewVlan(ctx, "test1", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New York"), + Metro: pulumi.String("ny"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + test2, err := metal.NewVlan(ctx, "test2", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New Jersey"), + Metro: pulumi.String("ny"), + ProjectId: pulumi.Any(projectId), + }) + if err != nil { + return err + } + test1PortVlanAttachment, err := metal.NewPortVlanAttachment(ctx, "test1PortVlanAttachment", &metal.PortVlanAttachmentArgs{ + DeviceId: testDeviceNetworkType.ID(), + VlanVnid: test1.Vxlan, + PortName: pulumi.String("eth1"), + }) + if err != nil { + return err + } + _, err = metal.NewPortVlanAttachment(ctx, "test2PortVlanAttachment", &metal.PortVlanAttachmentArgs{ + DeviceId: testDeviceNetworkType.ID(), + VlanVnid: test2.Vxlan, + PortName: pulumi.String("eth1"), + Native: pulumi.Bool(true), + }, pulumi.DependsOn([]pulumi.Resource{ + test1PortVlanAttachment, + })) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/port_vlan_attachment/example_2/java/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..02f9f8e8 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_2 +runtime: java diff --git a/examples/metal/port_vlan_attachment/example_2/java/pom.xml b/examples/metal/port_vlan_attachment/example_2/java/pom.xml new file mode 100644 index 00000000..148a6bfa --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-port_vlan_attachment-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_2/java/src/main/java/generated_program/App.java b/examples/metal/port_vlan_attachment/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..dcf2aac1 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,70 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.DeviceNetworkType; +import com.pulumi.equinix.metal.DeviceNetworkTypeArgs; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.PortVlanAttachment; +import com.pulumi.equinix.metal.PortVlanAttachmentArgs; +import com.pulumi.resources.CustomResourceOptions; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var test = new Device("test", DeviceArgs.builder() + .hostname("test") + .plan("c3.small.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build()); + + var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder() + .deviceId(test.id()) + .type("layer2-individual") + .build()); + + var test1 = new Vlan("test1", VlanArgs.builder() + .description("VLAN in New York") + .metro("ny") + .projectId(projectId) + .build()); + + var test2 = new Vlan("test2", VlanArgs.builder() + .description("VLAN in New Jersey") + .metro("ny") + .projectId(projectId) + .build()); + + var test1PortVlanAttachment = new PortVlanAttachment("test1PortVlanAttachment", PortVlanAttachmentArgs.builder() + .deviceId(testDeviceNetworkType.id()) + .vlanVnid(test1.vxlan()) + .portName("eth1") + .build()); + + var test2PortVlanAttachment = new PortVlanAttachment("test2PortVlanAttachment", PortVlanAttachmentArgs.builder() + .deviceId(testDeviceNetworkType.id()) + .vlanVnid(test2.vxlan()) + .portName("eth1") + .native_(true) + .build(), CustomResourceOptions.builder() + .dependsOn(test1PortVlanAttachment) + .build()); + + } +} diff --git a/examples/metal/port_vlan_attachment/example_2/python/.gitignore b/examples/metal/port_vlan_attachment/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_2/python/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..b1b8c0a4 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_2 +runtime: python diff --git a/examples/metal/port_vlan_attachment/example_2/python/__main__.py b/examples/metal/port_vlan_attachment/example_2/python/__main__.py new file mode 100644 index 00000000..6dc571f3 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/python/__main__.py @@ -0,0 +1,31 @@ +import pulumi +import pulumi_equinix as equinix + +test = equinix.metal.Device("test", + hostname="test", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id) +test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType", + device_id=test.id, + type="layer2-individual") +test1 = equinix.metal.Vlan("test1", + description="VLAN in New York", + metro="ny", + project_id=project_id) +test2 = equinix.metal.Vlan("test2", + description="VLAN in New Jersey", + metro="ny", + project_id=project_id) +test1_port_vlan_attachment = equinix.metal.PortVlanAttachment("test1PortVlanAttachment", + device_id=test_device_network_type.id, + vlan_vnid=test1.vxlan, + port_name="eth1") +test2_port_vlan_attachment = equinix.metal.PortVlanAttachment("test2PortVlanAttachment", + device_id=test_device_network_type.id, + vlan_vnid=test2.vxlan, + port_name="eth1", + native=True, + opts = pulumi.ResourceOptions(depends_on=[test1_port_vlan_attachment])) diff --git a/examples/metal/port_vlan_attachment/example_2/python/requirements.txt b/examples/metal/port_vlan_attachment/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/port_vlan_attachment/example_2/typescript/.gitignore b/examples/metal/port_vlan_attachment/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_2/typescript/Pulumi.yaml b/examples/metal/port_vlan_attachment/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..a7237367 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-port_vlan_attachment-example_2 +runtime: nodejs diff --git a/examples/metal/port_vlan_attachment/example_2/typescript/index.ts b/examples/metal/port_vlan_attachment/example_2/typescript/index.ts new file mode 100644 index 00000000..dc5f79b6 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/typescript/index.ts @@ -0,0 +1,38 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const test = new equinix.metal.Device("test", { + hostname: "test", + plan: equinix.metal.Plan.C3SmallX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}); +const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", { + deviceId: test.id, + type: "layer2-individual", +}); +const test1 = new equinix.metal.Vlan("test1", { + description: "VLAN in New York", + metro: "ny", + projectId: projectId, +}); +const test2 = new equinix.metal.Vlan("test2", { + description: "VLAN in New Jersey", + metro: "ny", + projectId: projectId, +}); +const test1PortVlanAttachment = new equinix.metal.PortVlanAttachment("test1PortVlanAttachment", { + deviceId: testDeviceNetworkType.id, + vlanVnid: test1.vxlan, + portName: "eth1", +}); +const test2PortVlanAttachment = new equinix.metal.PortVlanAttachment("test2PortVlanAttachment", { + deviceId: testDeviceNetworkType.id, + vlanVnid: test2.vxlan, + portName: "eth1", + native: true, +}, { + dependsOn: [test1PortVlanAttachment], +}); diff --git a/examples/metal/port_vlan_attachment/example_2/typescript/package.json b/examples/metal/port_vlan_attachment/example_2/typescript/package.json new file mode 100644 index 00000000..2529e039 --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-port_vlan_attachment-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/example_2/typescript/tsconfig.json b/examples/metal/port_vlan_attachment/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/port_vlan_attachment/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/go/Pulumi.yaml b/examples/metal/port_vlan_attachment/go/Pulumi.yaml deleted file mode 100644 index 6d3becb5..00000000 --- a/examples/metal/port_vlan_attachment/go/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-port-vlan-attachment -runtime: go -description: An Equinix Metal Port Vlan Attachment resource to attach device ports to VLANs -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 diff --git a/examples/metal/port_vlan_attachment/go/go.mod b/examples/metal/port_vlan_attachment/go/go.mod deleted file mode 100644 index db898f6c..00000000 --- a/examples/metal/port_vlan_attachment/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-port-vlan-attachment - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/port_vlan_attachment/go/main.go b/examples/metal/port_vlan_attachment/go/main.go deleted file mode 100644 index b952aea1..00000000 --- a/examples/metal/port_vlan_attachment/go/main.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - deviceId := cfg.Require("deviceId") - portName := "eth1" - if param := cfg.Get("portName"); param != "" { - portName = param - } - vxlanId := 1004 - if param := cfg.GetInt("vxlanId"); param != 0 { - vxlanId = param - } - attach, err := metal.NewPortVlanAttachment(ctx, "attach", &metal.PortVlanAttachmentArgs{ - DeviceId: pulumi.String(deviceId), - PortName: pulumi.String(portName), - VlanVnid: pulumi.Int(vxlanId), - }) - if err != nil { - return err - } - ctx.Export("attachId", attach.ID()) - ctx.Export("portId", attach.PortId) - return nil - }) -} diff --git a/examples/metal/port_vlan_attachment/java/.gitignore b/examples/metal/port_vlan_attachment/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/port_vlan_attachment/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/java/Pulumi.yaml b/examples/metal/port_vlan_attachment/java/Pulumi.yaml deleted file mode 100644 index 540866d6..00000000 --- a/examples/metal/port_vlan_attachment/java/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-port-vlan-attachment -runtime: java -description: An Equinix Metal Port Vlan Attachment resource to attach device ports to VLANs -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 diff --git a/examples/metal/port_vlan_attachment/java/pom.xml b/examples/metal/port_vlan_attachment/java/pom.xml deleted file mode 100644 index 998593e0..00000000 --- a/examples/metal/port_vlan_attachment/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-port-vlan-attachment - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/java/src/main/java/generated_program/App.java b/examples/metal/port_vlan_attachment/java/src/main/java/generated_program/App.java deleted file mode 100644 index b63c1d78..00000000 --- a/examples/metal/port_vlan_attachment/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,28 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.PortVlanAttachment; -import com.equinix.pulumi.metal.PortVlanAttachmentArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var deviceId = config.get("deviceId").get(); - final var portName = config.get("portName").orElse("eth1"); - final var vxlanId = Integer.parseInt(config.get("vxlanId").orElse("1004")); - - var attach = new PortVlanAttachment("attach", PortVlanAttachmentArgs.builder() - .deviceId(deviceId) - .portName(portName) - .vlanVnid(vxlanId) - .build()); - - ctx.export("attachId", attach.id()); - ctx.export("portId", attach.portId()); - } -} diff --git a/examples/metal/port_vlan_attachment/python/Pulumi.yaml b/examples/metal/port_vlan_attachment/python/Pulumi.yaml deleted file mode 100644 index b710e160..00000000 --- a/examples/metal/port_vlan_attachment/python/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-port-vlan-attachment -runtime: python -description: An Equinix Metal Port Vlan Attachment resource to attach device ports to VLANs -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 diff --git a/examples/metal/port_vlan_attachment/python/__main__.py b/examples/metal/port_vlan_attachment/python/__main__.py deleted file mode 100644 index 0bad2901..00000000 --- a/examples/metal/port_vlan_attachment/python/__main__.py +++ /dev/null @@ -1,17 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -device_id = config.require("deviceId") -port_name = config.get("portName") -if port_name is None: - port_name = "eth1" -vxlan_id = config.get_int("vxlanId") -if vxlan_id is None: - vxlan_id = 1004 -attach = equinix.metal.PortVlanAttachment("attach", - device_id=device_id, - port_name=port_name, - vlan_vnid=vxlan_id) -pulumi.export("attachId", attach.id) -pulumi.export("portId", attach.port_id) diff --git a/examples/metal/port_vlan_attachment/python/requirements.txt b/examples/metal/port_vlan_attachment/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/port_vlan_attachment/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/port_vlan_attachment/typescript/Pulumi.yaml b/examples/metal/port_vlan_attachment/typescript/Pulumi.yaml deleted file mode 100644 index 6e1e86ad..00000000 --- a/examples/metal/port_vlan_attachment/typescript/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-port-vlan-attachment -runtime: nodejs -description: An Equinix Metal Port Vlan Attachment resource to attach device ports to VLANs -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 diff --git a/examples/metal/port_vlan_attachment/typescript/index.ts b/examples/metal/port_vlan_attachment/typescript/index.ts deleted file mode 100644 index 1af49776..00000000 --- a/examples/metal/port_vlan_attachment/typescript/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const deviceId = config.require("deviceId"); -const portName = config.get("portName") || "eth1"; -const vxlanId = config.getNumber("vxlanId") || 1004; -const attach = new equinix.metal.PortVlanAttachment("attach", { - deviceId: deviceId, - portName: portName, - vlanVnid: vxlanId, -}); -export const attachId = attach.id; -export const portId = attach.portId; diff --git a/examples/metal/port_vlan_attachment/typescript/package.json b/examples/metal/port_vlan_attachment/typescript/package.json deleted file mode 100644 index 2e4c4baa..00000000 --- a/examples/metal/port_vlan_attachment/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-port-vlan-attachment", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/typescript/tsconfig.json b/examples/metal/port_vlan_attachment/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/port_vlan_attachment/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/port_vlan_attachment/yaml/Pulumi.yaml b/examples/metal/port_vlan_attachment/yaml/Pulumi.yaml deleted file mode 100644 index 51939fb1..00000000 --- a/examples/metal/port_vlan_attachment/yaml/Pulumi.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: equinix-metal-port-vlan-attachment -runtime: yaml -description: An Equinix Metal Port Vlan Attachment resource to attach device ports to VLANs -config: - deviceId: - type: string - portName: - type: string - default: eth1 - vxlanId: - type: integer - default: 1004 -resources: - attach: - type: equinix:metal:PortVlanAttachment - properties: - deviceId: ${deviceId} - portName: ${portName} - vlanVnid: ${vxlanId} -outputs: - attachId: ${attach.id} - portId: ${attach.portId} diff --git a/examples/metal/project/csharp/Program.cs b/examples/metal/project/csharp/Program.cs deleted file mode 100644 index 2b9db09d..00000000 --- a/examples/metal/project/csharp/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var organizationId = config.Require("organizationId"); - var name = config.Get("name") ?? "Default Project"; - var projectResource = new Equinix.Metal.Project("project", new() - { - Name = name, - OrganizationId = organizationId, - }); - - return new Dictionary - { - ["projectId"] = projectResource.Id, - }; -}); - diff --git a/examples/metal/project/csharp/Pulumi.yaml b/examples/metal/project/csharp/Pulumi.yaml deleted file mode 100644 index d36405bf..00000000 --- a/examples/metal/project/csharp/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-project -runtime: dotnet -description: An Equinix Metal Project resource -config: - name: - type: string - default: Default Project - organizationId: - type: string diff --git a/examples/metal/project/csharp/equinix-metal-project.csproj b/examples/metal/project/csharp/equinix-metal-project.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/project/csharp/equinix-metal-project.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/project/example.md b/examples/metal/project/example.md deleted file mode 100644 index edb18490..00000000 --- a/examples/metal/project/example.md +++ /dev/null @@ -1,151 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const organizationId = config.require("organizationId"); -const name = config.get("name") || "Default Project"; -const projectResource = new equinix.metal.Project("project", { - name: name, - organizationId: organizationId, -}); -export const projectId = projectResource.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -organization_id = config.require("organizationId") -name = config.get("name") -if name is None: - name = "Default Project" -project_resource = equinix.metal.Project("project", - name=name, - organization_id=organization_id) -pulumi.export("projectId", project_resource.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - organizationId := cfg.Require("organizationId") - name := "Default Project" - if param := cfg.Get("name"); param != "" { - name = param - } - projectResource, err := metal.NewProject(ctx, "project", &metal.ProjectArgs{ - Name: pulumi.String(name), - OrganizationId: pulumi.String(organizationId), - }) - if err != nil { - return err - } - ctx.Export("projectId", projectResource.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var organizationId = config.Require("organizationId"); - var name = config.Get("name") ?? "Default Project"; - var projectResource = new Equinix.Metal.Project("project", new() - { - Name = name, - OrganizationId = organizationId, - }); - - return new Dictionary - { - ["projectId"] = projectResource.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Project; -import com.equinix.pulumi.metal.ProjectArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var organizationId = config.get("organizationId").get(); - final var name = config.get("name").orElse("Default Project"); - var projectResource = new Project("projectResource", ProjectArgs.builder() - .name(name) - .organizationId(organizationId) - .build()); - - ctx.export("projectId", projectResource.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - organizationId: - type: string - name: - type: string - default: Default Project -resources: - project: - type: equinix:metal:Project - properties: - name: ${name} - organizationId: ${organizationId} -outputs: - projectId: ${project.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/project/example_1/Pulumi.yaml b/examples/metal/project/example_1/Pulumi.yaml new file mode 100644 index 00000000..b89941ad --- /dev/null +++ b/examples/metal/project/example_1/Pulumi.yaml @@ -0,0 +1,8 @@ +name: equinix-metal-project-example_1 +runtime: yaml +resources: + tfProject1: + type: equinix:metal:Project + name: tf_project_1 + properties: + name: Terraform Fun diff --git a/examples/metal/project/example_1/csharp/.gitignore b/examples/metal/project/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/project/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/project/example_1/csharp/Program.cs b/examples/metal/project/example_1/csharp/Program.cs new file mode 100644 index 00000000..88bd005f --- /dev/null +++ b/examples/metal/project/example_1/csharp/Program.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var tfProject1 = new Equinix.Metal.Project("tfProject1", new() + { + Name = "Terraform Fun", + }); + +}); + diff --git a/examples/metal/project/example_1/csharp/Pulumi.yaml b/examples/metal/project/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..b3c13eef --- /dev/null +++ b/examples/metal/project/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_1 +runtime: dotnet diff --git a/examples/metal/project/example_1/csharp/equinix-metal-project-example_1.csproj b/examples/metal/project/example_1/csharp/equinix-metal-project-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/project/example_1/csharp/equinix-metal-project-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/project/example_1/go/Pulumi.yaml b/examples/metal/project/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..97a91e27 --- /dev/null +++ b/examples/metal/project/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_1 +runtime: go diff --git a/examples/metal/project/example_1/go/go.mod b/examples/metal/project/example_1/go/go.mod new file mode 100644 index 00000000..74b1c3cf --- /dev/null +++ b/examples/metal/project/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-project-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/project/example_1/go/main.go b/examples/metal/project/example_1/go/main.go new file mode 100644 index 00000000..72cb5a2a --- /dev/null +++ b/examples/metal/project/example_1/go/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewProject(ctx, "tfProject1", &metal.ProjectArgs{ + Name: pulumi.String("Terraform Fun"), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/project/example_1/java/Pulumi.yaml b/examples/metal/project/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..c1bad94f --- /dev/null +++ b/examples/metal/project/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_1 +runtime: java diff --git a/examples/metal/project/example_1/java/pom.xml b/examples/metal/project/example_1/java/pom.xml new file mode 100644 index 00000000..f2a41c6a --- /dev/null +++ b/examples/metal/project/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-project-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/project/example_1/java/src/main/java/generated_program/App.java b/examples/metal/project/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..fe45db60 --- /dev/null +++ b/examples/metal/project/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,26 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var tfProject1 = new Project("tfProject1", ProjectArgs.builder() + .name("Terraform Fun") + .build()); + + } +} diff --git a/examples/metal/project/example_1/python/.gitignore b/examples/metal/project/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/project/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/project/example_1/python/Pulumi.yaml b/examples/metal/project/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..666330bb --- /dev/null +++ b/examples/metal/project/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_1 +runtime: python diff --git a/examples/metal/project/example_1/python/__main__.py b/examples/metal/project/example_1/python/__main__.py new file mode 100644 index 00000000..86026b44 --- /dev/null +++ b/examples/metal/project/example_1/python/__main__.py @@ -0,0 +1,4 @@ +import pulumi +import pulumi_equinix as equinix + +tf_project1 = equinix.metal.Project("tfProject1", name="Terraform Fun") diff --git a/examples/metal/project/example_1/python/requirements.txt b/examples/metal/project/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/project/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/project/example_1/typescript/.gitignore b/examples/metal/project/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/project/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/project/example_1/typescript/Pulumi.yaml b/examples/metal/project/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..e94e3a65 --- /dev/null +++ b/examples/metal/project/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_1 +runtime: nodejs diff --git a/examples/metal/project/example_1/typescript/index.ts b/examples/metal/project/example_1/typescript/index.ts new file mode 100644 index 00000000..ed7a79a4 --- /dev/null +++ b/examples/metal/project/example_1/typescript/index.ts @@ -0,0 +1,4 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const tfProject1 = new equinix.metal.Project("tfProject1", {name: "Terraform Fun"}); diff --git a/examples/metal/project/example_1/typescript/package.json b/examples/metal/project/example_1/typescript/package.json new file mode 100644 index 00000000..8bb6e034 --- /dev/null +++ b/examples/metal/project/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-project-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/project/example_1/typescript/tsconfig.json b/examples/metal/project/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/project/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/project/example_2/Pulumi.yaml b/examples/metal/project/example_2/Pulumi.yaml new file mode 100644 index 00000000..b0aef135 --- /dev/null +++ b/examples/metal/project/example_2/Pulumi.yaml @@ -0,0 +1,13 @@ +name: equinix-metal-project-example_2 +runtime: yaml +resources: + # Create a new Project + tfProject1: + type: equinix:metal:Project + name: tf_project_1 + properties: + name: tftest + bgpConfig: + deploymentType: local + md5: C179c28c41a85b + asn: 65000 diff --git a/examples/metal/project/example_2/csharp/.gitignore b/examples/metal/project/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/project/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/project/example_2/csharp/Program.cs b/examples/metal/project/example_2/csharp/Program.cs new file mode 100644 index 00000000..2088e892 --- /dev/null +++ b/examples/metal/project/example_2/csharp/Program.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var tfProject1 = new Equinix.Metal.Project("tfProject1", new() + { + Name = "tftest", + BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs + { + DeploymentType = "local", + Md5 = "C179c28c41a85b", + Asn = 65000, + }, + }); + +}); + diff --git a/examples/metal/project/example_2/csharp/Pulumi.yaml b/examples/metal/project/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..9bda6bc9 --- /dev/null +++ b/examples/metal/project/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_2 +runtime: dotnet diff --git a/examples/metal/project/example_2/csharp/equinix-metal-project-example_2.csproj b/examples/metal/project/example_2/csharp/equinix-metal-project-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/project/example_2/csharp/equinix-metal-project-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/project/example_2/go/Pulumi.yaml b/examples/metal/project/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..2521b381 --- /dev/null +++ b/examples/metal/project/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_2 +runtime: go diff --git a/examples/metal/project/example_2/go/go.mod b/examples/metal/project/example_2/go/go.mod new file mode 100644 index 00000000..e6cf60f0 --- /dev/null +++ b/examples/metal/project/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-project-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/project/example_2/go/main.go b/examples/metal/project/example_2/go/main.go new file mode 100644 index 00000000..edb24d95 --- /dev/null +++ b/examples/metal/project/example_2/go/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewProject(ctx, "tfProject1", &metal.ProjectArgs{ + Name: pulumi.String("tftest"), + BgpConfig: &metal.ProjectBgpConfigArgs{ + DeploymentType: pulumi.String("local"), + Md5: pulumi.String("C179c28c41a85b"), + Asn: pulumi.Int(65000), + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/project/example_2/java/Pulumi.yaml b/examples/metal/project/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..afef641e --- /dev/null +++ b/examples/metal/project/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_2 +runtime: java diff --git a/examples/metal/project/example_2/java/pom.xml b/examples/metal/project/example_2/java/pom.xml new file mode 100644 index 00000000..51df2f71 --- /dev/null +++ b/examples/metal/project/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-project-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/project/example_2/java/src/main/java/generated_program/App.java b/examples/metal/project/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..713a729b --- /dev/null +++ b/examples/metal/project/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,32 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var tfProject1 = new Project("tfProject1", ProjectArgs.builder() + .name("tftest") + .bgpConfig(ProjectBgpConfigArgs.builder() + .deploymentType("local") + .md5("C179c28c41a85b") + .asn(65000) + .build()) + .build()); + + } +} diff --git a/examples/metal/project/example_2/python/.gitignore b/examples/metal/project/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/project/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/project/example_2/python/Pulumi.yaml b/examples/metal/project/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..5c29d8ca --- /dev/null +++ b/examples/metal/project/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_2 +runtime: python diff --git a/examples/metal/project/example_2/python/__main__.py b/examples/metal/project/example_2/python/__main__.py new file mode 100644 index 00000000..487d2e1e --- /dev/null +++ b/examples/metal/project/example_2/python/__main__.py @@ -0,0 +1,10 @@ +import pulumi +import pulumi_equinix as equinix + +tf_project1 = equinix.metal.Project("tfProject1", + name="tftest", + bgp_config=equinix.metal.ProjectBgpConfigArgs( + deployment_type="local", + md5="C179c28c41a85b", + asn=65000, + )) diff --git a/examples/metal/project/example_2/python/requirements.txt b/examples/metal/project/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/project/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/project/example_2/typescript/.gitignore b/examples/metal/project/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/project/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/project/example_2/typescript/Pulumi.yaml b/examples/metal/project/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..cd86454d --- /dev/null +++ b/examples/metal/project/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_2 +runtime: nodejs diff --git a/examples/metal/project/example_2/typescript/index.ts b/examples/metal/project/example_2/typescript/index.ts new file mode 100644 index 00000000..ff5bf36b --- /dev/null +++ b/examples/metal/project/example_2/typescript/index.ts @@ -0,0 +1,11 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const tfProject1 = new equinix.metal.Project("tfProject1", { + name: "tftest", + bgpConfig: { + deploymentType: "local", + md5: "C179c28c41a85b", + asn: 65000, + }, +}); diff --git a/examples/metal/project/example_2/typescript/package.json b/examples/metal/project/example_2/typescript/package.json new file mode 100644 index 00000000..7757daf9 --- /dev/null +++ b/examples/metal/project/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-project-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/project/example_2/typescript/tsconfig.json b/examples/metal/project/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/project/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/project/example_3/Pulumi.yaml b/examples/metal/project/example_3/Pulumi.yaml new file mode 100644 index 00000000..39d1e953 --- /dev/null +++ b/examples/metal/project/example_3/Pulumi.yaml @@ -0,0 +1,12 @@ +name: equinix-metal-project-example_3 +runtime: yaml +resources: + existingProject: + type: equinix:metal:Project + name: existing_project + properties: + name: The name of the project (if different, will rewrite) + bgpConfig: + deploymentType: local + md5: C179c28c41a85b + asn: 65000 diff --git a/examples/metal/project/example_3/csharp/.gitignore b/examples/metal/project/example_3/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/project/example_3/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/project/example_3/csharp/Program.cs b/examples/metal/project/example_3/csharp/Program.cs new file mode 100644 index 00000000..d5d1e08f --- /dev/null +++ b/examples/metal/project/example_3/csharp/Program.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var existingProject = new Equinix.Metal.Project("existingProject", new() + { + Name = "The name of the project (if different, will rewrite)", + BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs + { + DeploymentType = "local", + Md5 = "C179c28c41a85b", + Asn = 65000, + }, + }); + +}); + diff --git a/examples/metal/project/example_3/csharp/Pulumi.yaml b/examples/metal/project/example_3/csharp/Pulumi.yaml new file mode 100644 index 00000000..bb1764fd --- /dev/null +++ b/examples/metal/project/example_3/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_3 +runtime: dotnet diff --git a/examples/metal/project/example_3/csharp/equinix-metal-project-example_3.csproj b/examples/metal/project/example_3/csharp/equinix-metal-project-example_3.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/project/example_3/csharp/equinix-metal-project-example_3.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/project/example_3/go/Pulumi.yaml b/examples/metal/project/example_3/go/Pulumi.yaml new file mode 100644 index 00000000..dc9a2354 --- /dev/null +++ b/examples/metal/project/example_3/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_3 +runtime: go diff --git a/examples/metal/project/example_3/go/go.mod b/examples/metal/project/example_3/go/go.mod new file mode 100644 index 00000000..764f5bfd --- /dev/null +++ b/examples/metal/project/example_3/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-project-example_3 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/project/example_3/go/main.go b/examples/metal/project/example_3/go/main.go new file mode 100644 index 00000000..49b1f697 --- /dev/null +++ b/examples/metal/project/example_3/go/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewProject(ctx, "existingProject", &metal.ProjectArgs{ + Name: pulumi.String("The name of the project (if different, will rewrite)"), + BgpConfig: &metal.ProjectBgpConfigArgs{ + DeploymentType: pulumi.String("local"), + Md5: pulumi.String("C179c28c41a85b"), + Asn: pulumi.Int(65000), + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/project/example_3/java/Pulumi.yaml b/examples/metal/project/example_3/java/Pulumi.yaml new file mode 100644 index 00000000..cbc35a2f --- /dev/null +++ b/examples/metal/project/example_3/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_3 +runtime: java diff --git a/examples/metal/project/example_3/java/pom.xml b/examples/metal/project/example_3/java/pom.xml new file mode 100644 index 00000000..3a625397 --- /dev/null +++ b/examples/metal/project/example_3/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-project-example_3 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/project/example_3/java/src/main/java/generated_program/App.java b/examples/metal/project/example_3/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..596d9cf0 --- /dev/null +++ b/examples/metal/project/example_3/java/src/main/java/generated_program/App.java @@ -0,0 +1,32 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var existingProject = new Project("existingProject", ProjectArgs.builder() + .name("The name of the project (if different, will rewrite)") + .bgpConfig(ProjectBgpConfigArgs.builder() + .deploymentType("local") + .md5("C179c28c41a85b") + .asn(65000) + .build()) + .build()); + + } +} diff --git a/examples/metal/project/example_3/python/.gitignore b/examples/metal/project/example_3/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/project/example_3/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/project/example_3/python/Pulumi.yaml b/examples/metal/project/example_3/python/Pulumi.yaml new file mode 100644 index 00000000..d2c76758 --- /dev/null +++ b/examples/metal/project/example_3/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_3 +runtime: python diff --git a/examples/metal/project/example_3/python/__main__.py b/examples/metal/project/example_3/python/__main__.py new file mode 100644 index 00000000..26182c8d --- /dev/null +++ b/examples/metal/project/example_3/python/__main__.py @@ -0,0 +1,10 @@ +import pulumi +import pulumi_equinix as equinix + +existing_project = equinix.metal.Project("existingProject", + name="The name of the project (if different, will rewrite)", + bgp_config=equinix.metal.ProjectBgpConfigArgs( + deployment_type="local", + md5="C179c28c41a85b", + asn=65000, + )) diff --git a/examples/metal/project/example_3/python/requirements.txt b/examples/metal/project/example_3/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/project/example_3/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/project/example_3/typescript/.gitignore b/examples/metal/project/example_3/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/project/example_3/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/project/example_3/typescript/Pulumi.yaml b/examples/metal/project/example_3/typescript/Pulumi.yaml new file mode 100644 index 00000000..7b7cbdc7 --- /dev/null +++ b/examples/metal/project/example_3/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-project-example_3 +runtime: nodejs diff --git a/examples/metal/project/example_3/typescript/index.ts b/examples/metal/project/example_3/typescript/index.ts new file mode 100644 index 00000000..621c08a1 --- /dev/null +++ b/examples/metal/project/example_3/typescript/index.ts @@ -0,0 +1,11 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const existingProject = new equinix.metal.Project("existingProject", { + name: "The name of the project (if different, will rewrite)", + bgpConfig: { + deploymentType: "local", + md5: "C179c28c41a85b", + asn: 65000, + }, +}); diff --git a/examples/metal/project/example_3/typescript/package.json b/examples/metal/project/example_3/typescript/package.json new file mode 100644 index 00000000..a047c945 --- /dev/null +++ b/examples/metal/project/example_3/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-project-example_3", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/project/example_3/typescript/tsconfig.json b/examples/metal/project/example_3/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/project/example_3/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/project/go/Pulumi.yaml b/examples/metal/project/go/Pulumi.yaml deleted file mode 100644 index 3de4e89b..00000000 --- a/examples/metal/project/go/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-project -runtime: go -description: An Equinix Metal Project resource -config: - name: - type: string - default: Default Project - organizationId: - type: string diff --git a/examples/metal/project/go/go.mod b/examples/metal/project/go/go.mod deleted file mode 100644 index a71852c7..00000000 --- a/examples/metal/project/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-project - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/project/go/main.go b/examples/metal/project/go/main.go deleted file mode 100644 index 8ef4bb7a..00000000 --- a/examples/metal/project/go/main.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - organizationId := cfg.Require("organizationId") - name := "Default Project" - if param := cfg.Get("name"); param != "" { - name = param - } - projectResource, err := metal.NewProject(ctx, "project", &metal.ProjectArgs{ - Name: pulumi.String(name), - OrganizationId: pulumi.String(organizationId), - }) - if err != nil { - return err - } - ctx.Export("projectId", projectResource.ID()) - return nil - }) -} diff --git a/examples/metal/project/java/.gitignore b/examples/metal/project/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/project/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/project/java/Pulumi.yaml b/examples/metal/project/java/Pulumi.yaml deleted file mode 100644 index feaa541b..00000000 --- a/examples/metal/project/java/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-project -runtime: java -description: An Equinix Metal Project resource -config: - name: - type: string - default: Default Project - organizationId: - type: string diff --git a/examples/metal/project/java/pom.xml b/examples/metal/project/java/pom.xml deleted file mode 100644 index 9ca6248a..00000000 --- a/examples/metal/project/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-project - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/project/java/src/main/java/generated_program/App.java b/examples/metal/project/java/src/main/java/generated_program/App.java deleted file mode 100644 index 6cfd4000..00000000 --- a/examples/metal/project/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,24 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Project; -import com.equinix.pulumi.metal.ProjectArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var organizationId = config.get("organizationId").get(); - final var name = config.get("name").orElse("Default Project"); - var projectResource = new Project("projectResource", ProjectArgs.builder() - .name(name) - .organizationId(organizationId) - .build()); - - ctx.export("projectId", projectResource.id()); - } -} diff --git a/examples/metal/project/python/Pulumi.yaml b/examples/metal/project/python/Pulumi.yaml deleted file mode 100644 index c2a80b7e..00000000 --- a/examples/metal/project/python/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-project -runtime: python -description: An Equinix Metal Project resource -config: - name: - type: string - default: Default Project - organizationId: - type: string diff --git a/examples/metal/project/python/__main__.py b/examples/metal/project/python/__main__.py deleted file mode 100644 index c0737878..00000000 --- a/examples/metal/project/python/__main__.py +++ /dev/null @@ -1,12 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -organization_id = config.require("organizationId") -name = config.get("name") -if name is None: - name = "Default Project" -project_resource = equinix.metal.Project("project", - name=name, - organization_id=organization_id) -pulumi.export("projectId", project_resource.id) diff --git a/examples/metal/project/python/requirements.txt b/examples/metal/project/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/project/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/project/typescript/Pulumi.yaml b/examples/metal/project/typescript/Pulumi.yaml deleted file mode 100644 index 42df8f14..00000000 --- a/examples/metal/project/typescript/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-project -runtime: nodejs -description: An Equinix Metal Project resource -config: - name: - type: string - default: Default Project - organizationId: - type: string diff --git a/examples/metal/project/typescript/index.ts b/examples/metal/project/typescript/index.ts deleted file mode 100644 index 45e52768..00000000 --- a/examples/metal/project/typescript/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const organizationId = config.require("organizationId"); -const name = config.get("name") || "Default Project"; -const projectResource = new equinix.metal.Project("project", { - name: name, - organizationId: organizationId, -}); -export const projectId = projectResource.id; diff --git a/examples/metal/project/typescript/package.json b/examples/metal/project/typescript/package.json deleted file mode 100644 index e85fc0d6..00000000 --- a/examples/metal/project/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-project", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/project/typescript/tsconfig.json b/examples/metal/project/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/project/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/project/yaml/Pulumi.yaml b/examples/metal/project/yaml/Pulumi.yaml deleted file mode 100644 index e01c3146..00000000 --- a/examples/metal/project/yaml/Pulumi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: equinix-metal-project -runtime: yaml -description: An Equinix Metal Project resource -config: - organizationId: - type: string - name: - type: string - default: Default Project -resources: - project: - type: equinix:metal:Project - properties: - name: ${name} - organizationId: ${organizationId} -outputs: - projectId: ${project.id} diff --git a/examples/metal/project_api_key/Pulumi.yaml b/examples/metal/project_api_key/Pulumi.yaml new file mode 100644 index 00000000..17dacae3 --- /dev/null +++ b/examples/metal/project_api_key/Pulumi.yaml @@ -0,0 +1,10 @@ +name: equinix-metal-project_api_key +runtime: yaml +resources: + # Create a new read-only API key in existing project + test: + type: equinix:metal:ProjectApiKey + properties: + projectId: ${existingProjectId} + description: Read-only key scoped to a projct + readOnly: true diff --git a/examples/metal/project_api_key/csharp/Program.cs b/examples/metal/project_api_key/csharp/Program.cs index b39bb84f..eb8ff259 100644 --- a/examples/metal/project_api_key/csharp/Program.cs +++ b/examples/metal/project_api_key/csharp/Program.cs @@ -1,22 +1,16 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var readOnly = config.GetBoolean("readOnly") ?? false; - var apiKey = new Equinix.Metal.ProjectApiKey("apiKey", new() + var test = new Equinix.Metal.ProjectApiKey("test", new() { - ProjectId = projectId, - Description = "A project level API Key", - ReadOnly = readOnly, + ProjectId = existingProjectId, + Description = "Read-only key scoped to a projct", + ReadOnly = true, }); - return new Dictionary - { - ["apiKeyToken"] = apiKey.Token, - }; }); diff --git a/examples/metal/project_api_key/csharp/Pulumi.yaml b/examples/metal/project_api_key/csharp/Pulumi.yaml index 54019516..ca822440 100644 --- a/examples/metal/project_api_key/csharp/Pulumi.yaml +++ b/examples/metal/project_api_key/csharp/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-project-api-key +name: equinix-metal-project_api_key runtime: dotnet -description: An Equinix Metal Project API Key resource -config: - projectId: - type: string - readOnly: - type: boolean - default: false diff --git a/examples/metal/project_api_key/csharp/equinix-metal-project-api-key.csproj b/examples/metal/project_api_key/csharp/equinix-metal-project-api-key.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/project_api_key/csharp/equinix-metal-project-api-key.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/project_api_key/csharp/equinix-metal-project_api_key.csproj b/examples/metal/project_api_key/csharp/equinix-metal-project_api_key.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/project_api_key/csharp/equinix-metal-project_api_key.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/project_api_key/example.md b/examples/metal/project_api_key/example.md deleted file mode 100644 index 78eba3d0..00000000 --- a/examples/metal/project_api_key/example.md +++ /dev/null @@ -1,157 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const readOnly = config.getBoolean("readOnly") || false; -const apiKey = new equinix.metal.ProjectApiKey("apiKey", { - projectId: projectId, - description: "A project level API Key", - readOnly: readOnly, -}); -export const apiKeyToken = apiKey.token; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -read_only = config.get_bool("readOnly") -if read_only is None: - read_only = False -api_key = equinix.metal.ProjectApiKey("apiKey", - project_id=project_id, - description="A project level API Key", - read_only=read_only) -pulumi.export("apiKeyToken", api_key.token) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - readOnly := false - if param := cfg.GetBool("readOnly"); param { - readOnly = param - } - apiKey, err := metal.NewProjectApiKey(ctx, "apiKey", &metal.ProjectApiKeyArgs{ - ProjectId: pulumi.String(projectId), - Description: pulumi.String("A project level API Key"), - ReadOnly: pulumi.Bool(readOnly), - }) - if err != nil { - return err - } - ctx.Export("apiKeyToken", apiKey.Token) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var readOnly = config.GetBoolean("readOnly") ?? false; - var apiKey = new Equinix.Metal.ProjectApiKey("apiKey", new() - { - ProjectId = projectId, - Description = "A project level API Key", - ReadOnly = readOnly, - }); - - return new Dictionary - { - ["apiKeyToken"] = apiKey.Token, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ProjectApiKey; -import com.equinix.pulumi.metal.ProjectApiKeyArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var readOnly = config.getBoolean("readOnly").orElse(false); - var apiKey = new ProjectApiKey("apiKey", ProjectApiKeyArgs.builder() - .projectId(projectId) - .description("A project level API Key") - .readOnly(readOnly) - .build()); - - ctx.export("apiKeyToken", apiKey.token()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - readOnly: - type: boolean - default: false -resources: - apiKey: - type: equinix:metal:ProjectApiKey - properties: - projectId: ${projectId} - description: A project level API Key - readOnly: ${readOnly} -outputs: - apiKeyToken: ${apiKey.token} -``` - -{{% /choosable %}} diff --git a/examples/metal/project_api_key/go/Pulumi.yaml b/examples/metal/project_api_key/go/Pulumi.yaml index cf0672d0..a1b61566 100644 --- a/examples/metal/project_api_key/go/Pulumi.yaml +++ b/examples/metal/project_api_key/go/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-project-api-key +name: equinix-metal-project_api_key runtime: go -description: An Equinix Metal Project API Key resource -config: - projectId: - type: string - readOnly: - type: boolean - default: false diff --git a/examples/metal/project_api_key/go/go.mod b/examples/metal/project_api_key/go/go.mod index a79a743c..1c4b8468 100644 --- a/examples/metal/project_api_key/go/go.mod +++ b/examples/metal/project_api_key/go/go.mod @@ -1,59 +1,94 @@ -module equinix-metal-project-api-key +module equinix-metal-project_api_key -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/project_api_key/go/main.go b/examples/metal/project_api_key/go/main.go index 0d5e231f..694dfbad 100644 --- a/examples/metal/project_api_key/go/main.go +++ b/examples/metal/project_api_key/go/main.go @@ -3,26 +3,18 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - readOnly := false - if param := cfg.GetBool("readOnly"); param { - readOnly = param - } - apiKey, err := metal.NewProjectApiKey(ctx, "apiKey", &metal.ProjectApiKeyArgs{ - ProjectId: pulumi.String(projectId), - Description: pulumi.String("A project level API Key"), - ReadOnly: pulumi.Bool(readOnly), + _, err := metal.NewProjectApiKey(ctx, "test", &metal.ProjectApiKeyArgs{ + ProjectId: pulumi.Any(existingProjectId), + Description: pulumi.String("Read-only key scoped to a projct"), + ReadOnly: pulumi.Bool(true), }) if err != nil { return err } - ctx.Export("apiKeyToken", apiKey.Token) return nil }) } diff --git a/examples/metal/project_api_key/java/.gitignore b/examples/metal/project_api_key/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/project_api_key/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/project_api_key/java/Pulumi.yaml b/examples/metal/project_api_key/java/Pulumi.yaml index 362e83ea..76d7368a 100644 --- a/examples/metal/project_api_key/java/Pulumi.yaml +++ b/examples/metal/project_api_key/java/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-project-api-key +name: equinix-metal-project_api_key runtime: java -description: An Equinix Metal Project API Key resource -config: - projectId: - type: string - readOnly: - type: boolean - default: false diff --git a/examples/metal/project_api_key/java/pom.xml b/examples/metal/project_api_key/java/pom.xml index 9c926795..0ddadd4f 100644 --- a/examples/metal/project_api_key/java/pom.xml +++ b/examples/metal/project_api_key/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-project-api-key + equinix-metal-project_api_key 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/metal/project_api_key/java/src/main/java/generated_program/App.java b/examples/metal/project_api_key/java/src/main/java/generated_program/App.java index f9fb7905..b93ff03f 100644 --- a/examples/metal/project_api_key/java/src/main/java/generated_program/App.java +++ b/examples/metal/project_api_key/java/src/main/java/generated_program/App.java @@ -2,8 +2,15 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ProjectApiKey; -import com.equinix.pulumi.metal.ProjectApiKeyArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ProjectApiKey; +import com.pulumi.equinix.metal.ProjectApiKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -11,15 +18,11 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var readOnly = config.getBoolean("readOnly").orElse(false); - var apiKey = new ProjectApiKey("apiKey", ProjectApiKeyArgs.builder() - .projectId(projectId) - .description("A project level API Key") - .readOnly(readOnly) + var test = new ProjectApiKey("test", ProjectApiKeyArgs.builder() + .projectId(existingProjectId) + .description("Read-only key scoped to a projct") + .readOnly(true) .build()); - ctx.export("apiKeyToken", apiKey.token()); } } diff --git a/examples/metal/project_api_key/python/Pulumi.yaml b/examples/metal/project_api_key/python/Pulumi.yaml index e901827a..6df23856 100644 --- a/examples/metal/project_api_key/python/Pulumi.yaml +++ b/examples/metal/project_api_key/python/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-project-api-key +name: equinix-metal-project_api_key runtime: python -description: An Equinix Metal Project API Key resource -config: - projectId: - type: string - readOnly: - type: boolean - default: false diff --git a/examples/metal/project_api_key/python/__main__.py b/examples/metal/project_api_key/python/__main__.py index 02650b07..be1313d5 100644 --- a/examples/metal/project_api_key/python/__main__.py +++ b/examples/metal/project_api_key/python/__main__.py @@ -1,13 +1,7 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -read_only = config.get_bool("readOnly") -if read_only is None: - read_only = False -api_key = equinix.metal.ProjectApiKey("apiKey", - project_id=project_id, - description="A project level API Key", - read_only=read_only) -pulumi.export("apiKeyToken", api_key.token) +test = equinix.metal.ProjectApiKey("test", + project_id=existing_project_id, + description="Read-only key scoped to a projct", + read_only=True) diff --git a/examples/metal/project_api_key/python/requirements.txt b/examples/metal/project_api_key/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/metal/project_api_key/python/requirements.txt +++ b/examples/metal/project_api_key/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/project_api_key/typescript/Pulumi.yaml b/examples/metal/project_api_key/typescript/Pulumi.yaml index 5106a1c0..eae6e733 100644 --- a/examples/metal/project_api_key/typescript/Pulumi.yaml +++ b/examples/metal/project_api_key/typescript/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-project-api-key +name: equinix-metal-project_api_key runtime: nodejs -description: An Equinix Metal Project API Key resource -config: - projectId: - type: string - readOnly: - type: boolean - default: false diff --git a/examples/metal/project_api_key/typescript/index.ts b/examples/metal/project_api_key/typescript/index.ts index 81a2339e..05b9f7ac 100644 --- a/examples/metal/project_api_key/typescript/index.ts +++ b/examples/metal/project_api_key/typescript/index.ts @@ -1,12 +1,8 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const readOnly = config.getBoolean("readOnly") || false; -const apiKey = new equinix.metal.ProjectApiKey("apiKey", { - projectId: projectId, - description: "A project level API Key", - readOnly: readOnly, +const test = new equinix.metal.ProjectApiKey("test", { + projectId: existingProjectId, + description: "Read-only key scoped to a projct", + readOnly: true, }); -export const apiKeyToken = apiKey.token; diff --git a/examples/metal/project_api_key/typescript/package.json b/examples/metal/project_api_key/typescript/package.json index c6efc074..29fa61be 100644 --- a/examples/metal/project_api_key/typescript/package.json +++ b/examples/metal/project_api_key/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-metal-project-api-key", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-project_api_key", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/project_api_key/typescript/tsconfig.json b/examples/metal/project_api_key/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/project_api_key/typescript/tsconfig.json +++ b/examples/metal/project_api_key/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/project_api_key/yaml/Pulumi.yaml b/examples/metal/project_api_key/yaml/Pulumi.yaml deleted file mode 100644 index 650dc81f..00000000 --- a/examples/metal/project_api_key/yaml/Pulumi.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: equinix-metal-project-api-key -runtime: yaml -description: An Equinix Metal Project API Key resource -config: - projectId: - type: string - readOnly: - type: boolean - default: false -resources: - apiKey: - type: equinix:metal:ProjectApiKey - properties: - projectId: ${projectId} - description: A project level API Key - readOnly: ${readOnly} -outputs: - apiKeyToken: ${apiKey.token} diff --git a/examples/metal/project_ssh_key/Pulumi.yaml b/examples/metal/project_ssh_key/Pulumi.yaml new file mode 100644 index 00000000..b678a869 --- /dev/null +++ b/examples/metal/project_ssh_key/Pulumi.yaml @@ -0,0 +1,23 @@ +name: equinix-metal-project_ssh_key +runtime: yaml +resources: + test: + type: equinix:metal:ProjectSshKey + properties: + name: test + publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2 + projectId: ${projectId} + testDevice: + type: equinix:metal:Device + name: test + properties: + hostname: test + plan: c3.medium.x86 + metro: ny + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectSshKeyIds: + - ${test.id} + projectId: ${projectId} +variables: + projectId: diff --git a/examples/metal/project_ssh_key/csharp/Program.cs b/examples/metal/project_ssh_key/csharp/Program.cs index 2924cd5b..cfdba127 100644 --- a/examples/metal/project_ssh_key/csharp/Program.cs +++ b/examples/metal/project_ssh_key/csharp/Program.cs @@ -1,22 +1,32 @@ using System.Collections.Generic; -using System.IO; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var sshKey = new Equinix.Metal.ProjectSshKey("sshKey", new() + var projectId = ""; + + var test = new Equinix.Metal.ProjectSshKey("test", new() { + Name = "test", + PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", ProjectId = projectId, - Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), }); - return new Dictionary + var testDevice = new Equinix.Metal.Device("testDevice", new() { - ["sshKeyId"] = sshKey.Id, - }; + Hostname = "test", + Plan = Equinix.Metal.Plan.C3MediumX86, + Metro = "ny", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectSshKeyIds = new[] + { + test.Id, + }, + ProjectId = projectId, + }); + }); diff --git a/examples/metal/project_ssh_key/csharp/Pulumi.yaml b/examples/metal/project_ssh_key/csharp/Pulumi.yaml index 223b9561..55bdb72c 100644 --- a/examples/metal/project_ssh_key/csharp/Pulumi.yaml +++ b/examples/metal/project_ssh_key/csharp/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-project-ssh-key +name: equinix-metal-project_ssh_key runtime: dotnet -description: An Equinix Metal Project SSH Key resource -config: - projectId: - type: string diff --git a/examples/metal/project_ssh_key/csharp/equinix-metal-project-ssh-key.csproj b/examples/metal/project_ssh_key/csharp/equinix-metal-project-ssh-key.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/project_ssh_key/csharp/equinix-metal-project-ssh-key.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/project_ssh_key/csharp/equinix-metal-project_ssh_key.csproj b/examples/metal/project_ssh_key/csharp/equinix-metal-project_ssh_key.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/project_ssh_key/csharp/equinix-metal-project_ssh_key.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/project_ssh_key/example.md b/examples/metal/project_ssh_key/example.md deleted file mode 100644 index 30215a48..00000000 --- a/examples/metal/project_ssh_key/example.md +++ /dev/null @@ -1,169 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const sshKey = new equinix.metal.ProjectSshKey("sshKey", { - projectId: projectId, - name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"), -}); -export const sshKeyId = sshKey.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -ssh_key = equinix.metal.ProjectSshKey("sshKey", - project_id=project_id, - name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "os" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - sshKey, err := metal.NewProjectSshKey(ctx, "sshKey", &metal.ProjectSshKeyArgs{ - ProjectId: pulumi.String(projectId), - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), - }) - if err != nil { - return err - } - ctx.Export("sshKeyId", sshKey.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using System.IO; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var sshKey = new Equinix.Metal.ProjectSshKey("sshKey", new() - { - ProjectId = projectId, - Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), - }); - - return new Dictionary - { - ["sshKeyId"] = sshKey.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ProjectSshKey; -import com.equinix.pulumi.metal.ProjectSshKeyArgs; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - - String content = null; - try { - content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } - - var sshKey = new ProjectSshKey("sshKey", ProjectSshKeyArgs.builder() - .projectId(projectId) - .name("johnKent") - .publicKey(content) - .build()); - - ctx.export("sshKeyId", sshKey.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string -resources: - sshKey: - type: equinix:metal:ProjectSshKey - properties: - projectId: ${projectId} - name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/metal_rsa.pub -outputs: - sshKeyId: ${sshKey.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/project_ssh_key/go/Pulumi.yaml b/examples/metal/project_ssh_key/go/Pulumi.yaml index 7bde292d..b1889afb 100644 --- a/examples/metal/project_ssh_key/go/Pulumi.yaml +++ b/examples/metal/project_ssh_key/go/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-project-ssh-key +name: equinix-metal-project_ssh_key runtime: go -description: An Equinix Metal Project SSH Key resource -config: - projectId: - type: string diff --git a/examples/metal/project_ssh_key/go/go.mod b/examples/metal/project_ssh_key/go/go.mod index 0abce273..3969a5a5 100644 --- a/examples/metal/project_ssh_key/go/go.mod +++ b/examples/metal/project_ssh_key/go/go.mod @@ -1,59 +1,94 @@ -module equinix-metal-project-ssh-key +module equinix-metal-project_ssh_key -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/project_ssh_key/go/main.go b/examples/metal/project_ssh_key/go/main.go index 67e6df2f..66b42439 100644 --- a/examples/metal/project_ssh_key/go/main.go +++ b/examples/metal/project_ssh_key/go/main.go @@ -1,34 +1,35 @@ package main import ( - "os" - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - sshKey, err := metal.NewProjectSshKey(ctx, "sshKey", &metal.ProjectSshKeyArgs{ + projectId := "" + test, err := metal.NewProjectSshKey(ctx, "test", &metal.ProjectSshKeyArgs{ + Name: pulumi.String("test"), + PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2"), + ProjectId: pulumi.String(projectId), + }) + if err != nil { + return err + } + _, err = metal.NewDevice(ctx, "testDevice", &metal.DeviceArgs{ + Hostname: pulumi.String("test"), + Plan: pulumi.String(metal.PlanC3MediumX86), + Metro: pulumi.String("ny"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectSshKeyIds: pulumi.StringArray{ + test.ID(), + }, ProjectId: pulumi.String(projectId), - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), }) if err != nil { return err } - ctx.Export("sshKeyId", sshKey.ID()) return nil }) } diff --git a/examples/metal/project_ssh_key/java/.gitignore b/examples/metal/project_ssh_key/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/project_ssh_key/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/project_ssh_key/java/Pulumi.yaml b/examples/metal/project_ssh_key/java/Pulumi.yaml index e8850bc0..ade30e8b 100644 --- a/examples/metal/project_ssh_key/java/Pulumi.yaml +++ b/examples/metal/project_ssh_key/java/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-project-ssh-key +name: equinix-metal-project_ssh_key runtime: java -description: An Equinix Metal Project SSH Key resource -config: - projectId: - type: string diff --git a/examples/metal/project_ssh_key/java/pom.xml b/examples/metal/project_ssh_key/java/pom.xml index 914c7b5e..fa6b3430 100644 --- a/examples/metal/project_ssh_key/java/pom.xml +++ b/examples/metal/project_ssh_key/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-project-ssh-key + equinix-metal-project_ssh_key 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/metal/project_ssh_key/java/src/main/java/generated_program/App.java b/examples/metal/project_ssh_key/java/src/main/java/generated_program/App.java index bcf4282b..8091b6da 100644 --- a/examples/metal/project_ssh_key/java/src/main/java/generated_program/App.java +++ b/examples/metal/project_ssh_key/java/src/main/java/generated_program/App.java @@ -2,10 +2,15 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ProjectSshKey; -import com.equinix.pulumi.metal.ProjectSshKeyArgs; - -import java.io.IOException; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ProjectSshKey; +import com.pulumi.equinix.metal.ProjectSshKeyArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -15,22 +20,23 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); + final var projectId = ""; - String content = null; - try { - content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } + var test = new ProjectSshKey("test", ProjectSshKeyArgs.builder() + .name("test") + .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2") + .projectId(projectId) + .build()); - var sshKey = new ProjectSshKey("sshKey", ProjectSshKeyArgs.builder() + var testDevice = new Device("testDevice", DeviceArgs.builder() + .hostname("test") + .plan("c3.medium.x86") + .metro("ny") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectSshKeyIds(test.id()) .projectId(projectId) - .name("johnKent") - .publicKey(content) .build()); - ctx.export("sshKeyId", sshKey.id()); } } diff --git a/examples/metal/project_ssh_key/python/Pulumi.yaml b/examples/metal/project_ssh_key/python/Pulumi.yaml index 325e8311..206b4c13 100644 --- a/examples/metal/project_ssh_key/python/Pulumi.yaml +++ b/examples/metal/project_ssh_key/python/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-project-ssh-key +name: equinix-metal-project_ssh_key runtime: python -description: An Equinix Metal Project SSH Key resource -config: - projectId: - type: string diff --git a/examples/metal/project_ssh_key/python/__main__.py b/examples/metal/project_ssh_key/python/__main__.py index 01410957..cb2c4ba4 100644 --- a/examples/metal/project_ssh_key/python/__main__.py +++ b/examples/metal/project_ssh_key/python/__main__.py @@ -1,10 +1,16 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -ssh_key = equinix.metal.ProjectSshKey("sshKey", - project_id=project_id, - name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) +project_id = "" +test = equinix.metal.ProjectSshKey("test", + name="test", + public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", + project_id=project_id) +test_device = equinix.metal.Device("testDevice", + hostname="test", + plan=equinix.metal.Plan.C3_MEDIUM_X86, + metro="ny", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_ssh_key_ids=[test.id], + project_id=project_id) diff --git a/examples/metal/project_ssh_key/python/requirements.txt b/examples/metal/project_ssh_key/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/metal/project_ssh_key/python/requirements.txt +++ b/examples/metal/project_ssh_key/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/project_ssh_key/typescript/Pulumi.yaml b/examples/metal/project_ssh_key/typescript/Pulumi.yaml index c70cc367..b595ff8f 100644 --- a/examples/metal/project_ssh_key/typescript/Pulumi.yaml +++ b/examples/metal/project_ssh_key/typescript/Pulumi.yaml @@ -1,6 +1,2 @@ -name: equinix-metal-project-ssh-key +name: equinix-metal-project_ssh_key runtime: nodejs -description: An Equinix Metal Project SSH Key resource -config: - projectId: - type: string diff --git a/examples/metal/project_ssh_key/typescript/index.ts b/examples/metal/project_ssh_key/typescript/index.ts index 6249d75e..a9db87a8 100644 --- a/examples/metal/project_ssh_key/typescript/index.ts +++ b/examples/metal/project_ssh_key/typescript/index.ts @@ -1,12 +1,18 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const sshKey = new equinix.metal.ProjectSshKey("sshKey", { +const projectId = ""; +const test = new equinix.metal.ProjectSshKey("test", { + name: "test", + publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", + projectId: projectId, +}); +const testDevice = new equinix.metal.Device("testDevice", { + hostname: "test", + plan: equinix.metal.Plan.C3MediumX86, + metro: "ny", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectSshKeyIds: [test.id], projectId: projectId, - name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"), }); -export const sshKeyId = sshKey.id; diff --git a/examples/metal/project_ssh_key/typescript/package.json b/examples/metal/project_ssh_key/typescript/package.json index 7a603e84..27a6dacd 100644 --- a/examples/metal/project_ssh_key/typescript/package.json +++ b/examples/metal/project_ssh_key/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-metal-project-ssh-key", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-project_ssh_key", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/project_ssh_key/typescript/tsconfig.json b/examples/metal/project_ssh_key/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/project_ssh_key/typescript/tsconfig.json +++ b/examples/metal/project_ssh_key/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/project_ssh_key/yaml/Pulumi.yaml b/examples/metal/project_ssh_key/yaml/Pulumi.yaml deleted file mode 100644 index 7aaab802..00000000 --- a/examples/metal/project_ssh_key/yaml/Pulumi.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: equinix-metal-project-ssh-key -runtime: yaml -description: An Equinix Metal Project SSH Key resource -config: - projectId: - type: string -resources: - sshKey: - type: equinix:metal:ProjectSshKey - properties: - projectId: ${projectId} - name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/metal_rsa.pub -outputs: - sshKeyId: ${sshKey.id} diff --git a/examples/metal/reserved_ip_block/csharp/Program.cs b/examples/metal/reserved_ip_block/csharp/Program.cs deleted file mode 100644 index b603eb6a..00000000 --- a/examples/metal/reserved_ip_block/csharp/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "FR"; - var type = config.Get("type") ?? "public_ipv4"; - var quantity = config.GetNumber("quantity") ?? 1; - var ipBlock = new Equinix.Metal.ReservedIpBlock("ipBlock", new() - { - ProjectId = projectId, - Type = type, - Quantity = quantity, - Metro = metro, - }); - - return new Dictionary - { - ["ipBlockId"] = ipBlock.Id, - ["ipBlockSubent"] = ipBlock.CidrNotation, - }; -}); - diff --git a/examples/metal/reserved_ip_block/csharp/Pulumi.yaml b/examples/metal/reserved_ip_block/csharp/Pulumi.yaml deleted file mode 100644 index 2a0b66d6..00000000 --- a/examples/metal/reserved_ip_block/csharp/Pulumi.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: equinix-metal-reserved-ip-block -runtime: dotnet -description: An Equinix Metal Reserved IP Block resource -config: - metro: - type: string - default: FR - projectId: - type: string - quantity: - type: integer - default: 1 - type: - type: string - default: public_ipv4 diff --git a/examples/metal/reserved_ip_block/csharp/equinix-metal-reserved-ip-block.csproj b/examples/metal/reserved_ip_block/csharp/equinix-metal-reserved-ip-block.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/reserved_ip_block/csharp/equinix-metal-reserved-ip-block.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example.md b/examples/metal/reserved_ip_block/example.md deleted file mode 100644 index d96fda26..00000000 --- a/examples/metal/reserved_ip_block/example.md +++ /dev/null @@ -1,195 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "FR"; -const type = config.get("type") || "public_ipv4"; -const quantity = config.getNumber("quantity") || 1; -const ipBlock = new equinix.metal.ReservedIpBlock("ipBlock", { - projectId: projectId, - type: type, - quantity: quantity, - metro: metro, -}); -export const ipBlockId = ipBlock.id; -export const ipBlockSubent = ipBlock.cidrNotation; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "FR" -_type = config.get("type") -if _type is None: - _type = "public_ipv4" -quantity = config.get_int("quantity") -if quantity is None: - quantity = 1 -ip_block = equinix.metal.ReservedIpBlock("ipBlock", - project_id=project_id, - type=_type, - quantity=quantity, - metro=metro) -pulumi.export("ipBlockId", ip_block.id) -pulumi.export("ipBlockSubent", ip_block.cidr_notation) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - _type := "public_ipv4" - if param := cfg.Get("type"); param != "" { - _type = param - } - quantity := 1 - if param := cfg.GetInt("quantity"); param != 0 { - quantity = param - } - ipBlock, err := metal.NewReservedIpBlock(ctx, "ipBlock", &metal.ReservedIpBlockArgs{ - ProjectId: pulumi.String(projectId), - Type: pulumi.String(_type), - Quantity: pulumi.Int(quantity), - Metro: pulumi.String(metro), - }) - if err != nil { - return err - } - ctx.Export("ipBlockId", ipBlock.ID()) - ctx.Export("ipBlockSubent", ipBlock.CidrNotation) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "FR"; - var type = config.Get("type") ?? "public_ipv4"; - var quantity = config.GetNumber("quantity") ?? 1; - var ipBlock = new Equinix.Metal.ReservedIpBlock("ipBlock", new() - { - ProjectId = projectId, - Type = type, - Quantity = quantity, - Metro = metro, - }); - - return new Dictionary - { - ["ipBlockId"] = ipBlock.Id, - ["ipBlockSubent"] = ipBlock.CidrNotation, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ReservedIpBlock; -import com.equinix.pulumi.metal.ReservedIpBlockArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("FR"); - final var type = config.get("type").orElse("public_ipv4"); - final var quantity = Integer.parseInt(config.get("quantity").orElse("1")); - var ipBlock = new ReservedIpBlock("ipBlock", ReservedIpBlockArgs.builder() - .projectId(projectId) - .type(type) - .quantity(quantity) - .metro(metro) - .build()); - - ctx.export("ipBlockId", ipBlock.id()); - ctx.export("ipBlockSubent", ipBlock.cidrNotation()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - metro: - type: string - default: FR - type: - type: string - default: public_ipv4 - quantity: - type: integer - default: 1 -resources: - ipBlock: - type: equinix:metal:ReservedIpBlock - properties: - projectId: ${projectId} - type: ${type} - quantity: ${quantity} - metro: ${metro} -outputs: - ipBlockId: ${ipBlock.id} - ipBlockSubent: ${ipBlock.cidrNotation} -``` - -{{% /choosable %}} diff --git a/examples/metal/reserved_ip_block/example_1/Pulumi.yaml b/examples/metal/reserved_ip_block/example_1/Pulumi.yaml new file mode 100644 index 00000000..ccb2bb72 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/Pulumi.yaml @@ -0,0 +1,26 @@ +name: equinix-metal-reserved_ip_block-example_1 +runtime: yaml +resources: + # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro for myproject + twoElasticAddresses: + type: equinix:metal:ReservedIpBlock + name: two_elastic_addresses + properties: + projectId: ${projectId} + metro: sv + quantity: 2 + # Allocate 1 floating IP in Silicon Valley (sv) metro + test1: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + type: public_ipv4 + metro: sv + quantity: 1 + # Allocate 1 global floating IP, which can be assigned to device in any metro + test: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + type: global_ipv4 + quantity: 1 diff --git a/examples/metal/reserved_ip_block/example_1/csharp/.gitignore b/examples/metal/reserved_ip_block/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/reserved_ip_block/example_1/csharp/Program.cs b/examples/metal/reserved_ip_block/example_1/csharp/Program.cs new file mode 100644 index 00000000..47cb39f4 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/csharp/Program.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var twoElasticAddresses = new Equinix.Metal.ReservedIpBlock("twoElasticAddresses", new() + { + ProjectId = projectId, + Metro = "sv", + Quantity = 2, + }); + + var test1 = new Equinix.Metal.ReservedIpBlock("test1", new() + { + ProjectId = projectId, + Type = Equinix.Metal.IpBlockType.PublicIPv4, + Metro = "sv", + Quantity = 1, + }); + + var test = new Equinix.Metal.ReservedIpBlock("test", new() + { + ProjectId = projectId, + Type = Equinix.Metal.IpBlockType.GlobalIPv4, + Quantity = 1, + }); + +}); + diff --git a/examples/metal/reserved_ip_block/example_1/csharp/Pulumi.yaml b/examples/metal/reserved_ip_block/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..cc49c02b --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_1 +runtime: dotnet diff --git a/examples/metal/reserved_ip_block/example_1/csharp/equinix-metal-reserved_ip_block-example_1.csproj b/examples/metal/reserved_ip_block/example_1/csharp/equinix-metal-reserved_ip_block-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/csharp/equinix-metal-reserved_ip_block-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_1/go/Pulumi.yaml b/examples/metal/reserved_ip_block/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..276108a2 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_1 +runtime: go diff --git a/examples/metal/reserved_ip_block/example_1/go/go.mod b/examples/metal/reserved_ip_block/example_1/go/go.mod new file mode 100644 index 00000000..8e36bd4e --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-reserved_ip_block-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/reserved_ip_block/example_1/go/main.go b/examples/metal/reserved_ip_block/example_1/go/main.go new file mode 100644 index 00000000..0e87d691 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/go/main.go @@ -0,0 +1,37 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewReservedIpBlock(ctx, "twoElasticAddresses", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(2), + }) + if err != nil { + return err + } + _, err = metal.NewReservedIpBlock(ctx, "test1", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Type: pulumi.String(metal.IpBlockTypePublicIPv4), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(1), + }) + if err != nil { + return err + } + _, err = metal.NewReservedIpBlock(ctx, "test", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Type: pulumi.String(metal.IpBlockTypeGlobalIPv4), + Quantity: pulumi.Int(1), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/reserved_ip_block/example_1/java/Pulumi.yaml b/examples/metal/reserved_ip_block/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..59f4e019 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_1 +runtime: java diff --git a/examples/metal/reserved_ip_block/example_1/java/pom.xml b/examples/metal/reserved_ip_block/example_1/java/pom.xml new file mode 100644 index 00000000..5959f414 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-reserved_ip_block-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_1/java/src/main/java/generated_program/App.java b/examples/metal/reserved_ip_block/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..126f40bc --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,41 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var twoElasticAddresses = new ReservedIpBlock("twoElasticAddresses", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("sv") + .quantity(2) + .build()); + + var test1 = new ReservedIpBlock("test1", ReservedIpBlockArgs.builder() + .projectId(projectId) + .type("public_ipv4") + .metro("sv") + .quantity(1) + .build()); + + var test = new ReservedIpBlock("test", ReservedIpBlockArgs.builder() + .projectId(projectId) + .type("global_ipv4") + .quantity(1) + .build()); + + } +} diff --git a/examples/metal/reserved_ip_block/example_1/python/.gitignore b/examples/metal/reserved_ip_block/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_1/python/Pulumi.yaml b/examples/metal/reserved_ip_block/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..c80a7323 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_1 +runtime: python diff --git a/examples/metal/reserved_ip_block/example_1/python/__main__.py b/examples/metal/reserved_ip_block/example_1/python/__main__.py new file mode 100644 index 00000000..c46db63b --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/python/__main__.py @@ -0,0 +1,16 @@ +import pulumi +import pulumi_equinix as equinix + +two_elastic_addresses = equinix.metal.ReservedIpBlock("twoElasticAddresses", + project_id=project_id, + metro="sv", + quantity=2) +test1 = equinix.metal.ReservedIpBlock("test1", + project_id=project_id, + type=equinix.metal.IpBlockType.PUBLIC_I_PV4, + metro="sv", + quantity=1) +test = equinix.metal.ReservedIpBlock("test", + project_id=project_id, + type=equinix.metal.IpBlockType.GLOBAL_I_PV4, + quantity=1) diff --git a/examples/metal/reserved_ip_block/example_1/python/requirements.txt b/examples/metal/reserved_ip_block/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/reserved_ip_block/example_1/typescript/.gitignore b/examples/metal/reserved_ip_block/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_1/typescript/Pulumi.yaml b/examples/metal/reserved_ip_block/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..678c64f3 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_1 +runtime: nodejs diff --git a/examples/metal/reserved_ip_block/example_1/typescript/index.ts b/examples/metal/reserved_ip_block/example_1/typescript/index.ts new file mode 100644 index 00000000..f4166f1c --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/typescript/index.ts @@ -0,0 +1,19 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const twoElasticAddresses = new equinix.metal.ReservedIpBlock("twoElasticAddresses", { + projectId: projectId, + metro: "sv", + quantity: 2, +}); +const test1 = new equinix.metal.ReservedIpBlock("test1", { + projectId: projectId, + type: equinix.metal.IpBlockType.PublicIPv4, + metro: "sv", + quantity: 1, +}); +const test = new equinix.metal.ReservedIpBlock("test", { + projectId: projectId, + type: equinix.metal.IpBlockType.GlobalIPv4, + quantity: 1, +}); diff --git a/examples/metal/reserved_ip_block/example_1/typescript/package.json b/examples/metal/reserved_ip_block/example_1/typescript/package.json new file mode 100644 index 00000000..cee95de3 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-reserved_ip_block-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_1/typescript/tsconfig.json b/examples/metal/reserved_ip_block/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/reserved_ip_block/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_2/Pulumi.yaml b/examples/metal/reserved_ip_block/example_2/Pulumi.yaml new file mode 100644 index 00000000..b5fcfd24 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/Pulumi.yaml @@ -0,0 +1,26 @@ +name: equinix-metal-reserved_ip_block-example_2 +runtime: yaml +resources: + # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro + example: + type: equinix:metal:ReservedIpBlock + properties: + projectId: ${projectId} + metro: sv + quantity: 2 + # Run a device with both public IPv4 from the block assigned + nodes: + type: equinix:metal:Device + properties: + projectId: ${projectId} + metro: sv + plan: c3.small.x86 + operatingSystem: ubuntu_20_04 + hostname: test + billingCycle: hourly + ipAddresses: + - type: public_ipv4 + cidr: 31 + reservationIds: + - ${example.id} + - type: private_ipv4 diff --git a/examples/metal/reserved_ip_block/example_2/csharp/.gitignore b/examples/metal/reserved_ip_block/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/reserved_ip_block/example_2/csharp/Program.cs b/examples/metal/reserved_ip_block/example_2/csharp/Program.cs new file mode 100644 index 00000000..7e1011d7 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/csharp/Program.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var example = new Equinix.Metal.ReservedIpBlock("example", new() + { + ProjectId = projectId, + Metro = "sv", + Quantity = 2, + }); + + var nodes = new Equinix.Metal.Device("nodes", new() + { + ProjectId = projectId, + Metro = "sv", + Plan = Equinix.Metal.Plan.C3SmallX86, + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + Hostname = "test", + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + IpAddresses = new[] + { + new Equinix.Metal.Inputs.DeviceIpAddressArgs + { + Type = "public_ipv4", + Cidr = 31, + ReservationIds = new[] + { + example.Id, + }, + }, + new Equinix.Metal.Inputs.DeviceIpAddressArgs + { + Type = "private_ipv4", + }, + }, + }); + +}); + diff --git a/examples/metal/reserved_ip_block/example_2/csharp/Pulumi.yaml b/examples/metal/reserved_ip_block/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..480a8498 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_2 +runtime: dotnet diff --git a/examples/metal/reserved_ip_block/example_2/csharp/equinix-metal-reserved_ip_block-example_2.csproj b/examples/metal/reserved_ip_block/example_2/csharp/equinix-metal-reserved_ip_block-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/csharp/equinix-metal-reserved_ip_block-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_2/go/Pulumi.yaml b/examples/metal/reserved_ip_block/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..5a3fdd7b --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_2 +runtime: go diff --git a/examples/metal/reserved_ip_block/example_2/go/go.mod b/examples/metal/reserved_ip_block/example_2/go/go.mod new file mode 100644 index 00000000..0f92ad5f --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-reserved_ip_block-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/reserved_ip_block/example_2/go/main.go b/examples/metal/reserved_ip_block/example_2/go/main.go new file mode 100644 index 00000000..ed57b6fc --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/go/main.go @@ -0,0 +1,43 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + example, err := metal.NewReservedIpBlock(ctx, "example", &metal.ReservedIpBlockArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Quantity: pulumi.Int(2), + }) + if err != nil { + return err + } + _, err = metal.NewDevice(ctx, "nodes", &metal.DeviceArgs{ + ProjectId: pulumi.Any(projectId), + Metro: pulumi.String("sv"), + Plan: pulumi.String(metal.PlanC3SmallX86), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + Hostname: pulumi.String("test"), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + IpAddresses: metal.DeviceIpAddressArray{ + &metal.DeviceIpAddressArgs{ + Type: pulumi.String("public_ipv4"), + Cidr: pulumi.Int(31), + ReservationIds: pulumi.StringArray{ + example.ID(), + }, + }, + &metal.DeviceIpAddressArgs{ + Type: pulumi.String("private_ipv4"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/reserved_ip_block/example_2/java/Pulumi.yaml b/examples/metal/reserved_ip_block/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..11daf81d --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_2 +runtime: java diff --git a/examples/metal/reserved_ip_block/example_2/java/pom.xml b/examples/metal/reserved_ip_block/example_2/java/pom.xml new file mode 100644 index 00000000..e922b6af --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-reserved_ip_block-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_2/java/src/main/java/generated_program/App.java b/examples/metal/reserved_ip_block/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..7ace54d4 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,49 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var example = new ReservedIpBlock("example", ReservedIpBlockArgs.builder() + .projectId(projectId) + .metro("sv") + .quantity(2) + .build()); + + var nodes = new Device("nodes", DeviceArgs.builder() + .projectId(projectId) + .metro("sv") + .plan("c3.small.x86") + .operatingSystem("ubuntu_20_04") + .hostname("test") + .billingCycle("hourly") + .ipAddresses( + DeviceIpAddressArgs.builder() + .type("public_ipv4") + .cidr(31) + .reservationIds(example.id()) + .build(), + DeviceIpAddressArgs.builder() + .type("private_ipv4") + .build()) + .build()); + + } +} diff --git a/examples/metal/reserved_ip_block/example_2/python/.gitignore b/examples/metal/reserved_ip_block/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_2/python/Pulumi.yaml b/examples/metal/reserved_ip_block/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..0bbb9bb0 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_2 +runtime: python diff --git a/examples/metal/reserved_ip_block/example_2/python/__main__.py b/examples/metal/reserved_ip_block/example_2/python/__main__.py new file mode 100644 index 00000000..9d1a1fb1 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/python/__main__.py @@ -0,0 +1,24 @@ +import pulumi +import pulumi_equinix as equinix + +example = equinix.metal.ReservedIpBlock("example", + project_id=project_id, + metro="sv", + quantity=2) +nodes = equinix.metal.Device("nodes", + project_id=project_id, + metro="sv", + plan=equinix.metal.Plan.C3_SMALL_X86, + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + hostname="test", + billing_cycle=equinix.metal.BillingCycle.HOURLY, + ip_addresses=[ + equinix.metal.DeviceIpAddressArgs( + type="public_ipv4", + cidr=31, + reservation_ids=[example.id], + ), + equinix.metal.DeviceIpAddressArgs( + type="private_ipv4", + ), + ]) diff --git a/examples/metal/reserved_ip_block/example_2/python/requirements.txt b/examples/metal/reserved_ip_block/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/reserved_ip_block/example_2/typescript/.gitignore b/examples/metal/reserved_ip_block/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_2/typescript/Pulumi.yaml b/examples/metal/reserved_ip_block/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..231b68ac --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-reserved_ip_block-example_2 +runtime: nodejs diff --git a/examples/metal/reserved_ip_block/example_2/typescript/index.ts b/examples/metal/reserved_ip_block/example_2/typescript/index.ts new file mode 100644 index 00000000..00960c3a --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/typescript/index.ts @@ -0,0 +1,26 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const example = new equinix.metal.ReservedIpBlock("example", { + projectId: projectId, + metro: "sv", + quantity: 2, +}); +const nodes = new equinix.metal.Device("nodes", { + projectId: projectId, + metro: "sv", + plan: equinix.metal.Plan.C3SmallX86, + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + hostname: "test", + billingCycle: equinix.metal.BillingCycle.Hourly, + ipAddresses: [ + { + type: "public_ipv4", + cidr: 31, + reservationIds: [example.id], + }, + { + type: "private_ipv4", + }, + ], +}); diff --git a/examples/metal/reserved_ip_block/example_2/typescript/package.json b/examples/metal/reserved_ip_block/example_2/typescript/package.json new file mode 100644 index 00000000..4ee9cf36 --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-reserved_ip_block-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/example_2/typescript/tsconfig.json b/examples/metal/reserved_ip_block/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/reserved_ip_block/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/go/Pulumi.yaml b/examples/metal/reserved_ip_block/go/Pulumi.yaml deleted file mode 100644 index 66244a66..00000000 --- a/examples/metal/reserved_ip_block/go/Pulumi.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: equinix-metal-reserved-ip-block -runtime: go -description: An Equinix Metal Reserved IP Block resource -config: - metro: - type: string - default: FR - projectId: - type: string - quantity: - type: integer - default: 1 - type: - type: string - default: public_ipv4 diff --git a/examples/metal/reserved_ip_block/go/go.mod b/examples/metal/reserved_ip_block/go/go.mod deleted file mode 100644 index 0f84ab82..00000000 --- a/examples/metal/reserved_ip_block/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-reserved-ip-block - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/reserved_ip_block/go/main.go b/examples/metal/reserved_ip_block/go/main.go deleted file mode 100644 index c5d94466..00000000 --- a/examples/metal/reserved_ip_block/go/main.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - _type := "public_ipv4" - if param := cfg.Get("type"); param != "" { - _type = param - } - quantity := 1 - if param := cfg.GetInt("quantity"); param != 0 { - quantity = param - } - ipBlock, err := metal.NewReservedIpBlock(ctx, "ipBlock", &metal.ReservedIpBlockArgs{ - ProjectId: pulumi.String(projectId), - Type: pulumi.String(_type), - Quantity: pulumi.Int(quantity), - Metro: pulumi.String(metro), - }) - if err != nil { - return err - } - ctx.Export("ipBlockId", ipBlock.ID()) - ctx.Export("ipBlockSubent", ipBlock.CidrNotation) - return nil - }) -} diff --git a/examples/metal/reserved_ip_block/java/.gitignore b/examples/metal/reserved_ip_block/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/reserved_ip_block/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/java/Pulumi.yaml b/examples/metal/reserved_ip_block/java/Pulumi.yaml deleted file mode 100644 index f8dbb0da..00000000 --- a/examples/metal/reserved_ip_block/java/Pulumi.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: equinix-metal-reserved-ip-block -runtime: java -description: An Equinix Metal Reserved IP Block resource -config: - metro: - type: string - default: FR - projectId: - type: string - quantity: - type: string - default: "1" - type: - type: string - default: public_ipv4 diff --git a/examples/metal/reserved_ip_block/java/pom.xml b/examples/metal/reserved_ip_block/java/pom.xml deleted file mode 100644 index 66f3a5f9..00000000 --- a/examples/metal/reserved_ip_block/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-reserved-ip-block - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/java/src/main/java/generated_program/App.java b/examples/metal/reserved_ip_block/java/src/main/java/generated_program/App.java deleted file mode 100644 index 3fa9d358..00000000 --- a/examples/metal/reserved_ip_block/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,29 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.ReservedIpBlock; -import com.equinix.pulumi.metal.ReservedIpBlockArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("FR"); - final var type = config.get("type").orElse("public_ipv4"); - final var quantity = Integer.parseInt(config.get("quantity").orElse("1")); - var ipBlock = new ReservedIpBlock("ipBlock", ReservedIpBlockArgs.builder() - .projectId(projectId) - .type(type) - .quantity(quantity) - .metro(metro) - .build()); - - ctx.export("ipBlockId", ipBlock.id()); - ctx.export("ipBlockSubent", ipBlock.cidrNotation()); - } -} diff --git a/examples/metal/reserved_ip_block/python/Pulumi.yaml b/examples/metal/reserved_ip_block/python/Pulumi.yaml deleted file mode 100644 index 5a49942f..00000000 --- a/examples/metal/reserved_ip_block/python/Pulumi.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: equinix-metal-reserved-ip-block -runtime: python -description: An Equinix Metal Reserved IP Block resource -config: - metro: - type: string - default: FR - projectId: - type: string - quantity: - type: integer - default: 1 - type: - type: string - default: public_ipv4 diff --git a/examples/metal/reserved_ip_block/python/__main__.py b/examples/metal/reserved_ip_block/python/__main__.py deleted file mode 100644 index 913c5c24..00000000 --- a/examples/metal/reserved_ip_block/python/__main__.py +++ /dev/null @@ -1,21 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "FR" -_type = config.get("type") -if _type is None: - _type = "public_ipv4" -quantity = config.get_int("quantity") -if quantity is None: - quantity = 1 -ip_block = equinix.metal.ReservedIpBlock("ipBlock", - project_id=project_id, - type=_type, - quantity=quantity, - metro=metro) -pulumi.export("ipBlockId", ip_block.id) -pulumi.export("ipBlockSubent", ip_block.cidr_notation) diff --git a/examples/metal/reserved_ip_block/python/requirements.txt b/examples/metal/reserved_ip_block/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/reserved_ip_block/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/reserved_ip_block/typescript/Pulumi.yaml b/examples/metal/reserved_ip_block/typescript/Pulumi.yaml deleted file mode 100644 index 0c729d46..00000000 --- a/examples/metal/reserved_ip_block/typescript/Pulumi.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: equinix-metal-reserved-ip-block -runtime: nodejs -description: An Equinix Metal Reserved IP Block resource -config: - metro: - type: string - default: FR - projectId: - type: string - quantity: - type: integer - default: 1 - type: - type: string - default: public_ipv4 diff --git a/examples/metal/reserved_ip_block/typescript/index.ts b/examples/metal/reserved_ip_block/typescript/index.ts deleted file mode 100644 index 2f6da584..00000000 --- a/examples/metal/reserved_ip_block/typescript/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "FR"; -const type = config.get("type") || "public_ipv4"; -const quantity = config.getNumber("quantity") || 1; -const ipBlock = new equinix.metal.ReservedIpBlock("ipBlock", { - projectId: projectId, - type: type, - quantity: quantity, - metro: metro, -}); -export const ipBlockId = ipBlock.id; -export const ipBlockSubent = ipBlock.cidrNotation; diff --git a/examples/metal/reserved_ip_block/typescript/package.json b/examples/metal/reserved_ip_block/typescript/package.json deleted file mode 100644 index dc218ed7..00000000 --- a/examples/metal/reserved_ip_block/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-reserved-ip-block", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/typescript/tsconfig.json b/examples/metal/reserved_ip_block/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/reserved_ip_block/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/reserved_ip_block/yaml/Pulumi.yaml b/examples/metal/reserved_ip_block/yaml/Pulumi.yaml deleted file mode 100644 index 2a789908..00000000 --- a/examples/metal/reserved_ip_block/yaml/Pulumi.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: equinix-metal-reserved-ip-block -runtime: yaml -description: An Equinix Metal Reserved IP Block resource -config: - projectId: - type: string - metro: - type: string - default: FR - type: - type: string - default: public_ipv4 - quantity: - type: integer - default: 1 -resources: - ipBlock: - type: equinix:metal:ReservedIpBlock - properties: - projectId: ${projectId} - type: ${type} - quantity: ${quantity} - metro: ${metro} -outputs: - ipBlockId: ${ipBlock.id} - ipBlockSubent: ${ipBlock.cidrNotation} diff --git a/examples/metal/spot_market_request/Pulumi.yaml b/examples/metal/spot_market_request/Pulumi.yaml new file mode 100644 index 00000000..a4b5c375 --- /dev/null +++ b/examples/metal/spot_market_request/Pulumi.yaml @@ -0,0 +1,17 @@ +name: equinix-metal-spot_market_request +runtime: yaml +resources: + # Create a spot market request + req: + type: equinix:metal:SpotMarketRequest + properties: + projectId: ${projectId} + maxBidPrice: 0.03 + metro: ny + devicesMin: 1 + devicesMax: 1 + instanceParameters: + hostname: testspot + billingCycle: hourly + operatingSystem: ubuntu_20_04 + plan: c3.small.x86 diff --git a/examples/metal/spot_market_request/csharp/Program.cs b/examples/metal/spot_market_request/csharp/Program.cs index c2a2d2c0..cddf67ac 100644 --- a/examples/metal/spot_market_request/csharp/Program.cs +++ b/examples/metal/spot_market_request/csharp/Program.cs @@ -1,17 +1,15 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "FR"; - var request = new Equinix.Metal.SpotMarketRequest("request", new() + var req = new Equinix.Metal.SpotMarketRequest("req", new() { ProjectId = projectId, - Metro = metro, - MaxBidPrice = 0.75, + MaxBidPrice = 0.03, + Metro = "ny", DevicesMin = 1, DevicesMax = 1, InstanceParameters = new Equinix.Metal.Inputs.SpotMarketRequestInstanceParametersArgs @@ -23,9 +21,5 @@ }, }); - return new Dictionary - { - ["requestId"] = request.Id, - }; }); diff --git a/examples/metal/spot_market_request/csharp/Pulumi.yaml b/examples/metal/spot_market_request/csharp/Pulumi.yaml index 6be59c6f..e2476230 100644 --- a/examples/metal/spot_market_request/csharp/Pulumi.yaml +++ b/examples/metal/spot_market_request/csharp/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-spot-market-request +name: equinix-metal-spot_market_request runtime: dotnet -description: An Equinix Metal Spot Market Request resource -config: - metro: - type: string - default: FR - projectId: - type: string diff --git a/examples/metal/spot_market_request/csharp/equinix-metal-spot-market-request.csproj b/examples/metal/spot_market_request/csharp/equinix-metal-spot-market-request.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/spot_market_request/csharp/equinix-metal-spot-market-request.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/spot_market_request/csharp/equinix-metal-spot_market_request.csproj b/examples/metal/spot_market_request/csharp/equinix-metal-spot_market_request.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/spot_market_request/csharp/equinix-metal-spot_market_request.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/spot_market_request/example.md b/examples/metal/spot_market_request/example.md deleted file mode 100644 index 272c6b2c..00000000 --- a/examples/metal/spot_market_request/example.md +++ /dev/null @@ -1,206 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "FR"; -const request = new equinix.metal.SpotMarketRequest("request", { - projectId: projectId, - metro: metro, - maxBidPrice: 0.75, - devicesMin: 1, - devicesMax: 1, - instanceParameters: { - hostname: "testspot", - billingCycle: "hourly", - operatingSystem: "ubuntu_20_04", - plan: "c3.small.x86", - }, -}); -export const requestId = request.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "FR" -request = equinix.metal.SpotMarketRequest("request", - project_id=project_id, - metro=metro, - max_bid_price=0.75, - devices_min=1, - devices_max=1, - instance_parameters=equinix.metal.SpotMarketRequestInstanceParametersArgs( - hostname="testspot", - billing_cycle="hourly", - operating_system="ubuntu_20_04", - plan="c3.small.x86", - )) -pulumi.export("requestId", request.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - request, err := metal.NewSpotMarketRequest(ctx, "request", &metal.SpotMarketRequestArgs{ - ProjectId: pulumi.String(projectId), - Metro: pulumi.String(metro), - MaxBidPrice: pulumi.Float64(0.75), - DevicesMin: pulumi.Int(1), - DevicesMax: pulumi.Int(1), - InstanceParameters: &metal.SpotMarketRequestInstanceParametersArgs{ - Hostname: pulumi.String("testspot"), - BillingCycle: pulumi.String("hourly"), - OperatingSystem: pulumi.String("ubuntu_20_04"), - Plan: pulumi.String("c3.small.x86"), - }, - }) - if err != nil { - return err - } - ctx.Export("requestId", request.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "FR"; - var request = new Equinix.Metal.SpotMarketRequest("request", new() - { - ProjectId = projectId, - Metro = metro, - MaxBidPrice = 0.75, - DevicesMin = 1, - DevicesMax = 1, - InstanceParameters = new Equinix.Metal.Inputs.SpotMarketRequestInstanceParametersArgs - { - Hostname = "testspot", - BillingCycle = "hourly", - OperatingSystem = "ubuntu_20_04", - Plan = "c3.small.x86", - }, - }); - - return new Dictionary - { - ["requestId"] = request.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.SpotMarketRequest; -import com.equinix.pulumi.metal.SpotMarketRequestArgs; -import com.equinix.pulumi.metal.inputs.SpotMarketRequestInstanceParametersArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("FR"); - var request = new SpotMarketRequest("request", SpotMarketRequestArgs.builder() - .projectId(projectId) - .metro(metro) - .maxBidPrice(0.75) - .devicesMin(1) - .devicesMax(1) - .instanceParameters(SpotMarketRequestInstanceParametersArgs.builder() - .hostname("testspot") - .billingCycle("hourly") - .operatingSystem("ubuntu_20_04") - .plan("c3.small.x86") - .build()) - .build()); - - ctx.export("requestId", request.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - metro: - type: string - default: FR -resources: - request: - type: equinix:metal:SpotMarketRequest - properties: - projectId: ${projectId} - metro: ${metro} - maxBidPrice: 0.75 - devicesMin: 1 - devicesMax: 1 - instanceParameters: - hostname: testspot - billingCycle: hourly - operatingSystem: ubuntu_20_04 - plan: c3.small.x86 -outputs: - requestId: ${request.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/spot_market_request/go/Pulumi.yaml b/examples/metal/spot_market_request/go/Pulumi.yaml index d93c36c8..317773c1 100644 --- a/examples/metal/spot_market_request/go/Pulumi.yaml +++ b/examples/metal/spot_market_request/go/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-spot-market-request +name: equinix-metal-spot_market_request runtime: go -description: An Equinix Metal Spot Market Request resource -config: - metro: - type: string - default: FR - projectId: - type: string diff --git a/examples/metal/spot_market_request/go/go.mod b/examples/metal/spot_market_request/go/go.mod index b8086993..9215f084 100644 --- a/examples/metal/spot_market_request/go/go.mod +++ b/examples/metal/spot_market_request/go/go.mod @@ -1,59 +1,94 @@ -module equinix-metal-spot-market-request +module equinix-metal-spot_market_request -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/spot_market_request/go/main.go b/examples/metal/spot_market_request/go/main.go index 2deb4a30..90ee428c 100644 --- a/examples/metal/spot_market_request/go/main.go +++ b/examples/metal/spot_market_request/go/main.go @@ -3,21 +3,14 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "FR" - if param := cfg.Get("metro"); param != "" { - metro = param - } - request, err := metal.NewSpotMarketRequest(ctx, "request", &metal.SpotMarketRequestArgs{ - ProjectId: pulumi.String(projectId), - Metro: pulumi.String(metro), - MaxBidPrice: pulumi.Float64(0.75), + _, err := metal.NewSpotMarketRequest(ctx, "req", &metal.SpotMarketRequestArgs{ + ProjectId: pulumi.Any(projectId), + MaxBidPrice: pulumi.Float64(0.03), + Metro: pulumi.String("ny"), DevicesMin: pulumi.Int(1), DevicesMax: pulumi.Int(1), InstanceParameters: &metal.SpotMarketRequestInstanceParametersArgs{ @@ -30,7 +23,6 @@ func main() { if err != nil { return err } - ctx.Export("requestId", request.ID()) return nil }) } diff --git a/examples/metal/spot_market_request/java/.gitignore b/examples/metal/spot_market_request/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/spot_market_request/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/spot_market_request/java/Pulumi.yaml b/examples/metal/spot_market_request/java/Pulumi.yaml index 9f437fbf..68bd4401 100644 --- a/examples/metal/spot_market_request/java/Pulumi.yaml +++ b/examples/metal/spot_market_request/java/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-spot-market-request +name: equinix-metal-spot_market_request runtime: java -description: An Equinix Metal Spot Market Request resource -config: - metro: - type: string - default: FR - projectId: - type: string diff --git a/examples/metal/spot_market_request/java/pom.xml b/examples/metal/spot_market_request/java/pom.xml index 8bffc098..d92f52e7 100644 --- a/examples/metal/spot_market_request/java/pom.xml +++ b/examples/metal/spot_market_request/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-spot-market-request + equinix-metal-spot_market_request 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/metal/spot_market_request/java/src/main/java/generated_program/App.java b/examples/metal/spot_market_request/java/src/main/java/generated_program/App.java index 5c79fdf6..e70fe477 100644 --- a/examples/metal/spot_market_request/java/src/main/java/generated_program/App.java +++ b/examples/metal/spot_market_request/java/src/main/java/generated_program/App.java @@ -2,9 +2,16 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.SpotMarketRequest; -import com.equinix.pulumi.metal.SpotMarketRequestArgs; -import com.equinix.pulumi.metal.inputs.SpotMarketRequestInstanceParametersArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.SpotMarketRequest; +import com.pulumi.equinix.metal.SpotMarketRequestArgs; +import com.pulumi.equinix.metal.inputs.SpotMarketRequestInstanceParametersArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -12,13 +19,10 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("FR"); - var request = new SpotMarketRequest("request", SpotMarketRequestArgs.builder() + var req = new SpotMarketRequest("req", SpotMarketRequestArgs.builder() .projectId(projectId) - .metro(metro) - .maxBidPrice(0.75) + .maxBidPrice(0.03) + .metro("ny") .devicesMin(1) .devicesMax(1) .instanceParameters(SpotMarketRequestInstanceParametersArgs.builder() @@ -29,6 +33,5 @@ public static void stack(Context ctx) { .build()) .build()); - ctx.export("requestId", request.id()); } } diff --git a/examples/metal/spot_market_request/python/Pulumi.yaml b/examples/metal/spot_market_request/python/Pulumi.yaml index d6dae1b0..eb6a4351 100644 --- a/examples/metal/spot_market_request/python/Pulumi.yaml +++ b/examples/metal/spot_market_request/python/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-spot-market-request +name: equinix-metal-spot_market_request runtime: python -description: An Equinix Metal Spot Market Request resource -config: - metro: - type: string - default: FR - projectId: - type: string diff --git a/examples/metal/spot_market_request/python/__main__.py b/examples/metal/spot_market_request/python/__main__.py index 791ffe1a..393c8134 100644 --- a/examples/metal/spot_market_request/python/__main__.py +++ b/examples/metal/spot_market_request/python/__main__.py @@ -1,15 +1,10 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "FR" -request = equinix.metal.SpotMarketRequest("request", +req = equinix.metal.SpotMarketRequest("req", project_id=project_id, - metro=metro, - max_bid_price=0.75, + max_bid_price=0.03, + metro="ny", devices_min=1, devices_max=1, instance_parameters=equinix.metal.SpotMarketRequestInstanceParametersArgs( @@ -18,4 +13,3 @@ operating_system="ubuntu_20_04", plan="c3.small.x86", )) -pulumi.export("requestId", request.id) diff --git a/examples/metal/spot_market_request/python/requirements.txt b/examples/metal/spot_market_request/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/metal/spot_market_request/python/requirements.txt +++ b/examples/metal/spot_market_request/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/spot_market_request/typescript/Pulumi.yaml b/examples/metal/spot_market_request/typescript/Pulumi.yaml index 5732cdf0..40486a91 100644 --- a/examples/metal/spot_market_request/typescript/Pulumi.yaml +++ b/examples/metal/spot_market_request/typescript/Pulumi.yaml @@ -1,9 +1,2 @@ -name: equinix-metal-spot-market-request +name: equinix-metal-spot_market_request runtime: nodejs -description: An Equinix Metal Spot Market Request resource -config: - metro: - type: string - default: FR - projectId: - type: string diff --git a/examples/metal/spot_market_request/typescript/index.ts b/examples/metal/spot_market_request/typescript/index.ts index baf8ffa2..c76d25da 100644 --- a/examples/metal/spot_market_request/typescript/index.ts +++ b/examples/metal/spot_market_request/typescript/index.ts @@ -1,13 +1,10 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "FR"; -const request = new equinix.metal.SpotMarketRequest("request", { +const req = new equinix.metal.SpotMarketRequest("req", { projectId: projectId, - metro: metro, - maxBidPrice: 0.75, + maxBidPrice: 0.03, + metro: "ny", devicesMin: 1, devicesMax: 1, instanceParameters: { @@ -17,4 +14,3 @@ const request = new equinix.metal.SpotMarketRequest("request", { plan: "c3.small.x86", }, }); -export const requestId = request.id; diff --git a/examples/metal/spot_market_request/typescript/package.json b/examples/metal/spot_market_request/typescript/package.json index b0824a85..67868a63 100644 --- a/examples/metal/spot_market_request/typescript/package.json +++ b/examples/metal/spot_market_request/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-metal-spot-market-request", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-spot_market_request", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/spot_market_request/typescript/tsconfig.json b/examples/metal/spot_market_request/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/spot_market_request/typescript/tsconfig.json +++ b/examples/metal/spot_market_request/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/spot_market_request/yaml/Pulumi.yaml b/examples/metal/spot_market_request/yaml/Pulumi.yaml deleted file mode 100644 index def2e283..00000000 --- a/examples/metal/spot_market_request/yaml/Pulumi.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: equinix-metal-spot-market-request -runtime: yaml -description: An Equinix Metal Spot Market Request resource -config: - projectId: - type: string - metro: - type: string - default: FR -resources: - request: - type: equinix:metal:SpotMarketRequest - properties: - projectId: ${projectId} - metro: ${metro} - maxBidPrice: 0.75 - devicesMin: 1 - devicesMax: 1 - instanceParameters: - hostname: testspot - billingCycle: hourly - operatingSystem: ubuntu_20_04 - plan: c3.small.x86 -outputs: - requestId: ${request.id} diff --git a/examples/metal/ssh_key/Pulumi.yaml b/examples/metal/ssh_key/Pulumi.yaml new file mode 100644 index 00000000..82260c9a --- /dev/null +++ b/examples/metal/ssh_key/Pulumi.yaml @@ -0,0 +1,28 @@ +name: equinix-metal-ssh_key +runtime: yaml +resources: + # Create a new SSH key + key1: + type: equinix:metal:SshKey + properties: + name: terraform-1 + publicKey: + fn::invoke: + Function: std:file + Arguments: + input: /home/terraform/.ssh/id_rsa.pub + Return: result + # Create new device with "key1" included. The device resource "depends_on" the + # key, in order to make sure the key is created before the device. + test: + type: equinix:metal:Device + properties: + hostname: test-device + plan: c3.small.x86 + metro: sv + operatingSystem: ubuntu_20_04 + billingCycle: hourly + projectId: ${projectId} + options: + dependson: + - ${key1} diff --git a/examples/metal/ssh_key/csharp/Program.cs b/examples/metal/ssh_key/csharp/Program.cs index e44da261..cc7deec3 100644 --- a/examples/metal/ssh_key/csharp/Program.cs +++ b/examples/metal/ssh_key/csharp/Program.cs @@ -1,19 +1,35 @@ using System.Collections.Generic; -using System.IO; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; return await Deployment.RunAsync(() => { - var sshKey = new Equinix.Metal.SshKey("sshKey", new() + var key1 = new Equinix.Metal.SshKey("key1", new() { - Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), + Name = "terraform-1", + PublicKey = Std.File.Invoke(new() + { + Input = "/home/terraform/.ssh/id_rsa.pub", + }).Apply(invoke => invoke.Result), }); - return new Dictionary + var test = new Equinix.Metal.Device("test", new() { - ["sshKeyId"] = sshKey.Id, - }; + Hostname = "test-device", + Plan = Equinix.Metal.Plan.C3SmallX86, + Metro = "sv", + OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + BillingCycle = Equinix.Metal.BillingCycle.Hourly, + ProjectId = projectId, + }, new CustomResourceOptions + { + DependsOn = + { + key1, + }, + }); + }); diff --git a/examples/metal/ssh_key/csharp/Pulumi.yaml b/examples/metal/ssh_key/csharp/Pulumi.yaml index 1c4d45b1..c491638c 100644 --- a/examples/metal/ssh_key/csharp/Pulumi.yaml +++ b/examples/metal/ssh_key/csharp/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-metal-ssh-key +name: equinix-metal-ssh_key runtime: dotnet -description: An Equinix Metal User SSH Key resource diff --git a/examples/metal/ssh_key/csharp/equinix-metal-ssh-key.csproj b/examples/metal/ssh_key/csharp/equinix-metal-ssh-key.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/ssh_key/csharp/equinix-metal-ssh-key.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/ssh_key/csharp/equinix-metal-ssh_key.csproj b/examples/metal/ssh_key/csharp/equinix-metal-ssh_key.csproj new file mode 100644 index 00000000..ef1958d7 --- /dev/null +++ b/examples/metal/ssh_key/csharp/equinix-metal-ssh_key.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + + + + + + + + \ No newline at end of file diff --git a/examples/metal/ssh_key/example.md b/examples/metal/ssh_key/example.md deleted file mode 100644 index e4de4f38..00000000 --- a/examples/metal/ssh_key/example.md +++ /dev/null @@ -1,148 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; - -const sshKey = new equinix.metal.SshKey("sshKey", { - name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"), -}); -export const sshKeyId = sshKey.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -ssh_key = equinix.metal.SshKey("sshKey", - name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "os" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - sshKey, err := metal.NewSshKey(ctx, "sshKey", &metal.SshKeyArgs{ - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), - }) - if err != nil { - return err - } - ctx.Export("sshKeyId", sshKey.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using System.IO; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var sshKey = new Equinix.Metal.SshKey("sshKey", new() - { - Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), - }); - - return new Dictionary - { - ["sshKeyId"] = sshKey.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.SshKey; -import com.equinix.pulumi.metal.SshKeyArgs; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - String content = null; - try { - content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } - - var sshKey = new SshKey("sshKey", SshKeyArgs.builder() - .name("johnKent") - .publicKey(content) - .build()); - - ctx.export("sshKeyId", sshKey.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -resources: - sshKey: - type: equinix:metal:SshKey - properties: - name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/metal_rsa.pub -outputs: - sshKeyId: ${sshKey.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/ssh_key/go/Pulumi.yaml b/examples/metal/ssh_key/go/Pulumi.yaml index 852804ea..53dd9ba0 100644 --- a/examples/metal/ssh_key/go/Pulumi.yaml +++ b/examples/metal/ssh_key/go/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-metal-ssh-key +name: equinix-metal-ssh_key runtime: go -description: An Equinix Metal User SSH Key resource diff --git a/examples/metal/ssh_key/go/go.mod b/examples/metal/ssh_key/go/go.mod index 6be07022..e55a940a 100644 --- a/examples/metal/ssh_key/go/go.mod +++ b/examples/metal/ssh_key/go/go.mod @@ -1,58 +1,95 @@ -module equinix-metal-ssh-key +module equinix-metal-ssh_key -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi-std/sdk v1.7.2 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/ssh_key/go/main.go b/examples/metal/ssh_key/go/main.go index adef0f73..0d70ff42 100644 --- a/examples/metal/ssh_key/go/main.go +++ b/examples/metal/ssh_key/go/main.go @@ -1,30 +1,39 @@ package main import ( - "os" - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi-std/sdk/go/std" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - func main() { pulumi.Run(func(ctx *pulumi.Context) error { - sshKey, err := metal.NewSshKey(ctx, "sshKey", &metal.SshKeyArgs{ - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: "/home/terraform/.ssh/id_rsa.pub", + }, nil) + if err != nil { + return err + } + key1, err := metal.NewSshKey(ctx, "key1", &metal.SshKeyArgs{ + Name: pulumi.String("terraform-1"), + PublicKey: invokeFile.Result, }) if err != nil { return err } - ctx.Export("sshKeyId", sshKey.ID()) + _, err = metal.NewDevice(ctx, "test", &metal.DeviceArgs{ + Hostname: pulumi.String("test-device"), + Plan: pulumi.String(metal.PlanC3SmallX86), + Metro: pulumi.String("sv"), + OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), + BillingCycle: pulumi.String(metal.BillingCycleHourly), + ProjectId: pulumi.Any(projectId), + }, pulumi.DependsOn([]pulumi.Resource{ + key1, + })) + if err != nil { + return err + } return nil }) } diff --git a/examples/metal/ssh_key/java/.gitignore b/examples/metal/ssh_key/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/ssh_key/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/ssh_key/java/Pulumi.yaml b/examples/metal/ssh_key/java/Pulumi.yaml index 6f2a62f5..7862f001 100644 --- a/examples/metal/ssh_key/java/Pulumi.yaml +++ b/examples/metal/ssh_key/java/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-metal-ssh-key +name: equinix-metal-ssh_key runtime: java -description: An Equinix Metal User SSH Key resource diff --git a/examples/metal/ssh_key/java/pom.xml b/examples/metal/ssh_key/java/pom.xml index 8801edbc..6c824502 100644 --- a/examples/metal/ssh_key/java/pom.xml +++ b/examples/metal/ssh_key/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-ssh-key + equinix-metal-ssh_key 1.0-SNAPSHOT @@ -18,16 +18,20 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + + com.pulumi + std + 1.7.2 + diff --git a/examples/metal/ssh_key/java/src/main/java/generated_program/App.java b/examples/metal/ssh_key/java/src/main/java/generated_program/App.java index 2568a430..100d6581 100644 --- a/examples/metal/ssh_key/java/src/main/java/generated_program/App.java +++ b/examples/metal/ssh_key/java/src/main/java/generated_program/App.java @@ -2,10 +2,16 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.SshKey; -import com.equinix.pulumi.metal.SshKeyArgs; - -import java.io.IOException; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.SshKey; +import com.pulumi.equinix.metal.SshKeyArgs; +import com.pulumi.equinix.metal.Device; +import com.pulumi.equinix.metal.DeviceArgs; +import com.pulumi.resources.CustomResourceOptions; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -15,18 +21,23 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - String content = null; - try { - content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } - - var sshKey = new SshKey("sshKey", SshKeyArgs.builder() - .name("johnKent") - .publicKey(content) + var key1 = new SshKey("key1", SshKeyArgs.builder() + .name("terraform-1") + .publicKey(StdFunctions.file(FileArgs.builder() + .input("/home/terraform/.ssh/id_rsa.pub") + .build()).result()) .build()); - ctx.export("sshKeyId", sshKey.id()); + var test = new Device("test", DeviceArgs.builder() + .hostname("test-device") + .plan("c3.small.x86") + .metro("sv") + .operatingSystem("ubuntu_20_04") + .billingCycle("hourly") + .projectId(projectId) + .build(), CustomResourceOptions.builder() + .dependsOn(key1) + .build()); + } } diff --git a/examples/metal/ssh_key/python/Pulumi.yaml b/examples/metal/ssh_key/python/Pulumi.yaml index eaabdb02..3ccd52df 100644 --- a/examples/metal/ssh_key/python/Pulumi.yaml +++ b/examples/metal/ssh_key/python/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-metal-ssh-key +name: equinix-metal-ssh_key runtime: python -description: An Equinix Metal User SSH Key resource diff --git a/examples/metal/ssh_key/python/__main__.py b/examples/metal/ssh_key/python/__main__.py index 70721407..05c8365f 100644 --- a/examples/metal/ssh_key/python/__main__.py +++ b/examples/metal/ssh_key/python/__main__.py @@ -1,7 +1,15 @@ import pulumi import pulumi_equinix as equinix +import pulumi_std as std -ssh_key = equinix.metal.SshKey("sshKey", - name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) +key1 = equinix.metal.SshKey("key1", + name="terraform-1", + public_key=std.file_output(input="/home/terraform/.ssh/id_rsa.pub").apply(lambda invoke: invoke.result)) +test = equinix.metal.Device("test", + hostname="test-device", + plan=equinix.metal.Plan.C3_SMALL_X86, + metro="sv", + operating_system=equinix.metal.OperatingSystem.UBUNTU20_04, + billing_cycle=equinix.metal.BillingCycle.HOURLY, + project_id=project_id, + opts = pulumi.ResourceOptions(depends_on=[key1])) diff --git a/examples/metal/ssh_key/python/requirements.txt b/examples/metal/ssh_key/python/requirements.txt index 805364e7..da9f8ddc 100644 --- a/examples/metal/ssh_key/python/requirements.txt +++ b/examples/metal/ssh_key/python/requirements.txt @@ -1,2 +1,3 @@ +pulumi-std==1.7.2 pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/ssh_key/typescript/Pulumi.yaml b/examples/metal/ssh_key/typescript/Pulumi.yaml index 47756fd3..7f4e7bfb 100644 --- a/examples/metal/ssh_key/typescript/Pulumi.yaml +++ b/examples/metal/ssh_key/typescript/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-metal-ssh-key +name: equinix-metal-ssh_key runtime: nodejs -description: An Equinix Metal User SSH Key resource diff --git a/examples/metal/ssh_key/typescript/index.ts b/examples/metal/ssh_key/typescript/index.ts index 22ae259f..3575abf4 100644 --- a/examples/metal/ssh_key/typescript/index.ts +++ b/examples/metal/ssh_key/typescript/index.ts @@ -1,9 +1,20 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; +import * as std from "@pulumi/std"; -const sshKey = new equinix.metal.SshKey("sshKey", { - name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"), +const key1 = new equinix.metal.SshKey("key1", { + name: "terraform-1", + publicKey: std.fileOutput({ + input: "/home/terraform/.ssh/id_rsa.pub", + }).apply(invoke => invoke.result), +}); +const test = new equinix.metal.Device("test", { + hostname: "test-device", + plan: equinix.metal.Plan.C3SmallX86, + metro: "sv", + operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04, + billingCycle: equinix.metal.BillingCycle.Hourly, + projectId: projectId, +}, { + dependsOn: [key1], }); -export const sshKeyId = sshKey.id; diff --git a/examples/metal/ssh_key/typescript/package.json b/examples/metal/ssh_key/typescript/package.json index fbb69a47..518b690f 100644 --- a/examples/metal/ssh_key/typescript/package.json +++ b/examples/metal/ssh_key/typescript/package.json @@ -1,11 +1,12 @@ { - "name": "equinix-metal-ssh-key", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-ssh_key", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0", + "@pulumi/std": "1.7.2" + } } \ No newline at end of file diff --git a/examples/metal/ssh_key/typescript/tsconfig.json b/examples/metal/ssh_key/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/ssh_key/typescript/tsconfig.json +++ b/examples/metal/ssh_key/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/ssh_key/yaml/Pulumi.yaml b/examples/metal/ssh_key/yaml/Pulumi.yaml deleted file mode 100644 index d7b24ba1..00000000 --- a/examples/metal/ssh_key/yaml/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-metal-ssh-key -runtime: yaml -description: An Equinix Metal User SSH Key resource -resources: - sshKey: - type: equinix:metal:SshKey - properties: - name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/metal_rsa.pub -outputs: - sshKeyId: ${sshKey.id} diff --git a/examples/metal/user_api_key/Pulumi.yaml b/examples/metal/user_api_key/Pulumi.yaml new file mode 100644 index 00000000..09f8e6e5 --- /dev/null +++ b/examples/metal/user_api_key/Pulumi.yaml @@ -0,0 +1,9 @@ +name: equinix-metal-user_api_key +runtime: yaml +resources: + # Create a new read-only user API key + test: + type: equinix:metal:UserApiKey + properties: + description: Read-only user key + readOnly: true diff --git a/examples/metal/user_api_key/csharp/Program.cs b/examples/metal/user_api_key/csharp/Program.cs index 348eb213..cc4dc2a2 100644 --- a/examples/metal/user_api_key/csharp/Program.cs +++ b/examples/metal/user_api_key/csharp/Program.cs @@ -1,21 +1,15 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var description = config.Get("description") ?? "An user level API Key"; - var readOnly = config.GetBoolean("readOnly") ?? false; - var apiKey = new Equinix.Metal.UserApiKey("apiKey", new() + var test = new Equinix.Metal.UserApiKey("test", new() { - Description = description, - ReadOnly = readOnly, + Description = "Read-only user key", + ReadOnly = true, }); - return new Dictionary - { - ["apiKeyToken"] = apiKey.Token, - }; }); diff --git a/examples/metal/user_api_key/csharp/Pulumi.yaml b/examples/metal/user_api_key/csharp/Pulumi.yaml index 8b67450b..7074469f 100644 --- a/examples/metal/user_api_key/csharp/Pulumi.yaml +++ b/examples/metal/user_api_key/csharp/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-user-api-key +name: equinix-metal-user_api_key runtime: dotnet -description: An Equinix Metal User API Key resource -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false diff --git a/examples/metal/user_api_key/csharp/equinix-metal-user-api-key.csproj b/examples/metal/user_api_key/csharp/equinix-metal-user-api-key.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/user_api_key/csharp/equinix-metal-user-api-key.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/user_api_key/csharp/equinix-metal-user_api_key.csproj b/examples/metal/user_api_key/csharp/equinix-metal-user_api_key.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/user_api_key/csharp/equinix-metal-user_api_key.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/user_api_key/example.md b/examples/metal/user_api_key/example.md deleted file mode 100644 index 269da910..00000000 --- a/examples/metal/user_api_key/example.md +++ /dev/null @@ -1,157 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const description = config.get("description") || "An user level API Key"; -const readOnly = config.getBoolean("readOnly") || false; -const apiKey = new equinix.metal.UserApiKey("apiKey", { - description: description, - readOnly: readOnly, -}); -export const apiKeyToken = apiKey.token; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -description = config.get("description") -if description is None: - description = "An user level API Key" -read_only = config.get_bool("readOnly") -if read_only is None: - read_only = False -api_key = equinix.metal.UserApiKey("apiKey", - description=description, - read_only=read_only) -pulumi.export("apiKeyToken", api_key.token) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - description := "An user level API Key" - if param := cfg.Get("description"); param != "" { - description = param - } - readOnly := false - if param := cfg.GetBool("readOnly"); param { - readOnly = param - } - apiKey, err := metal.NewUserApiKey(ctx, "apiKey", &metal.UserApiKeyArgs{ - Description: pulumi.String(description), - ReadOnly: pulumi.Bool(readOnly), - }) - if err != nil { - return err - } - ctx.Export("apiKeyToken", apiKey.Token) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var description = config.Get("description") ?? "An user level API Key"; - var readOnly = config.GetBoolean("readOnly") ?? false; - var apiKey = new Equinix.Metal.UserApiKey("apiKey", new() - { - Description = description, - ReadOnly = readOnly, - }); - - return new Dictionary - { - ["apiKeyToken"] = apiKey.Token, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.UserApiKey; -import com.equinix.pulumi.metal.UserApiKeyArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var description = config.get("description").orElse("An user level API Key"); - final var readOnly = config.getBoolean("readOnly").orElse(false); - var apiKey = new UserApiKey("apiKey", UserApiKeyArgs.builder() - .description(description) - .readOnly(readOnly) - .build()); - - ctx.export("apiKeyToken", apiKey.token()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false -resources: - apiKey: - type: equinix:metal:UserApiKey - properties: - description: ${description} - readOnly: ${readOnly} -outputs: - apiKeyToken: ${apiKey.token} -``` - -{{% /choosable %}} diff --git a/examples/metal/user_api_key/go/Pulumi.yaml b/examples/metal/user_api_key/go/Pulumi.yaml index 22af5af8..8d470cf3 100644 --- a/examples/metal/user_api_key/go/Pulumi.yaml +++ b/examples/metal/user_api_key/go/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-user-api-key +name: equinix-metal-user_api_key runtime: go -description: An Equinix Metal User API Key resource -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false diff --git a/examples/metal/user_api_key/go/go.mod b/examples/metal/user_api_key/go/go.mod index b81b19ed..73918054 100644 --- a/examples/metal/user_api_key/go/go.mod +++ b/examples/metal/user_api_key/go/go.mod @@ -1,59 +1,94 @@ -module equinix-metal-user-api-key +module equinix-metal-user_api_key -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/user_api_key/go/main.go b/examples/metal/user_api_key/go/main.go index 27be1522..19434d77 100644 --- a/examples/metal/user_api_key/go/main.go +++ b/examples/metal/user_api_key/go/main.go @@ -3,28 +3,17 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - description := "An user level API Key" - if param := cfg.Get("description"); param != "" { - description = param - } - readOnly := false - if param := cfg.GetBool("readOnly"); param { - readOnly = param - } - apiKey, err := metal.NewUserApiKey(ctx, "apiKey", &metal.UserApiKeyArgs{ - Description: pulumi.String(description), - ReadOnly: pulumi.Bool(readOnly), + _, err := metal.NewUserApiKey(ctx, "test", &metal.UserApiKeyArgs{ + Description: pulumi.String("Read-only user key"), + ReadOnly: pulumi.Bool(true), }) if err != nil { return err } - ctx.Export("apiKeyToken", apiKey.Token) return nil }) } diff --git a/examples/metal/user_api_key/java/.gitignore b/examples/metal/user_api_key/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/user_api_key/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/user_api_key/java/Pulumi.yaml b/examples/metal/user_api_key/java/Pulumi.yaml index 4b6856ea..45fc95e4 100644 --- a/examples/metal/user_api_key/java/Pulumi.yaml +++ b/examples/metal/user_api_key/java/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-user-api-key +name: equinix-metal-user_api_key runtime: java -description: An Equinix Metal User API Key resource -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false diff --git a/examples/metal/user_api_key/java/pom.xml b/examples/metal/user_api_key/java/pom.xml index 0a878bc1..612278ca 100644 --- a/examples/metal/user_api_key/java/pom.xml +++ b/examples/metal/user_api_key/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-user-api-key + equinix-metal-user_api_key 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/metal/user_api_key/java/src/main/java/generated_program/App.java b/examples/metal/user_api_key/java/src/main/java/generated_program/App.java index 8a2dfece..a9611730 100644 --- a/examples/metal/user_api_key/java/src/main/java/generated_program/App.java +++ b/examples/metal/user_api_key/java/src/main/java/generated_program/App.java @@ -2,8 +2,15 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.UserApiKey; -import com.equinix.pulumi.metal.UserApiKeyArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.UserApiKey; +import com.pulumi.equinix.metal.UserApiKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -11,14 +18,10 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var description = config.get("description").orElse("An user level API Key"); - final var readOnly = config.getBoolean("readOnly").orElse(false); - var apiKey = new UserApiKey("apiKey", UserApiKeyArgs.builder() - .description(description) - .readOnly(readOnly) + var test = new UserApiKey("test", UserApiKeyArgs.builder() + .description("Read-only user key") + .readOnly(true) .build()); - ctx.export("apiKeyToken", apiKey.token()); } } diff --git a/examples/metal/user_api_key/python/Pulumi.yaml b/examples/metal/user_api_key/python/Pulumi.yaml index 382ae65b..99ce7e51 100644 --- a/examples/metal/user_api_key/python/Pulumi.yaml +++ b/examples/metal/user_api_key/python/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-user-api-key +name: equinix-metal-user_api_key runtime: python -description: An Equinix Metal User API Key resource -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false diff --git a/examples/metal/user_api_key/python/__main__.py b/examples/metal/user_api_key/python/__main__.py index ce28935d..ddfe8ceb 100644 --- a/examples/metal/user_api_key/python/__main__.py +++ b/examples/metal/user_api_key/python/__main__.py @@ -1,14 +1,6 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -description = config.get("description") -if description is None: - description = "An user level API Key" -read_only = config.get_bool("readOnly") -if read_only is None: - read_only = False -api_key = equinix.metal.UserApiKey("apiKey", - description=description, - read_only=read_only) -pulumi.export("apiKeyToken", api_key.token) +test = equinix.metal.UserApiKey("test", + description="Read-only user key", + read_only=True) diff --git a/examples/metal/user_api_key/python/requirements.txt b/examples/metal/user_api_key/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/metal/user_api_key/python/requirements.txt +++ b/examples/metal/user_api_key/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/user_api_key/typescript/Pulumi.yaml b/examples/metal/user_api_key/typescript/Pulumi.yaml index d3f47f72..34d7587b 100644 --- a/examples/metal/user_api_key/typescript/Pulumi.yaml +++ b/examples/metal/user_api_key/typescript/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-user-api-key +name: equinix-metal-user_api_key runtime: nodejs -description: An Equinix Metal User API Key resource -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false diff --git a/examples/metal/user_api_key/typescript/index.ts b/examples/metal/user_api_key/typescript/index.ts index ed314bcc..e456c31c 100644 --- a/examples/metal/user_api_key/typescript/index.ts +++ b/examples/metal/user_api_key/typescript/index.ts @@ -1,11 +1,7 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const description = config.get("description") || "An user level API Key"; -const readOnly = config.getBoolean("readOnly") || false; -const apiKey = new equinix.metal.UserApiKey("apiKey", { - description: description, - readOnly: readOnly, +const test = new equinix.metal.UserApiKey("test", { + description: "Read-only user key", + readOnly: true, }); -export const apiKeyToken = apiKey.token; diff --git a/examples/metal/user_api_key/typescript/package.json b/examples/metal/user_api_key/typescript/package.json index d1c35d42..822973b6 100644 --- a/examples/metal/user_api_key/typescript/package.json +++ b/examples/metal/user_api_key/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-metal-user-api-key", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-metal-user_api_key", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/user_api_key/typescript/tsconfig.json b/examples/metal/user_api_key/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/user_api_key/typescript/tsconfig.json +++ b/examples/metal/user_api_key/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/user_api_key/yaml/Pulumi.yaml b/examples/metal/user_api_key/yaml/Pulumi.yaml deleted file mode 100644 index 543b6325..00000000 --- a/examples/metal/user_api_key/yaml/Pulumi.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: equinix-metal-user-api-key -runtime: yaml -description: An Equinix Metal User API Key resource -config: - description: - type: string - default: An user level API Key - readOnly: - type: boolean - default: false -resources: - apiKey: - type: equinix:metal:UserApiKey - properties: - description: ${description} - readOnly: ${readOnly} -outputs: - apiKeyToken: ${apiKey.token} diff --git a/examples/metal/virtual_circuit/Pulumi.yaml b/examples/metal/virtual_circuit/Pulumi.yaml new file mode 100644 index 00000000..440526e7 --- /dev/null +++ b/examples/metal/virtual_circuit/Pulumi.yaml @@ -0,0 +1,26 @@ +name: equinix-metal-virtual_circuit +runtime: yaml +resources: + testVlan: + type: equinix:metal:Vlan + name: test + properties: + projectId: ${projectId} + metro: ${test.metro} + testVirtualCircuit: + type: equinix:metal:VirtualCircuit + name: test + properties: + connectionId: ${connId} + projectId: ${projectId} + portId: ${test.ports[0].id} + vlanId: ${testVlan.id} + nniVlan: 1056 +variables: + projectId: 52000fb2-ee46-4673-93a8-de2c2bdba33c + connId: 73f12f29-3e19-43a0-8e90-ae81580db1e0 + test: + fn::invoke: + Function: equinix:metal:getInterconnection + Arguments: + connectionId: ${connId} diff --git a/examples/metal/virtual_circuit/csharp/Program.cs b/examples/metal/virtual_circuit/csharp/Program.cs index d98e6a03..699ca3dc 100644 --- a/examples/metal/virtual_circuit/csharp/Program.cs +++ b/examples/metal/virtual_circuit/csharp/Program.cs @@ -1,31 +1,33 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var connectionId = config.Require("connectionId"); - var vlanId = config.Require("vlanId"); - var portId = Equinix.Metal.GetInterconnection.Invoke(new() + var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; + + var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; + + var test = Equinix.Metal.GetInterconnection.Invoke(new() { - ConnectionId = connectionId, - }).Apply(invoke => invoke.Ports[0]?.Id); + ConnectionId = connId, + }); - var vc = new Equinix.Metal.VirtualCircuit("vc", new() + var testVlan = new Equinix.Metal.Vlan("testVlan", new() { - ConnectionId = connectionId, ProjectId = projectId, - PortId = portId, - VlanId = vlanId, - NniVlan = 1056, + Metro = test.Apply(getInterconnectionResult => getInterconnectionResult.Metro), }); - return new Dictionary + var testVirtualCircuit = new Equinix.Metal.VirtualCircuit("testVirtualCircuit", new() { - ["vcStatus"] = vc.Status, - ["vcVnid"] = vc.Vnid, - }; + ConnectionId = connId, + ProjectId = projectId, + PortId = test.Apply(getInterconnectionResult => getInterconnectionResult.Ports[0]?.Id), + VlanId = testVlan.Id, + NniVlan = 1056, + }); + }); diff --git a/examples/metal/virtual_circuit/csharp/Pulumi.yaml b/examples/metal/virtual_circuit/csharp/Pulumi.yaml index 47e41ef0..5c17ac48 100644 --- a/examples/metal/virtual_circuit/csharp/Pulumi.yaml +++ b/examples/metal/virtual_circuit/csharp/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-virtual-circuit +name: equinix-metal-virtual_circuit runtime: dotnet -description: An Equinix Metal Virtual Circuit resource -config: - connectionId: - type: string - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/virtual_circuit/csharp/equinix-metal-virtual-circuit.csproj b/examples/metal/virtual_circuit/csharp/equinix-metal-virtual-circuit.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/virtual_circuit/csharp/equinix-metal-virtual-circuit.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/virtual_circuit/csharp/equinix-metal-virtual_circuit.csproj b/examples/metal/virtual_circuit/csharp/equinix-metal-virtual_circuit.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/virtual_circuit/csharp/equinix-metal-virtual_circuit.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/virtual_circuit/example.md b/examples/metal/virtual_circuit/example.md deleted file mode 100644 index c613ecd7..00000000 --- a/examples/metal/virtual_circuit/example.md +++ /dev/null @@ -1,201 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const connectionId = config.require("connectionId"); -const vlanId = config.require("vlanId"); -const portId = equinix.metal.getInterconnection({ - connectionId: connectionId, -}).then(invoke => invoke.ports?.[0]?.id); -const vc = new equinix.metal.VirtualCircuit("vc", { - connectionId: connectionId, - projectId: projectId, - portId: portId, - vlanId: vlanId, - nniVlan: 1056, -}); -export const vcStatus = vc.status; -export const vcVnid = vc.vnid; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -connection_id = config.require("connectionId") -vlan_id = config.require("vlanId") -port_id = equinix.metal.get_interconnection(connection_id=connection_id).ports[0].id -vc = equinix.metal.VirtualCircuit("vc", - connection_id=connection_id, - project_id=project_id, - port_id=port_id, - vlan_id=vlan_id, - nni_vlan=1056) -pulumi.export("vcStatus", vc.status) -pulumi.export("vcVnid", vc.vnid) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - connectionId := cfg.Require("connectionId") - vlanId := cfg.Require("vlanId") - portId := metal.LookupInterconnection(ctx, &metal.LookupInterconnectionArgs{ - ConnectionId: connectionId, - }, nil).Ports[0].Id - vc, err := metal.NewVirtualCircuit(ctx, "vc", &metal.VirtualCircuitArgs{ - ConnectionId: pulumi.String(connectionId), - ProjectId: pulumi.String(projectId), - PortId: *pulumi.String(portId), - VlanId: pulumi.String(vlanId), - NniVlan: pulumi.Int(1056), - }) - if err != nil { - return err - } - ctx.Export("vcStatus", vc.Status) - ctx.Export("vcVnid", vc.Vnid) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var connectionId = config.Require("connectionId"); - var vlanId = config.Require("vlanId"); - var portId = Equinix.Metal.GetInterconnection.Invoke(new() - { - ConnectionId = connectionId, - }).Apply(invoke => invoke.Ports[0]?.Id); - - var vc = new Equinix.Metal.VirtualCircuit("vc", new() - { - ConnectionId = connectionId, - ProjectId = projectId, - PortId = portId, - VlanId = vlanId, - NniVlan = 1056, - }); - - return new Dictionary - { - ["vcStatus"] = vc.Status, - ["vcVnid"] = vc.Vnid, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.inputs.GetInterconnectionArgs; -import com.equinix.pulumi.metal.MetalFunctions; -import com.equinix.pulumi.metal.VirtualCircuit; -import com.equinix.pulumi.metal.VirtualCircuitArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var connectionId = config.get("connectionId").get(); - final var vlanId = config.get("vlanId").get(); - final var portId = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder() - .connectionId(connectionId) - .build()).applyValue(data -> data.ports().get(0).id()); - - var vc = new VirtualCircuit("vc", VirtualCircuitArgs.builder() - .connectionId(connectionId) - .projectId(projectId) - .portId(portId) - .vlanId(vlanId) - .nniVlan(1056) - .build()); - - ctx.export("vcStatus", vc.status()); - ctx.export("vcVnid", vc.vnid()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - connectionId: - type: string - vlanId: - type: string -variables: - portId: - fn::invoke: - function: equinix:metal:getInterconnection - arguments: - connectionId: ${connectionId} - return: ports[0].id -resources: - vc: - type: equinix:metal:VirtualCircuit - properties: - connectionId: ${connectionId} - projectId: ${projectId} - portId: ${portId} - vlanId: ${vlanId} - nniVlan: 1056 -outputs: - vcStatus: ${vc.status} - vcVnid: ${vc.vnid} -``` - -{{% /choosable %}} diff --git a/examples/metal/virtual_circuit/go/Pulumi.yaml b/examples/metal/virtual_circuit/go/Pulumi.yaml index e18f6fe3..51a6d5c3 100644 --- a/examples/metal/virtual_circuit/go/Pulumi.yaml +++ b/examples/metal/virtual_circuit/go/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-virtual-circuit +name: equinix-metal-virtual_circuit runtime: go -description: An Equinix Metal Virtual Circuit resource -config: - connectionId: - type: string - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/virtual_circuit/go/go.mod b/examples/metal/virtual_circuit/go/go.mod index 5e9ed00b..e599ac04 100644 --- a/examples/metal/virtual_circuit/go/go.mod +++ b/examples/metal/virtual_circuit/go/go.mod @@ -1,59 +1,94 @@ -module equinix-metal-virtual-circuit +module equinix-metal-virtual_circuit -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/virtual_circuit/go/main.go b/examples/metal/virtual_circuit/go/main.go index 77651983..08ba7631 100644 --- a/examples/metal/virtual_circuit/go/main.go +++ b/examples/metal/virtual_circuit/go/main.go @@ -3,30 +3,35 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - connectionId := cfg.Require("connectionId") - vlanId := cfg.Require("vlanId") - portId := metal.LookupInterconnection(ctx, &metal.LookupInterconnectionArgs{ - ConnectionId: connectionId, - }, nil).Ports[0].Id - vc, err := metal.NewVirtualCircuit(ctx, "vc", &metal.VirtualCircuitArgs{ - ConnectionId: pulumi.String(connectionId), + projectId := "52000fb2-ee46-4673-93a8-de2c2bdba33c" + connId := "73f12f29-3e19-43a0-8e90-ae81580db1e0" + test, err := metal.LookupInterconnection(ctx, &metal.LookupInterconnectionArgs{ + ConnectionId: connId, + }, nil) + if err != nil { + return err + } + testVlan, err := metal.NewVlan(ctx, "testVlan", &metal.VlanArgs{ + ProjectId: pulumi.String(projectId), + Metro: pulumi.String(test.Metro), + }) + if err != nil { + return err + } + _, err = metal.NewVirtualCircuit(ctx, "testVirtualCircuit", &metal.VirtualCircuitArgs{ + ConnectionId: pulumi.String(connId), ProjectId: pulumi.String(projectId), - PortId: *pulumi.String(portId), - VlanId: pulumi.String(vlanId), + PortId: pulumi.String(test.Ports[0].Id), + VlanId: testVlan.ID(), NniVlan: pulumi.Int(1056), }) if err != nil { return err } - ctx.Export("vcStatus", vc.Status) - ctx.Export("vcVnid", vc.Vnid) return nil }) } diff --git a/examples/metal/virtual_circuit/java/.gitignore b/examples/metal/virtual_circuit/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/virtual_circuit/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/virtual_circuit/java/Pulumi.yaml b/examples/metal/virtual_circuit/java/Pulumi.yaml index 87874928..48e0bb37 100644 --- a/examples/metal/virtual_circuit/java/Pulumi.yaml +++ b/examples/metal/virtual_circuit/java/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-virtual-circuit +name: equinix-metal-virtual_circuit runtime: java -description: An Equinix Metal Virtual Circuit resource -config: - connectionId: - type: string - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/virtual_circuit/java/pom.xml b/examples/metal/virtual_circuit/java/pom.xml index e03fdd8a..a3f41921 100644 --- a/examples/metal/virtual_circuit/java/pom.xml +++ b/examples/metal/virtual_circuit/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-metal-virtual-circuit + equinix-metal-virtual_circuit 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/metal/virtual_circuit/java/src/main/java/generated_program/App.java b/examples/metal/virtual_circuit/java/src/main/java/generated_program/App.java index 010230de..b4438375 100644 --- a/examples/metal/virtual_circuit/java/src/main/java/generated_program/App.java +++ b/examples/metal/virtual_circuit/java/src/main/java/generated_program/App.java @@ -2,10 +2,19 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.inputs.GetInterconnectionArgs; -import com.equinix.pulumi.metal.MetalFunctions; -import com.equinix.pulumi.metal.VirtualCircuit; -import com.equinix.pulumi.metal.VirtualCircuitArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.MetalFunctions; +import com.pulumi.equinix.metal.inputs.GetInterconnectionArgs; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.VirtualCircuit; +import com.pulumi.equinix.metal.VirtualCircuitArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -13,23 +22,26 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var connectionId = config.get("connectionId").get(); - final var vlanId = config.get("vlanId").get(); - final var portId = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder() - .connectionId(connectionId) - .build()).applyValue(data -> data.ports().get(0).id()); - - var vc = new VirtualCircuit("vc", VirtualCircuitArgs.builder() - .connectionId(connectionId) + final var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; + + final var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; + + final var test = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder() + .connectionId(connId) + .build()); + + var testVlan = new Vlan("testVlan", VlanArgs.builder() + .projectId(projectId) + .metro(test.applyValue(getInterconnectionResult -> getInterconnectionResult.metro())) + .build()); + + var testVirtualCircuit = new VirtualCircuit("testVirtualCircuit", VirtualCircuitArgs.builder() + .connectionId(connId) .projectId(projectId) - .portId(portId) - .vlanId(vlanId) + .portId(test.applyValue(getInterconnectionResult -> getInterconnectionResult.ports()[0].id())) + .vlanId(testVlan.id()) .nniVlan(1056) .build()); - ctx.export("vcStatus", vc.status()); - ctx.export("vcVnid", vc.vnid()); } } diff --git a/examples/metal/virtual_circuit/python/Pulumi.yaml b/examples/metal/virtual_circuit/python/Pulumi.yaml index 1dcd3737..76294979 100644 --- a/examples/metal/virtual_circuit/python/Pulumi.yaml +++ b/examples/metal/virtual_circuit/python/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-virtual-circuit +name: equinix-metal-virtual_circuit runtime: python -description: An Equinix Metal Virtual Circuit resource -config: - connectionId: - type: string - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/virtual_circuit/python/__main__.py b/examples/metal/virtual_circuit/python/__main__.py index c7debd12..85297e07 100644 --- a/examples/metal/virtual_circuit/python/__main__.py +++ b/examples/metal/virtual_circuit/python/__main__.py @@ -1,16 +1,15 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -connection_id = config.require("connectionId") -vlan_id = config.require("vlanId") -port_id = equinix.metal.get_interconnection(connection_id=connection_id).ports[0].id -vc = equinix.metal.VirtualCircuit("vc", - connection_id=connection_id, +project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c" +conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0" +test = equinix.metal.get_interconnection_output(connection_id=conn_id) +test_vlan = equinix.metal.Vlan("testVlan", project_id=project_id, - port_id=port_id, - vlan_id=vlan_id, + metro=test.metro) +test_virtual_circuit = equinix.metal.VirtualCircuit("testVirtualCircuit", + connection_id=conn_id, + project_id=project_id, + port_id=test.ports[0].id, + vlan_id=test_vlan.id, nni_vlan=1056) -pulumi.export("vcStatus", vc.status) -pulumi.export("vcVnid", vc.vnid) diff --git a/examples/metal/virtual_circuit/python/requirements.txt b/examples/metal/virtual_circuit/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/metal/virtual_circuit/python/requirements.txt +++ b/examples/metal/virtual_circuit/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/virtual_circuit/typescript/Pulumi.yaml b/examples/metal/virtual_circuit/typescript/Pulumi.yaml index 60f6b3df..6f271962 100644 --- a/examples/metal/virtual_circuit/typescript/Pulumi.yaml +++ b/examples/metal/virtual_circuit/typescript/Pulumi.yaml @@ -1,10 +1,2 @@ -name: equinix-metal-virtual-circuit +name: equinix-metal-virtual_circuit runtime: nodejs -description: An Equinix Metal Virtual Circuit resource -config: - connectionId: - type: string - projectId: - type: string - vlanId: - type: string diff --git a/examples/metal/virtual_circuit/typescript/index.ts b/examples/metal/virtual_circuit/typescript/index.ts index 0abe6ea4..46481c3e 100644 --- a/examples/metal/virtual_circuit/typescript/index.ts +++ b/examples/metal/virtual_circuit/typescript/index.ts @@ -1,19 +1,20 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const connectionId = config.require("connectionId"); -const vlanId = config.require("vlanId"); -const portId = equinix.metal.getInterconnection({ - connectionId: connectionId, -}).then(invoke => invoke.ports?.[0]?.id); -const vc = new equinix.metal.VirtualCircuit("vc", { - connectionId: connectionId, +const projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; +const connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; +const test = equinix.metal.getInterconnectionOutput({ + connectionId: connId, +}); +const testVlan = new equinix.metal.Vlan("testVlan", { + projectId: projectId, + metro: test.apply(test => test.metro), +}); +const testVirtualCircuit = new equinix.metal.VirtualCircuit("testVirtualCircuit", { + connectionId: connId, projectId: projectId, - portId: portId, - vlanId: vlanId, + portId: test.apply(test => test.ports?.[0]?.id), + vlanId: testVlan.id, nniVlan: 1056, }); -export const vcStatus = vc.status; -export const vcVnid = vc.vnid; diff --git a/examples/metal/virtual_circuit/typescript/package.json b/examples/metal/virtual_circuit/typescript/package.json index 906d1d51..aa7b7902 100644 --- a/examples/metal/virtual_circuit/typescript/package.json +++ b/examples/metal/virtual_circuit/typescript/package.json @@ -1,10 +1,11 @@ { - "name": "equinix-metal-virtual-circuit", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0" - } + "name": "equinix-metal-virtual_circuit", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/virtual_circuit/typescript/tsconfig.json b/examples/metal/virtual_circuit/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/metal/virtual_circuit/typescript/tsconfig.json +++ b/examples/metal/virtual_circuit/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/virtual_circuit/yaml/Pulumi.yaml b/examples/metal/virtual_circuit/yaml/Pulumi.yaml deleted file mode 100644 index 8c24a87c..00000000 --- a/examples/metal/virtual_circuit/yaml/Pulumi.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: equinix-metal-virtual-circuit -runtime: yaml -description: An Equinix Metal Virtual Circuit resource -config: - projectId: - type: string - connectionId: - type: string - vlanId: - type: string -variables: - portId: - fn::invoke: - function: equinix:metal:getInterconnection - arguments: - connectionId: ${connectionId} - return: ports[0].id -resources: - vc: - type: equinix:metal:VirtualCircuit - properties: - connectionId: ${connectionId} - projectId: ${projectId} - portId: ${portId} - vlanId: ${vlanId} - nniVlan: 1056 -outputs: - vcStatus: ${vc.status} - vcVnid: ${vc.vnid} diff --git a/examples/metal/vlan/Pulumi.yaml b/examples/metal/vlan/Pulumi.yaml new file mode 100644 index 00000000..f19ec773 --- /dev/null +++ b/examples/metal/vlan/Pulumi.yaml @@ -0,0 +1,11 @@ +name: equinix-metal-vlan +runtime: yaml +resources: + # Create a new VLAN in metro "esv" + vlan1: + type: equinix:metal:Vlan + properties: + description: VLAN in New Jersey + metro: sv + projectId: ${projectId} + vxlan: 1040 diff --git a/examples/metal/vlan/csharp/Program.cs b/examples/metal/vlan/csharp/Program.cs index 67e247fe..3fad7b56 100644 --- a/examples/metal/vlan/csharp/Program.cs +++ b/examples/metal/vlan/csharp/Program.cs @@ -1,24 +1,17 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "DA"; - var vxlan = config.RequireNumber("vxlan"); - var vlan = new Equinix.Metal.Vlan("vlan", new() + var vlan1 = new Equinix.Metal.Vlan("vlan1", new() { - Description = "VLAN in Dallas", + Description = "VLAN in New Jersey", + Metro = "sv", ProjectId = projectId, - Metro = metro, - Vxlan = vxlan, + Vxlan = 1040, }); - return new Dictionary - { - ["vlanId"] = vlan.Id, - }; }); diff --git a/examples/metal/vlan/csharp/Pulumi.yaml b/examples/metal/vlan/csharp/Pulumi.yaml index 3926a7f4..c4077833 100644 --- a/examples/metal/vlan/csharp/Pulumi.yaml +++ b/examples/metal/vlan/csharp/Pulumi.yaml @@ -1,11 +1,2 @@ name: equinix-metal-vlan runtime: dotnet -description: An Equinix Metal VLAN resource -config: - metro: - type: string - default: DA - projectId: - type: string - vxlan: - type: integer diff --git a/examples/metal/vlan/csharp/equinix-metal-vlan.csproj b/examples/metal/vlan/csharp/equinix-metal-vlan.csproj index 3a2fd255..36182104 100644 --- a/examples/metal/vlan/csharp/equinix-metal-vlan.csproj +++ b/examples/metal/vlan/csharp/equinix-metal-vlan.csproj @@ -5,10 +5,9 @@ net6.0 enable - - + \ No newline at end of file diff --git a/examples/metal/vlan/example.md b/examples/metal/vlan/example.md deleted file mode 100644 index 2f1bc3a9..00000000 --- a/examples/metal/vlan/example.md +++ /dev/null @@ -1,170 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "DA"; -const vxlan = config.requireNumber("vxlan"); -const vlan = new equinix.metal.Vlan("vlan", { - description: "VLAN in Dallas", - projectId: projectId, - metro: metro, - vxlan: vxlan, -}); -export const vlanId = vlan.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "DA" -vxlan = config.require_int("vxlan") -vlan = equinix.metal.Vlan("vlan", - description="VLAN in Dallas", - project_id=project_id, - metro=metro, - vxlan=vxlan) -pulumi.export("vlanId", vlan.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "DA" - if param := cfg.Get("metro"); param != "" { - metro = param - } - vxlan := cfg.RequireInt("vxlan") - vlan, err := metal.NewVlan(ctx, "vlan", &metal.VlanArgs{ - Description: pulumi.String("VLAN in Dallas"), - ProjectId: pulumi.String(projectId), - Metro: pulumi.String(metro), - Vxlan: pulumi.Int(vxlan), - }) - if err != nil { - return err - } - ctx.Export("vlanId", vlan.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "DA"; - var vxlan = config.RequireNumber("vxlan"); - var vlan = new Equinix.Metal.Vlan("vlan", new() - { - Description = "VLAN in Dallas", - ProjectId = projectId, - Metro = metro, - Vxlan = vxlan, - }); - - return new Dictionary - { - ["vlanId"] = vlan.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Vlan; -import com.equinix.pulumi.metal.VlanArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("DA"); - final var vxlan = Integer.parseInt(config.get("vxlan").get()); - var vlan = new Vlan("vlan", VlanArgs.builder() - .description("VLAN in Dallas") - .projectId(projectId) - .metro(metro) - .vxlan(vxlan) - .build()); - - ctx.export("vlanId", vlan.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - metro: - type: string - default: DA - vxlan: - type: integer -resources: - vlan: - type: equinix:metal:Vlan - properties: - description: VLAN in Dallas - projectId: ${projectId} - metro: ${metro} - vxlan: ${vxlan} -outputs: - vlanId: ${vlan.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/vlan/go/Pulumi.yaml b/examples/metal/vlan/go/Pulumi.yaml index 064ae511..13af90f7 100644 --- a/examples/metal/vlan/go/Pulumi.yaml +++ b/examples/metal/vlan/go/Pulumi.yaml @@ -1,11 +1,2 @@ name: equinix-metal-vlan runtime: go -description: An Equinix Metal VLAN resource -config: - metro: - type: string - default: DA - projectId: - type: string - vxlan: - type: integer diff --git a/examples/metal/vlan/go/go.mod b/examples/metal/vlan/go/go.mod index 4f47e616..3eac210e 100644 --- a/examples/metal/vlan/go/go.mod +++ b/examples/metal/vlan/go/go.mod @@ -1,59 +1,94 @@ module equinix-metal-vlan -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/metal/vlan/go/main.go b/examples/metal/vlan/go/main.go index 74938ebc..d315b089 100644 --- a/examples/metal/vlan/go/main.go +++ b/examples/metal/vlan/go/main.go @@ -3,28 +3,19 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "DA" - if param := cfg.Get("metro"); param != "" { - metro = param - } - vxlan := cfg.RequireInt("vxlan") - vlan, err := metal.NewVlan(ctx, "vlan", &metal.VlanArgs{ - Description: pulumi.String("VLAN in Dallas"), - ProjectId: pulumi.String(projectId), - Metro: pulumi.String(metro), - Vxlan: pulumi.Int(vxlan), + _, err := metal.NewVlan(ctx, "vlan1", &metal.VlanArgs{ + Description: pulumi.String("VLAN in New Jersey"), + Metro: pulumi.String("sv"), + ProjectId: pulumi.Any(projectId), + Vxlan: pulumi.Int(1040), }) if err != nil { return err } - ctx.Export("vlanId", vlan.ID()) return nil }) } diff --git a/examples/metal/vlan/java/.gitignore b/examples/metal/vlan/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/vlan/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/vlan/java/Pulumi.yaml b/examples/metal/vlan/java/Pulumi.yaml index b1503e86..3c444c01 100644 --- a/examples/metal/vlan/java/Pulumi.yaml +++ b/examples/metal/vlan/java/Pulumi.yaml @@ -1,11 +1,2 @@ name: equinix-metal-vlan runtime: java -description: An Equinix Metal VLAN resource -config: - metro: - type: string - default: DA - projectId: - type: string - vxlan: - type: integer diff --git a/examples/metal/vlan/java/pom.xml b/examples/metal/vlan/java/pom.xml index 2f86c9d6..fbd452cf 100644 --- a/examples/metal/vlan/java/pom.xml +++ b/examples/metal/vlan/java/pom.xml @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/metal/vlan/java/src/main/java/generated_program/App.java b/examples/metal/vlan/java/src/main/java/generated_program/App.java index 1536c14c..65a3aa7d 100644 --- a/examples/metal/vlan/java/src/main/java/generated_program/App.java +++ b/examples/metal/vlan/java/src/main/java/generated_program/App.java @@ -2,8 +2,15 @@ import com.pulumi.Context; import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Vlan; -import com.equinix.pulumi.metal.VlanArgs; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -11,17 +18,12 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("DA"); - final var vxlan = Integer.parseInt(config.get("vxlan").get()); - var vlan = new Vlan("vlan", VlanArgs.builder() - .description("VLAN in Dallas") + var vlan1 = new Vlan("vlan1", VlanArgs.builder() + .description("VLAN in New Jersey") + .metro("sv") .projectId(projectId) - .metro(metro) - .vxlan(vxlan) + .vxlan(1040) .build()); - ctx.export("vlanId", vlan.id()); } } diff --git a/examples/metal/vlan/python/Pulumi.yaml b/examples/metal/vlan/python/Pulumi.yaml index af9945f1..8d29b9b3 100644 --- a/examples/metal/vlan/python/Pulumi.yaml +++ b/examples/metal/vlan/python/Pulumi.yaml @@ -1,11 +1,2 @@ name: equinix-metal-vlan runtime: python -description: An Equinix Metal VLAN resource -config: - metro: - type: string - default: DA - projectId: - type: string - vxlan: - type: integer diff --git a/examples/metal/vlan/python/__main__.py b/examples/metal/vlan/python/__main__.py index 5f1f5b46..97fddddc 100644 --- a/examples/metal/vlan/python/__main__.py +++ b/examples/metal/vlan/python/__main__.py @@ -1,15 +1,8 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "DA" -vxlan = config.require_int("vxlan") -vlan = equinix.metal.Vlan("vlan", - description="VLAN in Dallas", +vlan1 = equinix.metal.Vlan("vlan1", + description="VLAN in New Jersey", + metro="sv", project_id=project_id, - metro=metro, - vxlan=vxlan) -pulumi.export("vlanId", vlan.id) + vxlan=1040) diff --git a/examples/metal/vlan/python/requirements.txt b/examples/metal/vlan/python/requirements.txt index b16f555d..317d94a1 100644 --- a/examples/metal/vlan/python/requirements.txt +++ b/examples/metal/vlan/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix==0.0.1-alpha.1679684380+903d5f09.dirty +pulumi_equinix==<1.0.0 diff --git a/examples/metal/vlan/typescript/Pulumi.yaml b/examples/metal/vlan/typescript/Pulumi.yaml index afe7756b..a428b732 100644 --- a/examples/metal/vlan/typescript/Pulumi.yaml +++ b/examples/metal/vlan/typescript/Pulumi.yaml @@ -1,11 +1,2 @@ name: equinix-metal-vlan runtime: nodejs -description: An Equinix Metal VLAN resource -config: - metro: - type: string - default: DA - projectId: - type: string - vxlan: - type: integer diff --git a/examples/metal/vlan/typescript/index.ts b/examples/metal/vlan/typescript/index.ts index 3cec0be4..eb128327 100644 --- a/examples/metal/vlan/typescript/index.ts +++ b/examples/metal/vlan/typescript/index.ts @@ -1,14 +1,9 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "DA"; -const vxlan = config.requireNumber("vxlan"); -const vlan = new equinix.metal.Vlan("vlan", { - description: "VLAN in Dallas", +const vlan1 = new equinix.metal.Vlan("vlan1", { + description: "VLAN in New Jersey", + metro: "sv", projectId: projectId, - metro: metro, - vxlan: vxlan, + vxlan: 1040, }); -export const vlanId = vlan.id; diff --git a/examples/metal/vlan/typescript/package.json b/examples/metal/vlan/typescript/package.json index 65ba798e..07536335 100644 --- a/examples/metal/vlan/typescript/package.json +++ b/examples/metal/vlan/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-metal-vlan", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "0.0.1-alpha.1679684380+903d5f09.dirty" - } + "name": "equinix-metal-vlan", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/metal/vlan/typescript/tsconfig.json b/examples/metal/vlan/typescript/tsconfig.json index 2ed7ea95..11fc69af 100644 --- a/examples/metal/vlan/typescript/tsconfig.json +++ b/examples/metal/vlan/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts", - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/metal/vlan/yaml/Pulumi.yaml b/examples/metal/vlan/yaml/Pulumi.yaml deleted file mode 100644 index 89c194bb..00000000 --- a/examples/metal/vlan/yaml/Pulumi.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: equinix-metal-vlan -runtime: yaml -description: An Equinix Metal VLAN resource -config: - projectId: - type: string - metro: - type: string - default: DA - vxlan: - type: integer -resources: - vlan: - type: equinix:metal:Vlan - properties: - description: VLAN in Dallas - projectId: ${projectId} - metro: ${metro} - vxlan: ${vxlan} -outputs: - vlanId: ${vlan.id} diff --git a/examples/metal/vrf/csharp/Program.cs b/examples/metal/vrf/csharp/Program.cs deleted file mode 100644 index 7507a25d..00000000 --- a/examples/metal/vrf/csharp/Program.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "DA"; - var vrf = new Equinix.Metal.Vrf("vrf", new() - { - Description = "VRF with ASN 65000 and a pool of address space", - Name = "example-vrf", - Metro = metro, - LocalAsn = 65000, - IpRanges = new[] - { - "192.168.100.0/25", - "192.168.200.0/25", - }, - ProjectId = projectId, - }); - - return new Dictionary - { - ["vrfId"] = vrf.Id, - }; -}); - diff --git a/examples/metal/vrf/csharp/Pulumi.yaml b/examples/metal/vrf/csharp/Pulumi.yaml deleted file mode 100644 index d2124645..00000000 --- a/examples/metal/vrf/csharp/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-vrf -runtime: dotnet -description: An Equinix Metal VRF resource -config: - metro: - type: string - default: DA - projectId: - type: string diff --git a/examples/metal/vrf/csharp/equinix-metal-vlan.csproj b/examples/metal/vrf/csharp/equinix-metal-vlan.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/vrf/csharp/equinix-metal-vlan.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/vrf/csharp/equinix-metal-vrf.csproj b/examples/metal/vrf/csharp/equinix-metal-vrf.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/metal/vrf/csharp/equinix-metal-vrf.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/metal/vrf/example.md b/examples/metal/vrf/example.md deleted file mode 100644 index 424774b1..00000000 --- a/examples/metal/vrf/example.md +++ /dev/null @@ -1,192 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "DA"; -const vrf = new equinix.metal.Vrf("vrf", { - description: "VRF with ASN 65000 and a pool of address space", - name: "example-vrf", - metro: metro, - localAsn: 65000, - ipRanges: [ - "192.168.100.0/25", - "192.168.200.0/25", - ], - projectId: projectId, -}); -export const vrfId = vrf.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "DA" -vrf = equinix.metal.Vrf("vrf", - description="VRF with ASN 65000 and a pool of address space", - name="example-vrf", - metro=metro, - local_asn=65000, - ip_ranges=[ - "192.168.100.0/25", - "192.168.200.0/25", - ], - project_id=project_id) -pulumi.export("vrfId", vrf.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "DA" - if param := cfg.Get("metro"); param != "" { - metro = param - } - vrf, err := metal.NewVrf(ctx, "vrf", &metal.VrfArgs{ - Description: pulumi.String("VRF with ASN 65000 and a pool of address space"), - Name: pulumi.String("example-vrf"), - Metro: pulumi.String(metro), - LocalAsn: pulumi.Int(65000), - IpRanges: pulumi.StringArray{ - pulumi.String("192.168.100.0/25"), - pulumi.String("192.168.200.0/25"), - }, - ProjectId: pulumi.String(projectId), - }) - if err != nil { - return err - } - ctx.Export("vrfId", vrf.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var projectId = config.Require("projectId"); - var metro = config.Get("metro") ?? "DA"; - var vrf = new Equinix.Metal.Vrf("vrf", new() - { - Description = "VRF with ASN 65000 and a pool of address space", - Name = "example-vrf", - Metro = metro, - LocalAsn = 65000, - IpRanges = new[] - { - "192.168.100.0/25", - "192.168.200.0/25", - }, - ProjectId = projectId, - }); - - return new Dictionary - { - ["vrfId"] = vrf.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Vrf; -import com.equinix.pulumi.metal.VrfArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("DA"); - var vrf = new Vrf("vrf", VrfArgs.builder() - .description("VRF with ASN 65000 and a pool of address space") - .name("example-vrf") - .metro(metro) - .localAsn(65000) - .ipRanges( - "192.168.100.0/25", - "192.168.200.0/25") - .projectId(projectId) - .build()); - - ctx.export("vrfId", vrf.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - projectId: - type: string - metro: - type: string - default: DA -resources: - vrf: - type: equinix:metal:Vrf - properties: - description: VRF with ASN 65000 and a pool of address space - name: example-vrf - metro: ${metro} - localAsn: "65000" - ipRanges: - - 192.168.100.0/25 - - 192.168.200.0/25 - projectId: ${projectId} -outputs: - vrfId: ${vrf.id} -``` - -{{% /choosable %}} diff --git a/examples/metal/vrf/example_1/Pulumi.yaml b/examples/metal/vrf/example_1/Pulumi.yaml new file mode 100644 index 00000000..388f2304 --- /dev/null +++ b/examples/metal/vrf/example_1/Pulumi.yaml @@ -0,0 +1,19 @@ +name: equinix-metal-vrf-example_1 +runtime: yaml +resources: + example: + type: equinix:metal:Project + properties: + name: example + exampleVrf: + type: equinix:metal:Vrf + name: example + properties: + description: VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25 + name: example-vrf + metro: da + localAsn: '65000' + ipRanges: + - 192.168.100.0/25 + - 192.168.200.0/25 + projectId: ${example.id} diff --git a/examples/metal/vrf/example_1/csharp/.gitignore b/examples/metal/vrf/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/vrf/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/vrf/example_1/csharp/Program.cs b/examples/metal/vrf/example_1/csharp/Program.cs new file mode 100644 index 00000000..dbd9371f --- /dev/null +++ b/examples/metal/vrf/example_1/csharp/Program.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var example = new Equinix.Metal.Project("example", new() + { + Name = "example", + }); + + var exampleVrf = new Equinix.Metal.Vrf("exampleVrf", new() + { + Description = "VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25", + Name = "example-vrf", + Metro = "da", + LocalAsn = 65000, + IpRanges = new[] + { + "192.168.100.0/25", + "192.168.200.0/25", + }, + ProjectId = example.Id, + }); + +}); + diff --git a/examples/metal/vrf/example_1/csharp/Pulumi.yaml b/examples/metal/vrf/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..a8ccf87b --- /dev/null +++ b/examples/metal/vrf/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_1 +runtime: dotnet diff --git a/examples/metal/vrf/example_1/csharp/equinix-metal-vrf-example_1.csproj b/examples/metal/vrf/example_1/csharp/equinix-metal-vrf-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/vrf/example_1/csharp/equinix-metal-vrf-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/vrf/example_1/go/Pulumi.yaml b/examples/metal/vrf/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..23c9c9eb --- /dev/null +++ b/examples/metal/vrf/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_1 +runtime: go diff --git a/examples/metal/vrf/example_1/go/go.mod b/examples/metal/vrf/example_1/go/go.mod new file mode 100644 index 00000000..a6ccf6b4 --- /dev/null +++ b/examples/metal/vrf/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-vrf-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/vrf/example_1/go/main.go b/examples/metal/vrf/example_1/go/main.go new file mode 100644 index 00000000..94a89049 --- /dev/null +++ b/examples/metal/vrf/example_1/go/main.go @@ -0,0 +1,32 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + example, err := metal.NewProject(ctx, "example", &metal.ProjectArgs{ + Name: pulumi.String("example"), + }) + if err != nil { + return err + } + _, err = metal.NewVrf(ctx, "exampleVrf", &metal.VrfArgs{ + Description: pulumi.String("VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25"), + Name: pulumi.String("example-vrf"), + Metro: pulumi.String("da"), + LocalAsn: pulumi.Int(65000), + IpRanges: pulumi.StringArray{ + pulumi.String("192.168.100.0/25"), + pulumi.String("192.168.200.0/25"), + }, + ProjectId: example.ID(), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/vrf/example_1/java/Pulumi.yaml b/examples/metal/vrf/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..736a4994 --- /dev/null +++ b/examples/metal/vrf/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_1 +runtime: java diff --git a/examples/metal/vrf/example_1/java/pom.xml b/examples/metal/vrf/example_1/java/pom.xml new file mode 100644 index 00000000..bb9fb1d4 --- /dev/null +++ b/examples/metal/vrf/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-vrf-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/vrf/example_1/java/src/main/java/generated_program/App.java b/examples/metal/vrf/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..f0e07cd2 --- /dev/null +++ b/examples/metal/vrf/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,39 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.Project; +import com.pulumi.equinix.metal.ProjectArgs; +import com.pulumi.equinix.metal.Vrf; +import com.pulumi.equinix.metal.VrfArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var example = new Project("example", ProjectArgs.builder() + .name("example") + .build()); + + var exampleVrf = new Vrf("exampleVrf", VrfArgs.builder() + .description("VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25") + .name("example-vrf") + .metro("da") + .localAsn("65000") + .ipRanges( + "192.168.100.0/25", + "192.168.200.0/25") + .projectId(example.id()) + .build()); + + } +} diff --git a/examples/metal/vrf/example_1/python/.gitignore b/examples/metal/vrf/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/vrf/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/vrf/example_1/python/Pulumi.yaml b/examples/metal/vrf/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..3cede9a2 --- /dev/null +++ b/examples/metal/vrf/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_1 +runtime: python diff --git a/examples/metal/vrf/example_1/python/__main__.py b/examples/metal/vrf/example_1/python/__main__.py new file mode 100644 index 00000000..932d0529 --- /dev/null +++ b/examples/metal/vrf/example_1/python/__main__.py @@ -0,0 +1,14 @@ +import pulumi +import pulumi_equinix as equinix + +example = equinix.metal.Project("example", name="example") +example_vrf = equinix.metal.Vrf("exampleVrf", + description="VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25", + name="example-vrf", + metro="da", + local_asn=65000, + ip_ranges=[ + "192.168.100.0/25", + "192.168.200.0/25", + ], + project_id=example.id) diff --git a/examples/metal/vrf/example_1/python/requirements.txt b/examples/metal/vrf/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/vrf/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/vrf/example_1/typescript/.gitignore b/examples/metal/vrf/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/vrf/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/vrf/example_1/typescript/Pulumi.yaml b/examples/metal/vrf/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..ae02f246 --- /dev/null +++ b/examples/metal/vrf/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_1 +runtime: nodejs diff --git a/examples/metal/vrf/example_1/typescript/index.ts b/examples/metal/vrf/example_1/typescript/index.ts new file mode 100644 index 00000000..95e95bcb --- /dev/null +++ b/examples/metal/vrf/example_1/typescript/index.ts @@ -0,0 +1,15 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const example = new equinix.metal.Project("example", {name: "example"}); +const exampleVrf = new equinix.metal.Vrf("exampleVrf", { + description: "VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25", + name: "example-vrf", + metro: "da", + localAsn: 65000, + ipRanges: [ + "192.168.100.0/25", + "192.168.200.0/25", + ], + projectId: example.id, +}); diff --git a/examples/metal/vrf/example_1/typescript/package.json b/examples/metal/vrf/example_1/typescript/package.json new file mode 100644 index 00000000..8d4b4ab2 --- /dev/null +++ b/examples/metal/vrf/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-vrf-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/vrf/example_1/typescript/tsconfig.json b/examples/metal/vrf/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/vrf/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/vrf/example_2/Pulumi.yaml b/examples/metal/vrf/example_2/Pulumi.yaml new file mode 100644 index 00000000..33a3c857 --- /dev/null +++ b/examples/metal/vrf/example_2/Pulumi.yaml @@ -0,0 +1,27 @@ +name: equinix-metal-vrf-example_2 +runtime: yaml +resources: + example: + type: equinix:metal:ReservedIpBlock + properties: + description: Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space. + projectId: ${exampleEquinixMetalProject.id} + metro: ${exampleEquinixMetalVrf.metro} + type: vrf + vrfId: ${exampleEquinixMetalVrf.id} + cidr: 29 + network: 192.168.100.0 + exampleVlan: + type: equinix:metal:Vlan + name: example + properties: + description: A VLAN for Layer2 and Hybrid Metal devices + metro: ${exampleEquinixMetalVrf.metro} + projectId: ${exampleEquinixMetalProject.id} + exampleGateway: + type: equinix:metal:Gateway + name: example + properties: + projectId: ${exampleEquinixMetalProject.id} + vlanId: ${exampleVlan.id} + ipReservationId: ${example.id} diff --git a/examples/metal/vrf/example_2/csharp/.gitignore b/examples/metal/vrf/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/vrf/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/vrf/example_2/csharp/Program.cs b/examples/metal/vrf/example_2/csharp/Program.cs new file mode 100644 index 00000000..bf0c039d --- /dev/null +++ b/examples/metal/vrf/example_2/csharp/Program.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var example = new Equinix.Metal.ReservedIpBlock("example", new() + { + Description = "Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.", + ProjectId = exampleEquinixMetalProject.Id, + Metro = exampleEquinixMetalVrf.Metro, + Type = "vrf", + VrfId = exampleEquinixMetalVrf.Id, + Cidr = 29, + Network = "192.168.100.0", + }); + + var exampleVlan = new Equinix.Metal.Vlan("exampleVlan", new() + { + Description = "A VLAN for Layer2 and Hybrid Metal devices", + Metro = exampleEquinixMetalVrf.Metro, + ProjectId = exampleEquinixMetalProject.Id, + }); + + var exampleGateway = new Equinix.Metal.Gateway("exampleGateway", new() + { + ProjectId = exampleEquinixMetalProject.Id, + VlanId = exampleVlan.Id, + IpReservationId = example.Id, + }); + +}); + diff --git a/examples/metal/vrf/example_2/csharp/Pulumi.yaml b/examples/metal/vrf/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..1d333837 --- /dev/null +++ b/examples/metal/vrf/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_2 +runtime: dotnet diff --git a/examples/metal/vrf/example_2/csharp/equinix-metal-vrf-example_2.csproj b/examples/metal/vrf/example_2/csharp/equinix-metal-vrf-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/vrf/example_2/csharp/equinix-metal-vrf-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/vrf/example_2/go/Pulumi.yaml b/examples/metal/vrf/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..c90c9672 --- /dev/null +++ b/examples/metal/vrf/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_2 +runtime: go diff --git a/examples/metal/vrf/example_2/go/go.mod b/examples/metal/vrf/example_2/go/go.mod new file mode 100644 index 00000000..97fbade7 --- /dev/null +++ b/examples/metal/vrf/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-vrf-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/vrf/example_2/go/main.go b/examples/metal/vrf/example_2/go/main.go new file mode 100644 index 00000000..d30c4bb9 --- /dev/null +++ b/examples/metal/vrf/example_2/go/main.go @@ -0,0 +1,40 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + example, err := metal.NewReservedIpBlock(ctx, "example", &metal.ReservedIpBlockArgs{ + Description: pulumi.String("Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space."), + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + Metro: pulumi.Any(exampleEquinixMetalVrf.Metro), + Type: pulumi.String("vrf"), + VrfId: pulumi.Any(exampleEquinixMetalVrf.Id), + Cidr: pulumi.Int(29), + Network: pulumi.String("192.168.100.0"), + }) + if err != nil { + return err + } + exampleVlan, err := metal.NewVlan(ctx, "exampleVlan", &metal.VlanArgs{ + Description: pulumi.String("A VLAN for Layer2 and Hybrid Metal devices"), + Metro: pulumi.Any(exampleEquinixMetalVrf.Metro), + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + }) + if err != nil { + return err + } + _, err = metal.NewGateway(ctx, "exampleGateway", &metal.GatewayArgs{ + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + VlanId: exampleVlan.ID(), + IpReservationId: example.ID(), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/vrf/example_2/java/Pulumi.yaml b/examples/metal/vrf/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..7c1cddaf --- /dev/null +++ b/examples/metal/vrf/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_2 +runtime: java diff --git a/examples/metal/vrf/example_2/java/pom.xml b/examples/metal/vrf/example_2/java/pom.xml new file mode 100644 index 00000000..c5d6f501 --- /dev/null +++ b/examples/metal/vrf/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-vrf-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/vrf/example_2/java/src/main/java/generated_program/App.java b/examples/metal/vrf/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..a5d4c694 --- /dev/null +++ b/examples/metal/vrf/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,48 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.ReservedIpBlock; +import com.pulumi.equinix.metal.ReservedIpBlockArgs; +import com.pulumi.equinix.metal.Vlan; +import com.pulumi.equinix.metal.VlanArgs; +import com.pulumi.equinix.metal.Gateway; +import com.pulumi.equinix.metal.GatewayArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var example = new ReservedIpBlock("example", ReservedIpBlockArgs.builder() + .description("Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.") + .projectId(exampleEquinixMetalProject.id()) + .metro(exampleEquinixMetalVrf.metro()) + .type("vrf") + .vrfId(exampleEquinixMetalVrf.id()) + .cidr(29) + .network("192.168.100.0") + .build()); + + var exampleVlan = new Vlan("exampleVlan", VlanArgs.builder() + .description("A VLAN for Layer2 and Hybrid Metal devices") + .metro(exampleEquinixMetalVrf.metro()) + .projectId(exampleEquinixMetalProject.id()) + .build()); + + var exampleGateway = new Gateway("exampleGateway", GatewayArgs.builder() + .projectId(exampleEquinixMetalProject.id()) + .vlanId(exampleVlan.id()) + .ipReservationId(example.id()) + .build()); + + } +} diff --git a/examples/metal/vrf/example_2/python/.gitignore b/examples/metal/vrf/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/vrf/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/vrf/example_2/python/Pulumi.yaml b/examples/metal/vrf/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..3f10aff8 --- /dev/null +++ b/examples/metal/vrf/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_2 +runtime: python diff --git a/examples/metal/vrf/example_2/python/__main__.py b/examples/metal/vrf/example_2/python/__main__.py new file mode 100644 index 00000000..71c5aebd --- /dev/null +++ b/examples/metal/vrf/example_2/python/__main__.py @@ -0,0 +1,19 @@ +import pulumi +import pulumi_equinix as equinix + +example = equinix.metal.ReservedIpBlock("example", + description="Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.", + project_id=example_equinix_metal_project["id"], + metro=example_equinix_metal_vrf["metro"], + type="vrf", + vrf_id=example_equinix_metal_vrf["id"], + cidr=29, + network="192.168.100.0") +example_vlan = equinix.metal.Vlan("exampleVlan", + description="A VLAN for Layer2 and Hybrid Metal devices", + metro=example_equinix_metal_vrf["metro"], + project_id=example_equinix_metal_project["id"]) +example_gateway = equinix.metal.Gateway("exampleGateway", + project_id=example_equinix_metal_project["id"], + vlan_id=example_vlan.id, + ip_reservation_id=example.id) diff --git a/examples/metal/vrf/example_2/python/requirements.txt b/examples/metal/vrf/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/vrf/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/vrf/example_2/typescript/.gitignore b/examples/metal/vrf/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/vrf/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/vrf/example_2/typescript/Pulumi.yaml b/examples/metal/vrf/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..e818ae34 --- /dev/null +++ b/examples/metal/vrf/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_2 +runtime: nodejs diff --git a/examples/metal/vrf/example_2/typescript/index.ts b/examples/metal/vrf/example_2/typescript/index.ts new file mode 100644 index 00000000..6897e049 --- /dev/null +++ b/examples/metal/vrf/example_2/typescript/index.ts @@ -0,0 +1,22 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const example = new equinix.metal.ReservedIpBlock("example", { + description: "Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.", + projectId: exampleEquinixMetalProject.id, + metro: exampleEquinixMetalVrf.metro, + type: "vrf", + vrfId: exampleEquinixMetalVrf.id, + cidr: 29, + network: "192.168.100.0", +}); +const exampleVlan = new equinix.metal.Vlan("exampleVlan", { + description: "A VLAN for Layer2 and Hybrid Metal devices", + metro: exampleEquinixMetalVrf.metro, + projectId: exampleEquinixMetalProject.id, +}); +const exampleGateway = new equinix.metal.Gateway("exampleGateway", { + projectId: exampleEquinixMetalProject.id, + vlanId: exampleVlan.id, + ipReservationId: example.id, +}); diff --git a/examples/metal/vrf/example_2/typescript/package.json b/examples/metal/vrf/example_2/typescript/package.json new file mode 100644 index 00000000..0296bbe8 --- /dev/null +++ b/examples/metal/vrf/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-vrf-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/vrf/example_2/typescript/tsconfig.json b/examples/metal/vrf/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/vrf/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/vrf/example_3/Pulumi.yaml b/examples/metal/vrf/example_3/Pulumi.yaml new file mode 100644 index 00000000..b6e8de2d --- /dev/null +++ b/examples/metal/vrf/example_3/Pulumi.yaml @@ -0,0 +1,24 @@ +name: equinix-metal-vrf-example_3 +runtime: yaml +resources: + exampleVirtualCircuit: + type: equinix:metal:VirtualCircuit + name: example + properties: + name: example-vc + description: Virtual Circuit + connectionId: ${example.id} + projectId: ${exampleEquinixMetalProject.id} + portId: ${example.ports[0].id} + nniVlan: 1024 + vrfId: ${exampleEquinixMetalVrf.id} + peerAsn: 65530 + subnet: 192.168.100.16/31 + metalIp: 192.168.100.16 + customerIp: 192.168.100.17 +variables: + example: + fn::invoke: + Function: equinix:metal:getInterconnection + Arguments: + connectionId: ${metalDedicatedConnectionId} diff --git a/examples/metal/vrf/example_3/csharp/.gitignore b/examples/metal/vrf/example_3/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/metal/vrf/example_3/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/metal/vrf/example_3/csharp/Program.cs b/examples/metal/vrf/example_3/csharp/Program.cs new file mode 100644 index 00000000..4542456e --- /dev/null +++ b/examples/metal/vrf/example_3/csharp/Program.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var exampleVirtualCircuit = new Equinix.Metal.VirtualCircuit("exampleVirtualCircuit", new() + { + Name = "example-vc", + Description = "Virtual Circuit", + ConnectionId = example.Id, + ProjectId = exampleEquinixMetalProject.Id, + PortId = example.Ports[0].Id, + NniVlan = 1024, + VrfId = exampleEquinixMetalVrf.Id, + PeerAsn = 65530, + Subnet = "192.168.100.16/31", + MetalIp = "192.168.100.16", + CustomerIp = "192.168.100.17", + }); + +}); + diff --git a/examples/metal/vrf/example_3/csharp/Pulumi.yaml b/examples/metal/vrf/example_3/csharp/Pulumi.yaml new file mode 100644 index 00000000..e828de23 --- /dev/null +++ b/examples/metal/vrf/example_3/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_3 +runtime: dotnet diff --git a/examples/metal/vrf/example_3/csharp/equinix-metal-vrf-example_3.csproj b/examples/metal/vrf/example_3/csharp/equinix-metal-vrf-example_3.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/metal/vrf/example_3/csharp/equinix-metal-vrf-example_3.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/metal/vrf/example_3/go/Pulumi.yaml b/examples/metal/vrf/example_3/go/Pulumi.yaml new file mode 100644 index 00000000..793aef47 --- /dev/null +++ b/examples/metal/vrf/example_3/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_3 +runtime: go diff --git a/examples/metal/vrf/example_3/go/go.mod b/examples/metal/vrf/example_3/go/go.mod new file mode 100644 index 00000000..efe12ae5 --- /dev/null +++ b/examples/metal/vrf/example_3/go/go.mod @@ -0,0 +1,94 @@ +module equinix-metal-vrf-example_3 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/metal/vrf/example_3/go/main.go b/examples/metal/vrf/example_3/go/main.go new file mode 100644 index 00000000..5467bd7f --- /dev/null +++ b/examples/metal/vrf/example_3/go/main.go @@ -0,0 +1,28 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := metal.NewVirtualCircuit(ctx, "exampleVirtualCircuit", &metal.VirtualCircuitArgs{ + Name: pulumi.String("example-vc"), + Description: pulumi.String("Virtual Circuit"), + ConnectionId: pulumi.Any(example.Id), + ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), + PortId: pulumi.Any(example.Ports[0].Id), + NniVlan: pulumi.Int(1024), + VrfId: pulumi.Any(exampleEquinixMetalVrf.Id), + PeerAsn: pulumi.Int(65530), + Subnet: pulumi.String("192.168.100.16/31"), + MetalIp: pulumi.String("192.168.100.16"), + CustomerIp: pulumi.String("192.168.100.17"), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/metal/vrf/example_3/java/Pulumi.yaml b/examples/metal/vrf/example_3/java/Pulumi.yaml new file mode 100644 index 00000000..0eba22c7 --- /dev/null +++ b/examples/metal/vrf/example_3/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_3 +runtime: java diff --git a/examples/metal/vrf/example_3/java/pom.xml b/examples/metal/vrf/example_3/java/pom.xml new file mode 100644 index 00000000..f2b3d2f3 --- /dev/null +++ b/examples/metal/vrf/example_3/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-metal-vrf-example_3 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/metal/vrf/example_3/java/src/main/java/generated_program/App.java b/examples/metal/vrf/example_3/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..ef18ea8a --- /dev/null +++ b/examples/metal/vrf/example_3/java/src/main/java/generated_program/App.java @@ -0,0 +1,36 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.metal.VirtualCircuit; +import com.pulumi.equinix.metal.VirtualCircuitArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var exampleVirtualCircuit = new VirtualCircuit("exampleVirtualCircuit", VirtualCircuitArgs.builder() + .name("example-vc") + .description("Virtual Circuit") + .connectionId(example.id()) + .projectId(exampleEquinixMetalProject.id()) + .portId(example.ports()[0].id()) + .nniVlan(1024) + .vrfId(exampleEquinixMetalVrf.id()) + .peerAsn(65530) + .subnet("192.168.100.16/31") + .metalIp("192.168.100.16") + .customerIp("192.168.100.17") + .build()); + + } +} diff --git a/examples/metal/vrf/example_3/python/.gitignore b/examples/metal/vrf/example_3/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/metal/vrf/example_3/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/metal/vrf/example_3/python/Pulumi.yaml b/examples/metal/vrf/example_3/python/Pulumi.yaml new file mode 100644 index 00000000..22a877d7 --- /dev/null +++ b/examples/metal/vrf/example_3/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_3 +runtime: python diff --git a/examples/metal/vrf/example_3/python/__main__.py b/examples/metal/vrf/example_3/python/__main__.py new file mode 100644 index 00000000..d538f112 --- /dev/null +++ b/examples/metal/vrf/example_3/python/__main__.py @@ -0,0 +1,15 @@ +import pulumi +import pulumi_equinix as equinix + +example_virtual_circuit = equinix.metal.VirtualCircuit("exampleVirtualCircuit", + name="example-vc", + description="Virtual Circuit", + connection_id=example["id"], + project_id=example_equinix_metal_project["id"], + port_id=example["ports"][0]["id"], + nni_vlan=1024, + vrf_id=example_equinix_metal_vrf["id"], + peer_asn=65530, + subnet="192.168.100.16/31", + metal_ip="192.168.100.16", + customer_ip="192.168.100.17") diff --git a/examples/metal/vrf/example_3/python/requirements.txt b/examples/metal/vrf/example_3/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/metal/vrf/example_3/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/metal/vrf/example_3/typescript/.gitignore b/examples/metal/vrf/example_3/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/metal/vrf/example_3/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/metal/vrf/example_3/typescript/Pulumi.yaml b/examples/metal/vrf/example_3/typescript/Pulumi.yaml new file mode 100644 index 00000000..47eebc04 --- /dev/null +++ b/examples/metal/vrf/example_3/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-metal-vrf-example_3 +runtime: nodejs diff --git a/examples/metal/vrf/example_3/typescript/index.ts b/examples/metal/vrf/example_3/typescript/index.ts new file mode 100644 index 00000000..261ae715 --- /dev/null +++ b/examples/metal/vrf/example_3/typescript/index.ts @@ -0,0 +1,16 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; + +const exampleVirtualCircuit = new equinix.metal.VirtualCircuit("exampleVirtualCircuit", { + name: "example-vc", + description: "Virtual Circuit", + connectionId: example.id, + projectId: exampleEquinixMetalProject.id, + portId: example.ports[0].id, + nniVlan: 1024, + vrfId: exampleEquinixMetalVrf.id, + peerAsn: 65530, + subnet: "192.168.100.16/31", + metalIp: "192.168.100.16", + customerIp: "192.168.100.17", +}); diff --git a/examples/metal/vrf/example_3/typescript/package.json b/examples/metal/vrf/example_3/typescript/package.json new file mode 100644 index 00000000..62730721 --- /dev/null +++ b/examples/metal/vrf/example_3/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-metal-vrf-example_3", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/metal/vrf/example_3/typescript/tsconfig.json b/examples/metal/vrf/example_3/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/metal/vrf/example_3/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/metal/vrf/go/Pulumi.yaml b/examples/metal/vrf/go/Pulumi.yaml deleted file mode 100644 index 23c7db5a..00000000 --- a/examples/metal/vrf/go/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-vrf -runtime: go -description: An Equinix Metal VRF resource -config: - metro: - type: string - default: DA - projectId: - type: string diff --git a/examples/metal/vrf/go/go.mod b/examples/metal/vrf/go/go.mod deleted file mode 100644 index 075c7ece..00000000 --- a/examples/metal/vrf/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-metal-vrf - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/metal/vrf/go/main.go b/examples/metal/vrf/go/main.go deleted file mode 100644 index a98b003b..00000000 --- a/examples/metal/vrf/go/main.go +++ /dev/null @@ -1,34 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - projectId := cfg.Require("projectId") - metro := "DA" - if param := cfg.Get("metro"); param != "" { - metro = param - } - vrf, err := metal.NewVrf(ctx, "vrf", &metal.VrfArgs{ - Description: pulumi.String("VRF with ASN 65000 and a pool of address space"), - Name: pulumi.String("example-vrf"), - Metro: pulumi.String(metro), - LocalAsn: pulumi.Int(65000), - IpRanges: pulumi.StringArray{ - pulumi.String("192.168.100.0/25"), - pulumi.String("192.168.200.0/25"), - }, - ProjectId: pulumi.String(projectId), - }) - if err != nil { - return err - } - ctx.Export("vrfId", vrf.ID()) - return nil - }) -} diff --git a/examples/metal/vrf/java/.gitignore b/examples/metal/vrf/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/metal/vrf/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/metal/vrf/java/Pulumi.yaml b/examples/metal/vrf/java/Pulumi.yaml deleted file mode 100644 index 67a036e0..00000000 --- a/examples/metal/vrf/java/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-vrf -runtime: java -description: An Equinix Metal VRF resource -config: - metro: - type: string - default: DA - projectId: - type: string diff --git a/examples/metal/vrf/java/pom.xml b/examples/metal/vrf/java/pom.xml deleted file mode 100644 index d67c192d..00000000 --- a/examples/metal/vrf/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-metal-vrf - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/metal/vrf/java/src/main/java/generated_program/App.java b/examples/metal/vrf/java/src/main/java/generated_program/App.java deleted file mode 100644 index 3aa66bb1..00000000 --- a/examples/metal/vrf/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,30 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.equinix.pulumi.metal.Vrf; -import com.equinix.pulumi.metal.VrfArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var projectId = config.get("projectId").get(); - final var metro = config.get("metro").orElse("DA"); - var vrf = new Vrf("vrf", VrfArgs.builder() - .description("VRF with ASN 65000 and a pool of address space") - .name("example-vrf") - .metro(metro) - .localAsn(65000) - .ipRanges( - "192.168.100.0/25", - "192.168.200.0/25") - .projectId(projectId) - .build()); - - ctx.export("vrfId", vrf.id()); - } -} diff --git a/examples/metal/vrf/python/Pulumi.yaml b/examples/metal/vrf/python/Pulumi.yaml deleted file mode 100644 index 7b570d7e..00000000 --- a/examples/metal/vrf/python/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-vrf -runtime: python -description: An Equinix Metal VRF resource -config: - metro: - type: string - default: DA - projectId: - type: string diff --git a/examples/metal/vrf/python/__main__.py b/examples/metal/vrf/python/__main__.py deleted file mode 100644 index 254f93aa..00000000 --- a/examples/metal/vrf/python/__main__.py +++ /dev/null @@ -1,19 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -project_id = config.require("projectId") -metro = config.get("metro") -if metro is None: - metro = "DA" -vrf = equinix.metal.Vrf("vrf", - description="VRF with ASN 65000 and a pool of address space", - name="example-vrf", - metro=metro, - local_asn=65000, - ip_ranges=[ - "192.168.100.0/25", - "192.168.200.0/25", - ], - project_id=project_id) -pulumi.export("vrfId", vrf.id) diff --git a/examples/metal/vrf/python/requirements.txt b/examples/metal/vrf/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/metal/vrf/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/metal/vrf/typescript/Pulumi.yaml b/examples/metal/vrf/typescript/Pulumi.yaml deleted file mode 100644 index 2e935af4..00000000 --- a/examples/metal/vrf/typescript/Pulumi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: equinix-metal-vrf -runtime: nodejs -description: An Equinix Metal VRF resource -config: - metro: - type: string - default: DA - projectId: - type: string diff --git a/examples/metal/vrf/typescript/index.ts b/examples/metal/vrf/typescript/index.ts deleted file mode 100644 index b26d2f33..00000000 --- a/examples/metal/vrf/typescript/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const projectId = config.require("projectId"); -const metro = config.get("metro") || "DA"; -const vrf = new equinix.metal.Vrf("vrf", { - description: "VRF with ASN 65000 and a pool of address space", - name: "example-vrf", - metro: metro, - localAsn: 65000, - ipRanges: [ - "192.168.100.0/25", - "192.168.200.0/25", - ], - projectId: projectId, -}); -export const vrfId = vrf.id; diff --git a/examples/metal/vrf/typescript/package.json b/examples/metal/vrf/typescript/package.json deleted file mode 100644 index 74c7c3b3..00000000 --- a/examples/metal/vrf/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-metal-vrf", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/metal/vrf/typescript/tsconfig.json b/examples/metal/vrf/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/metal/vrf/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/metal/vrf/yaml/Pulumi.yaml b/examples/metal/vrf/yaml/Pulumi.yaml deleted file mode 100644 index 2b1af7a7..00000000 --- a/examples/metal/vrf/yaml/Pulumi.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: equinix-metal-vrf -runtime: yaml -description: An Equinix Metal VRF resource -config: - projectId: - type: string - metro: - type: string - default: DA -resources: - vrf: - type: equinix:metal:Vrf - properties: - description: VRF with ASN 65000 and a pool of address space - name: example-vrf - metro: ${metro} - localAsn: 65000 - ipRanges: - - 192.168.100.0/25 - - 192.168.200.0/25 - projectId: ${projectId} -outputs: - vrfId: ${vrf.id} diff --git a/examples/network/acl_template/Pulumi.yaml b/examples/network/acl_template/Pulumi.yaml new file mode 100644 index 00000000..bc0b3c79 --- /dev/null +++ b/examples/network/acl_template/Pulumi.yaml @@ -0,0 +1,20 @@ +name: equinix-network-acl_template +runtime: yaml +resources: + # Creates ACL template and assigns it to the network device + myacl: + type: equinix:networkedge:AclTemplate + properties: + name: test + description: Test ACL template + projectId: a86d7112-d740-4758-9c9c-31e66373746b + inboundRules: + - subnet: 1.1.1.1/32 + protocol: IP + srcPort: any + dstPort: any + description: inbound rule description + - subnet: 172.16.25.0/24 + protocol: UDP + srcPort: any + dstPort: 53,1045,2041 diff --git a/examples/network/acl_template/csharp/Program.cs b/examples/network/acl_template/csharp/Program.cs index f9b8fede..b11d8a65 100644 --- a/examples/network/acl_template/csharp/Program.cs +++ b/examples/network/acl_template/csharp/Program.cs @@ -1,37 +1,34 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var aclTemplate = new Equinix.NetworkEdge.AclTemplate("aclTemplate", new() + var myacl = new Equinix.NetworkEdge.AclTemplate("myacl", new() { Name = "test", Description = "Test ACL template", + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", InboundRules = new[] { new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs { Subnet = "1.1.1.1/32", - Protocol = "IP", + Protocol = Equinix.NetworkEdge.AclRuleProtocolType.IP, SrcPort = "any", DstPort = "any", Description = "inbound rule description", }, new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs { - Subnet = "2.2.2.2/28", - Protocol = "TCP", + Subnet = "172.16.25.0/24", + Protocol = Equinix.NetworkEdge.AclRuleProtocolType.UDP, SrcPort = "any", - DstPort = "any", - Description = "inbound rule description", + DstPort = "53,1045,2041", }, }, }); - return new Dictionary - { - ["templateId"] = aclTemplate.Id, - }; }); diff --git a/examples/network/acl_template/csharp/Pulumi.yaml b/examples/network/acl_template/csharp/Pulumi.yaml index 7778c83c..0bfdef12 100644 --- a/examples/network/acl_template/csharp/Pulumi.yaml +++ b/examples/network/acl_template/csharp/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-acl-template +name: equinix-network-acl_template runtime: dotnet -description: An Equinix Network Edge Access Control List template resource diff --git a/examples/network/acl_template/csharp/equinix-network-acl_template.csproj b/examples/network/acl_template/csharp/equinix-network-acl_template.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/acl_template/csharp/equinix-network-acl_template.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/acl_template/csharp/equinix-networkedge-acl-template.csproj b/examples/network/acl_template/csharp/equinix-networkedge-acl-template.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/acl_template/csharp/equinix-networkedge-acl-template.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/acl_template/example.md b/examples/network/acl_template/example.md deleted file mode 100644 index 02e611e3..00000000 --- a/examples/network/acl_template/example.md +++ /dev/null @@ -1,225 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const aclTemplate = new equinix.networkedge.AclTemplate("aclTemplate", { - name: "test", - description: "Test ACL template", - inboundRules: [ - { - subnet: "1.1.1.1/32", - protocol: "IP", - srcPort: "any", - dstPort: "any", - description: "inbound rule description", - }, - { - subnet: "2.2.2.2/28", - protocol: "TCP", - srcPort: "any", - dstPort: "any", - description: "inbound rule description", - }, - ], -}); -export const templateId = aclTemplate.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -acl_template = equinix.networkedge.AclTemplate("aclTemplate", - name="test", - description="Test ACL template", - inbound_rules=[ - equinix.networkedge.AclTemplateInboundRuleArgs( - subnet="1.1.1.1/32", - protocol="IP", - src_port="any", - dst_port="any", - description="inbound rule description", - ), - equinix.networkedge.AclTemplateInboundRuleArgs( - subnet="2.2.2.2/28", - protocol="TCP", - src_port="any", - dst_port="any", - description="inbound rule description", - ), - ]) -pulumi.export("templateId", acl_template.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - aclTemplate, err := networkedge.NewAclTemplate(ctx, "aclTemplate", &networkedge.AclTemplateArgs{ - Name: pulumi.String("test"), - Description: pulumi.String("Test ACL template"), - InboundRules: networkedge.AclTemplateInboundRuleArray{ - &networkedge.AclTemplateInboundRuleArgs{ - Subnet: pulumi.String("1.1.1.1/32"), - Protocol: pulumi.String("IP"), - SrcPort: pulumi.String("any"), - DstPort: pulumi.String("any"), - Description: pulumi.String("inbound rule description"), - }, - &networkedge.AclTemplateInboundRuleArgs{ - Subnet: pulumi.String("2.2.2.2/28"), - Protocol: pulumi.String("TCP"), - SrcPort: pulumi.String("any"), - DstPort: pulumi.String("any"), - Description: pulumi.String("inbound rule description"), - }, - }, - }) - if err != nil { - return err - } - ctx.Export("templateId", aclTemplate.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var aclTemplate = new Equinix.NetworkEdge.AclTemplate("aclTemplate", new() - { - Name = "test", - Description = "Test ACL template", - InboundRules = new[] - { - new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs - { - Subnet = "1.1.1.1/32", - Protocol = "IP", - SrcPort = "any", - DstPort = "any", - Description = "inbound rule description", - }, - new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs - { - Subnet = "2.2.2.2/28", - Protocol = "TCP", - SrcPort = "any", - DstPort = "any", - Description = "inbound rule description", - }, - }, - }); - - return new Dictionary - { - ["templateId"] = aclTemplate.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.AclTemplate; -import com.equinix.pulumi.networkedge.AclTemplateArgs; -import com.equinix.pulumi.networkedge.inputs.AclTemplateInboundRuleArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var aclTemplate = new AclTemplate("aclTemplate", AclTemplateArgs.builder() - .name("test") - .description("Test ACL template") - .inboundRules( - AclTemplateInboundRuleArgs.builder() - .subnet("1.1.1.1/32") - .protocol("IP") - .srcPort("any") - .dstPort("any") - .description("inbound rule description") - .build(), - AclTemplateInboundRuleArgs.builder() - .subnet("2.2.2.2/28") - .protocol("TCP") - .srcPort("any") - .dstPort("any") - .description("inbound rule description") - .build()) - .build()); - - ctx.export("templateId", aclTemplate.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -resources: - aclTemplate: - type: equinix:networkedge:AclTemplate - properties: - name: test - description: Test ACL template - inboundRules: - - subnet: 1.1.1.1/32 - protocol: IP - srcPort: any - dstPort: any - description: inbound rule description - - subnet: 2.2.2.2/28 - protocol: TCP - srcPort: any - dstPort: any - description: inbound rule description -outputs: - templateId: ${aclTemplate.id} -``` - -{{% /choosable %}} diff --git a/examples/network/acl_template/go/Pulumi.yaml b/examples/network/acl_template/go/Pulumi.yaml index 776042e3..ad0c49ea 100644 --- a/examples/network/acl_template/go/Pulumi.yaml +++ b/examples/network/acl_template/go/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-acl-template +name: equinix-network-acl_template runtime: go -description: An Equinix Network Edge Access Control List template resource diff --git a/examples/network/acl_template/go/go.mod b/examples/network/acl_template/go/go.mod index 6b30bdfa..2621e07d 100644 --- a/examples/network/acl_template/go/go.mod +++ b/examples/network/acl_template/go/go.mod @@ -1,58 +1,94 @@ -module equinix-networkedge-acl-template +module equinix-network-acl_template -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/network/acl_template/go/main.go b/examples/network/acl_template/go/main.go index 54768025..47b1555b 100644 --- a/examples/network/acl_template/go/main.go +++ b/examples/network/acl_template/go/main.go @@ -7,30 +7,29 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - aclTemplate, err := networkedge.NewAclTemplate(ctx, "aclTemplate", &networkedge.AclTemplateArgs{ + _, err := networkedge.NewAclTemplate(ctx, "myacl", &networkedge.AclTemplateArgs{ Name: pulumi.String("test"), Description: pulumi.String("Test ACL template"), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), InboundRules: networkedge.AclTemplateInboundRuleArray{ &networkedge.AclTemplateInboundRuleArgs{ Subnet: pulumi.String("1.1.1.1/32"), - Protocol: pulumi.String("IP"), + Protocol: pulumi.String(networkedge.AclRuleProtocolTypeIP), SrcPort: pulumi.String("any"), DstPort: pulumi.String("any"), Description: pulumi.String("inbound rule description"), }, &networkedge.AclTemplateInboundRuleArgs{ - Subnet: pulumi.String("2.2.2.2/28"), - Protocol: pulumi.String("TCP"), - SrcPort: pulumi.String("any"), - DstPort: pulumi.String("any"), - Description: pulumi.String("inbound rule description"), + Subnet: pulumi.String("172.16.25.0/24"), + Protocol: pulumi.String(networkedge.AclRuleProtocolTypeUDP), + SrcPort: pulumi.String("any"), + DstPort: pulumi.String("53,1045,2041"), }, }, }) if err != nil { return err } - ctx.Export("templateId", aclTemplate.ID()) return nil }) } diff --git a/examples/network/acl_template/java/.gitignore b/examples/network/acl_template/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/network/acl_template/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/network/acl_template/java/Pulumi.yaml b/examples/network/acl_template/java/Pulumi.yaml index 17d7e6ce..c468dcd0 100644 --- a/examples/network/acl_template/java/Pulumi.yaml +++ b/examples/network/acl_template/java/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-acl-template +name: equinix-network-acl_template runtime: java -description: An Equinix Network Edge Access Control List template resource diff --git a/examples/network/acl_template/java/pom.xml b/examples/network/acl_template/java/pom.xml index 935c79e3..b86cf052 100644 --- a/examples/network/acl_template/java/pom.xml +++ b/examples/network/acl_template/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-networkedge-acl-template + equinix-network-acl_template 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/network/acl_template/java/src/main/java/generated_program/App.java b/examples/network/acl_template/java/src/main/java/generated_program/App.java index 33026d68..db30f11d 100644 --- a/examples/network/acl_template/java/src/main/java/generated_program/App.java +++ b/examples/network/acl_template/java/src/main/java/generated_program/App.java @@ -3,9 +3,9 @@ import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.AclTemplate; -import com.equinix.pulumi.networkedge.AclTemplateArgs; -import com.equinix.pulumi.networkedge.inputs.AclTemplateInboundRuleArgs; +import com.pulumi.equinix.networkedge.AclTemplate; +import com.pulumi.equinix.networkedge.AclTemplateArgs; +import com.pulumi.equinix.networkedge.inputs.AclTemplateInboundRuleArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -19,9 +19,10 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - var aclTemplate = new AclTemplate("aclTemplate", AclTemplateArgs.builder() + var myacl = new AclTemplate("myacl", AclTemplateArgs.builder() .name("test") .description("Test ACL template") + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") .inboundRules( AclTemplateInboundRuleArgs.builder() .subnet("1.1.1.1/32") @@ -31,14 +32,12 @@ public static void stack(Context ctx) { .description("inbound rule description") .build(), AclTemplateInboundRuleArgs.builder() - .subnet("2.2.2.2/28") - .protocol("TCP") + .subnet("172.16.25.0/24") + .protocol("UDP") .srcPort("any") - .dstPort("any") - .description("inbound rule description") + .dstPort("53,1045,2041") .build()) .build()); - ctx.export("templateId", aclTemplate.id()); } } diff --git a/examples/network/acl_template/python/Pulumi.yaml b/examples/network/acl_template/python/Pulumi.yaml index 744bbfca..63ecb4ac 100644 --- a/examples/network/acl_template/python/Pulumi.yaml +++ b/examples/network/acl_template/python/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-acl-template +name: equinix-network-acl_template runtime: python -description: An Equinix Network Edge Access Control List template resource diff --git a/examples/network/acl_template/python/__main__.py b/examples/network/acl_template/python/__main__.py index 5bcaf9b8..7ed3a24e 100644 --- a/examples/network/acl_template/python/__main__.py +++ b/examples/network/acl_template/python/__main__.py @@ -1,23 +1,22 @@ import pulumi import pulumi_equinix as equinix -acl_template = equinix.networkedge.AclTemplate("aclTemplate", +myacl = equinix.networkedge.AclTemplate("myacl", name="test", description="Test ACL template", + project_id="a86d7112-d740-4758-9c9c-31e66373746b", inbound_rules=[ equinix.networkedge.AclTemplateInboundRuleArgs( subnet="1.1.1.1/32", - protocol="IP", + protocol=equinix.networkedge.AclRuleProtocolType.IP, src_port="any", dst_port="any", description="inbound rule description", ), equinix.networkedge.AclTemplateInboundRuleArgs( - subnet="2.2.2.2/28", - protocol="TCP", + subnet="172.16.25.0/24", + protocol=equinix.networkedge.AclRuleProtocolType.UDP, src_port="any", - dst_port="any", - description="inbound rule description", + dst_port="53,1045,2041", ), ]) -pulumi.export("templateId", acl_template.id) diff --git a/examples/network/acl_template/python/requirements.txt b/examples/network/acl_template/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/network/acl_template/python/requirements.txt +++ b/examples/network/acl_template/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/acl_template/typescript/Pulumi.yaml b/examples/network/acl_template/typescript/Pulumi.yaml index 43abb1bf..3804092b 100644 --- a/examples/network/acl_template/typescript/Pulumi.yaml +++ b/examples/network/acl_template/typescript/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-acl-template +name: equinix-network-acl_template runtime: nodejs -description: An Equinix Network Edge Access Control List template resource diff --git a/examples/network/acl_template/typescript/index.ts b/examples/network/acl_template/typescript/index.ts index a86d953e..a56e0cb0 100644 --- a/examples/network/acl_template/typescript/index.ts +++ b/examples/network/acl_template/typescript/index.ts @@ -1,24 +1,23 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const aclTemplate = new equinix.networkedge.AclTemplate("aclTemplate", { +const myacl = new equinix.networkedge.AclTemplate("myacl", { name: "test", description: "Test ACL template", + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", inboundRules: [ { subnet: "1.1.1.1/32", - protocol: "IP", + protocol: equinix.networkedge.AclRuleProtocolType.IP, srcPort: "any", dstPort: "any", description: "inbound rule description", }, { - subnet: "2.2.2.2/28", - protocol: "TCP", + subnet: "172.16.25.0/24", + protocol: equinix.networkedge.AclRuleProtocolType.UDP, srcPort: "any", - dstPort: "any", - description: "inbound rule description", + dstPort: "53,1045,2041", }, ], }); -export const templateId = aclTemplate.id; diff --git a/examples/network/acl_template/typescript/package.json b/examples/network/acl_template/typescript/package.json index 591fdac7..e347e7ad 100644 --- a/examples/network/acl_template/typescript/package.json +++ b/examples/network/acl_template/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-networkedge-acl-template", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-network-acl_template", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/network/acl_template/typescript/tsconfig.json b/examples/network/acl_template/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/network/acl_template/typescript/tsconfig.json +++ b/examples/network/acl_template/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/network/acl_template/yaml/Pulumi.yaml b/examples/network/acl_template/yaml/Pulumi.yaml deleted file mode 100644 index fac5ea82..00000000 --- a/examples/network/acl_template/yaml/Pulumi.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: equinix-networkedge-acl-template -runtime: yaml -description: An Equinix Network Edge Access Control List template resource -resources: - aclTemplate: - type: equinix:networkedge:AclTemplate - properties: - name: test - description: Test ACL template - inboundRules: - - subnet: 1.1.1.1/32 - protocol: IP - srcPort: any - dstPort: any - description: inbound rule description - - subnet: 2.2.2.2/28 - protocol: TCP - srcPort: any - dstPort: any - description: inbound rule description -outputs: - templateId: ${aclTemplate.id} diff --git a/examples/network/bgp/Pulumi.yaml b/examples/network/bgp/Pulumi.yaml new file mode 100644 index 00000000..f3eb017f --- /dev/null +++ b/examples/network/bgp/Pulumi.yaml @@ -0,0 +1,14 @@ +name: equinix-network-bgp +runtime: yaml +resources: + # Create BGP peering configuration on a existing connection + # between network device and service provider + test: + type: equinix:networkedge:Bgp + properties: + connectionId: 54014acf-9730-4b55-a791-459283d05fb1 + localIpAddress: 10.1.1.1/30 + localAsn: 12345 + remoteIpAddress: 10.1.1.2 + remoteAsn: 66123 + authenticationKey: secret diff --git a/examples/network/bgp/csharp/Program.cs b/examples/network/bgp/csharp/Program.cs index 10e72c05..ddb6b018 100644 --- a/examples/network/bgp/csharp/Program.cs +++ b/examples/network/bgp/csharp/Program.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var bgp = new Equinix.NetworkEdge.Bgp("bgp", new() + var test = new Equinix.NetworkEdge.Bgp("test", new() { ConnectionId = "54014acf-9730-4b55-a791-459283d05fb1", LocalIpAddress = "10.1.1.1/30", @@ -14,10 +15,5 @@ AuthenticationKey = "secret", }); - return new Dictionary - { - ["state"] = bgp.State, - ["provisioningStatus"] = bgp.ProvisioningStatus, - }; }); diff --git a/examples/network/bgp/csharp/Pulumi.yaml b/examples/network/bgp/csharp/Pulumi.yaml index f1a18e9a..9f6823ca 100644 --- a/examples/network/bgp/csharp/Pulumi.yaml +++ b/examples/network/bgp/csharp/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-bgp +name: equinix-network-bgp runtime: dotnet -description: An Equinix Network Edge BGP peering configuration resource diff --git a/examples/network/bgp/csharp/equinix-network-bgp.csproj b/examples/network/bgp/csharp/equinix-network-bgp.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/bgp/csharp/equinix-network-bgp.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/bgp/csharp/equinix-networkedge-bgp.csproj b/examples/network/bgp/csharp/equinix-networkedge-bgp.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/bgp/csharp/equinix-networkedge-bgp.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/bgp/example.md b/examples/network/bgp/example.md deleted file mode 100644 index 34897bb8..00000000 --- a/examples/network/bgp/example.md +++ /dev/null @@ -1,161 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const bgp = new equinix.networkedge.Bgp("bgp", { - connectionId: "54014acf-9730-4b55-a791-459283d05fb1", - localIpAddress: "10.1.1.1/30", - localAsn: 12345, - remoteIpAddress: "10.1.1.2", - remoteAsn: 66123, - authenticationKey: "secret", -}); -export const state = bgp.state; -export const provisioningStatus = bgp.provisioningStatus; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -bgp = equinix.networkedge.Bgp("bgp", - connection_id="54014acf-9730-4b55-a791-459283d05fb1", - local_ip_address="10.1.1.1/30", - local_asn=12345, - remote_ip_address="10.1.1.2", - remote_asn=66123, - authentication_key="secret") -pulumi.export("state", bgp.state) -pulumi.export("provisioningStatus", bgp.provisioning_status) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - bgp, err := networkedge.NewBgp(ctx, "bgp", &networkedge.BgpArgs{ - ConnectionId: pulumi.String("54014acf-9730-4b55-a791-459283d05fb1"), - LocalIpAddress: pulumi.String("10.1.1.1/30"), - LocalAsn: pulumi.Int(12345), - RemoteIpAddress: pulumi.String("10.1.1.2"), - RemoteAsn: pulumi.Int(66123), - AuthenticationKey: pulumi.String("secret"), - }) - if err != nil { - return err - } - ctx.Export("state", bgp.State) - ctx.Export("provisioningStatus", bgp.ProvisioningStatus) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var bgp = new Equinix.NetworkEdge.Bgp("bgp", new() - { - ConnectionId = "54014acf-9730-4b55-a791-459283d05fb1", - LocalIpAddress = "10.1.1.1/30", - LocalAsn = 12345, - RemoteIpAddress = "10.1.1.2", - RemoteAsn = 66123, - AuthenticationKey = "secret", - }); - - return new Dictionary - { - ["state"] = bgp.State, - ["provisioningStatus"] = bgp.ProvisioningStatus, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -ppackage generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.Bgp; -import com.equinix.pulumi.networkedge.BgpArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var bgp = new Bgp("bgp", BgpArgs.builder() - .connectionId("54014acf-9730-4b55-a791-459283d05fb1") - .localIpAddress("10.1.1.1/30") - .localAsn(12345) - .remoteIpAddress("10.1.1.2") - .remoteAsn(66123) - .authenticationKey("secret") - .build()); - - ctx.export("state", bgp.state()); - ctx.export("provisioningStatus", bgp.provisioningStatus()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -resources: - bgp: - type: equinix:networkedge:Bgp - properties: - connectionId: 54014acf-9730-4b55-a791-459283d05fb1 - localIpAddress: 10.1.1.1/30 - localAsn: 12345 - remoteIpAddress: 10.1.1.2 - remoteAsn: 66123 - authenticationKey: secret -outputs: - state: ${bgp.state} - provisioningStatus: ${bgp.provisioningStatus} -``` - -{{% /choosable %}} diff --git a/examples/network/bgp/go/Pulumi.yaml b/examples/network/bgp/go/Pulumi.yaml index b3a84136..336f1e52 100644 --- a/examples/network/bgp/go/Pulumi.yaml +++ b/examples/network/bgp/go/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-bgp +name: equinix-network-bgp runtime: go -description: An Equinix Network Edge BGP peering configuration resource diff --git a/examples/network/bgp/go/go.mod b/examples/network/bgp/go/go.mod index 4e50850b..06183dd9 100644 --- a/examples/network/bgp/go/go.mod +++ b/examples/network/bgp/go/go.mod @@ -1,58 +1,94 @@ -module equinix-networkedge-bgp +module equinix-network-bgp -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/network/bgp/go/main.go b/examples/network/bgp/go/main.go index 4b035b8a..3bba31ed 100644 --- a/examples/network/bgp/go/main.go +++ b/examples/network/bgp/go/main.go @@ -7,7 +7,7 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - bgp, err := networkedge.NewBgp(ctx, "bgp", &networkedge.BgpArgs{ + _, err := networkedge.NewBgp(ctx, "test", &networkedge.BgpArgs{ ConnectionId: pulumi.String("54014acf-9730-4b55-a791-459283d05fb1"), LocalIpAddress: pulumi.String("10.1.1.1/30"), LocalAsn: pulumi.Int(12345), @@ -18,8 +18,6 @@ func main() { if err != nil { return err } - ctx.Export("state", bgp.State) - ctx.Export("provisioningStatus", bgp.ProvisioningStatus) return nil }) } diff --git a/examples/network/bgp/java/.gitignore b/examples/network/bgp/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/network/bgp/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/network/bgp/java/Pulumi.yaml b/examples/network/bgp/java/Pulumi.yaml index cc320b89..6fe8519b 100644 --- a/examples/network/bgp/java/Pulumi.yaml +++ b/examples/network/bgp/java/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-bgp +name: equinix-network-bgp runtime: java -description: An Equinix Network Edge BGP peering configuration resource diff --git a/examples/network/bgp/java/pom.xml b/examples/network/bgp/java/pom.xml index d6d5270b..b8dcd674 100644 --- a/examples/network/bgp/java/pom.xml +++ b/examples/network/bgp/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-networkedge-bgp + equinix-network-bgp 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/network/bgp/java/src/main/java/generated_program/App.java b/examples/network/bgp/java/src/main/java/generated_program/App.java index d2a22079..5c62c0d5 100644 --- a/examples/network/bgp/java/src/main/java/generated_program/App.java +++ b/examples/network/bgp/java/src/main/java/generated_program/App.java @@ -3,8 +3,8 @@ import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.Bgp; -import com.equinix.pulumi.networkedge.BgpArgs; +import com.pulumi.equinix.networkedge.Bgp; +import com.pulumi.equinix.networkedge.BgpArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -18,7 +18,7 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - var bgp = new Bgp("bgp", BgpArgs.builder() + var test = new Bgp("test", BgpArgs.builder() .connectionId("54014acf-9730-4b55-a791-459283d05fb1") .localIpAddress("10.1.1.1/30") .localAsn(12345) @@ -27,7 +27,5 @@ public static void stack(Context ctx) { .authenticationKey("secret") .build()); - ctx.export("state", bgp.state()); - ctx.export("provisioningStatus", bgp.provisioningStatus()); } } diff --git a/examples/network/bgp/python/Pulumi.yaml b/examples/network/bgp/python/Pulumi.yaml index e5282481..38f7e7b3 100644 --- a/examples/network/bgp/python/Pulumi.yaml +++ b/examples/network/bgp/python/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-bgp +name: equinix-network-bgp runtime: python -description: An Equinix Network Edge BGP peering configuration resource diff --git a/examples/network/bgp/python/__main__.py b/examples/network/bgp/python/__main__.py index 4c3fa49d..92e11f75 100644 --- a/examples/network/bgp/python/__main__.py +++ b/examples/network/bgp/python/__main__.py @@ -1,12 +1,10 @@ import pulumi import pulumi_equinix as equinix -bgp = equinix.networkedge.Bgp("bgp", +test = equinix.networkedge.Bgp("test", connection_id="54014acf-9730-4b55-a791-459283d05fb1", local_ip_address="10.1.1.1/30", local_asn=12345, remote_ip_address="10.1.1.2", remote_asn=66123, authentication_key="secret") -pulumi.export("state", bgp.state) -pulumi.export("provisioningStatus", bgp.provisioning_status) diff --git a/examples/network/bgp/python/requirements.txt b/examples/network/bgp/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/network/bgp/python/requirements.txt +++ b/examples/network/bgp/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/bgp/typescript/Pulumi.yaml b/examples/network/bgp/typescript/Pulumi.yaml index 44cdaa36..eb47e9fa 100644 --- a/examples/network/bgp/typescript/Pulumi.yaml +++ b/examples/network/bgp/typescript/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-bgp +name: equinix-network-bgp runtime: nodejs -description: An Equinix Network Edge BGP peering configuration resource diff --git a/examples/network/bgp/typescript/index.ts b/examples/network/bgp/typescript/index.ts index 478d5a4b..075e7eba 100644 --- a/examples/network/bgp/typescript/index.ts +++ b/examples/network/bgp/typescript/index.ts @@ -1,7 +1,7 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const bgp = new equinix.networkedge.Bgp("bgp", { +const test = new equinix.networkedge.Bgp("test", { connectionId: "54014acf-9730-4b55-a791-459283d05fb1", localIpAddress: "10.1.1.1/30", localAsn: 12345, @@ -9,5 +9,3 @@ const bgp = new equinix.networkedge.Bgp("bgp", { remoteAsn: 66123, authenticationKey: "secret", }); -export const state = bgp.state; -export const provisioningStatus = bgp.provisioningStatus; diff --git a/examples/network/bgp/typescript/package.json b/examples/network/bgp/typescript/package.json index 0b2dc917..7bd118a3 100644 --- a/examples/network/bgp/typescript/package.json +++ b/examples/network/bgp/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-networkedge-bgp", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-network-bgp", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/network/bgp/typescript/tsconfig.json b/examples/network/bgp/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/network/bgp/typescript/tsconfig.json +++ b/examples/network/bgp/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/network/bgp/yaml/Pulumi.yaml b/examples/network/bgp/yaml/Pulumi.yaml deleted file mode 100644 index 9e372118..00000000 --- a/examples/network/bgp/yaml/Pulumi.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: equinix-networkedge-bgp -runtime: yaml -description: An Equinix Network Edge BGP peering configuration resource -resources: - bgp: - type: equinix:networkedge:Bgp - properties: - connectionId: 54014acf-9730-4b55-a791-459283d05fb1 - localIpAddress: 10.1.1.1/30 - localAsn: 12345 - remoteIpAddress: 10.1.1.2 - remoteAsn: 66123 - authenticationKey: secret -outputs: - state: ${bgp.state} - provisioningStatus: ${bgp.provisioningStatus} diff --git a/examples/network/device/csharp/Program.cs b/examples/network/device/csharp/Program.cs deleted file mode 100644 index 3ee700b8..00000000 --- a/examples/network/device/csharp/Program.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var accountName = config.Require("accountName"); - var licenseToken = config.Require("licenseToken"); - var sshUserName = config.Require("sshUserName"); - var sshKeyName = config.Require("sshKeyName"); - var aclTemplateId = config.Require("aclTemplateId"); - var metro = config.Get("metro") ?? "SV"; - var devicePackageCode = config.Get("devicePackageCode") ?? "network-essentials"; - var deviceVersion = config.Get("deviceVersion") ?? "17.06.01a"; - var sizeInCores = config.GetNumber("sizeInCores") ?? 2; - var termLength = config.GetNumber("termLength") ?? 6; - var additionalBandwidth = config.GetNumber("additionalBandwidth") ?? 5; - var accountNum = Equinix.NetworkEdge.GetAccount.Invoke(new() - { - Name = accountName, - MetroCode = metro, - }).Apply(invoke => invoke.Number); - - var c8KRouter = new Equinix.NetworkEdge.Device("c8kRouter", new() - { - Name = "catalystRouter", - MetroCode = metro, - TypeCode = "C8000V", - SelfManaged = true, - Byol = true, - PackageCode = devicePackageCode, - Notifications = new[] - { - "example@equinix.com", - }, - Hostname = "C8KV", - AccountNumber = accountNum, - Version = deviceVersion, - CoreCount = sizeInCores, - TermLength = termLength, - LicenseToken = licenseToken, - AdditionalBandwidth = additionalBandwidth, - SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs - { - Username = sshUserName, - KeyName = sshKeyName, - }, - AclTemplateId = aclTemplateId, - }); - - return new Dictionary - { - ["routerId"] = c8KRouter.Id, - ["provisionStatus"] = c8KRouter.Status, - ["licenseStatus"] = c8KRouter.LicenseStatus, - ["sshIpAddress"] = c8KRouter.SshIpAddress, - }; -}); diff --git a/examples/network/device/csharp/Pulumi.yaml b/examples/network/device/csharp/Pulumi.yaml deleted file mode 100644 index 3fae331b..00000000 --- a/examples/network/device/csharp/Pulumi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: equinix-networkedge-device-cisco-C8KV -runtime: dotnet -description: An Equinix Network Edge virtual network device - Cisco Catalyst 8000V Router -config: - accountName: - type: string - aclTemplateId: - type: string - additionalBandwidth: - type: integer - default: 5 - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - licenseToken: - type: string - metro: - type: string - default: SV - sizeInCores: - type: integer - default: 2 - sshKeyName: - type: string - sshUserName: - type: string - termLength: - type: integer - default: 6 diff --git a/examples/network/device/csharp/equinix-network-device.csproj b/examples/network/device/csharp/equinix-network-device.csproj deleted file mode 100644 index 8bca4b15..00000000 --- a/examples/network/device/csharp/equinix-network-device.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - \ No newline at end of file diff --git a/examples/network/device/csharp/equinix-networkedge-device-cisco-C8KV.csproj b/examples/network/device/csharp/equinix-networkedge-device-cisco-C8KV.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/device/csharp/equinix-networkedge-device-cisco-C8KV.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/device/csharp/equinix-networkedge-device.csproj b/examples/network/device/csharp/equinix-networkedge-device.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/device/csharp/equinix-networkedge-device.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/device/example.md b/examples/network/device/example.md deleted file mode 100644 index 07249d54..00000000 --- a/examples/network/device/example.md +++ /dev/null @@ -1,412 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const accountName = config.require("accountName"); -const licenseToken = config.require("licenseToken"); -const sshUserName = config.require("sshUserName"); -const sshKeyName = config.require("sshKeyName"); -const aclTemplateId = config.require("aclTemplateId"); -const metro = config.get("metro") || "SV"; -const devicePackageCode = config.get("devicePackageCode") || "network-essentials"; -const deviceVersion = config.get("deviceVersion") || "17.06.01a"; -const sizeInCores = config.getNumber("sizeInCores") || 2; -const termLength = config.getNumber("termLength") || 6; -const additionalBandwidth = config.getNumber("additionalBandwidth") || 5; -const accountNum = equinix.networkedge.getAccount({ - name: accountName, - metroCode: metro, -}).then(invoke => invoke.number); -const c8KRouter = new equinix.networkedge.Device("c8kRouter", { - name: "catalystRouter", - metroCode: metro, - typeCode: "C8000V", - selfManaged: true, - byol: true, - packageCode: devicePackageCode, - notifications: ["example@equinix.com"], - hostname: "C8KV", - accountNumber: accountNum, - version: deviceVersion, - coreCount: sizeInCores, - termLength: termLength, - licenseToken: licenseToken, - additionalBandwidth: additionalBandwidth, - sshKey: { - username: sshUserName, - keyName: sshKeyName, - }, - aclTemplateId: aclTemplateId, -}); -export const routerId = c8KRouter.id; -export const provisionStatus = c8KRouter.status; -export const licenseStatus = c8KRouter.licenseStatus; -export const sshIpAddress = c8KRouter.sshIpAddress; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -account_name = config.require("accountName") -license_token = config.require("licenseToken") -ssh_user_name = config.require("sshUserName") -ssh_key_name = config.require("sshKeyName") -acl_template_id = config.require("aclTemplateId") -metro = config.get("metro") -if metro is None: - metro = "SV" -device_package_code = config.get("devicePackageCode") -if device_package_code is None: - device_package_code = "network-essentials" -device_version = config.get("deviceVersion") -if device_version is None: - device_version = "17.06.01a" -size_in_cores = config.get_int("sizeInCores") -if size_in_cores is None: - size_in_cores = 2 -term_length = config.get_int("termLength") -if term_length is None: - term_length = 6 -additional_bandwidth = config.get_int("additionalBandwidth") -if additional_bandwidth is None: - additional_bandwidth = 5 -account_num = equinix.networkedge.get_account(name=account_name, - metro_code=metro).number -c8_k_router = equinix.networkedge.Device("c8kRouter", - name="catalystRouter", - metro_code=metro, - type_code="C8000V", - self_managed=True, - byol=True, - package_code=device_package_code, - notifications=["example@equinix.com"], - hostname="C8KV", - account_number=account_num, - version=device_version, - core_count=size_in_cores, - term_length=term_length, - license_token=license_token, - additional_bandwidth=additional_bandwidth, - ssh_key=equinix.networkedge.DeviceSshKeyArgs( - username=ssh_user_name, - key_name=ssh_key_name, - ), - acl_template_id=acl_template_id) -pulumi.export("routerId", c8_k_router.id) -pulumi.export("provisionStatus", c8_k_router.status) -pulumi.export("licenseStatus", c8_k_router.license_status) -pulumi.export("sshIpAddress", c8_k_router.ssh_ip_address) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - accountName := cfg.Require("accountName") - licenseToken := cfg.Require("licenseToken") - sshUserName := cfg.Require("sshUserName") - sshKeyName := cfg.Require("sshKeyName") - aclTemplateId := cfg.Require("aclTemplateId") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param - } - devicePackageCode := "network-essentials" - if param := cfg.Get("devicePackageCode"); param != "" { - devicePackageCode = param - } - deviceVersion := "17.06.01a" - if param := cfg.Get("deviceVersion"); param != "" { - deviceVersion = param - } - sizeInCores := 2 - if param := cfg.GetInt("sizeInCores"); param != 0 { - sizeInCores = param - } - termLength := 6 - if param := cfg.GetInt("termLength"); param != 0 { - termLength = param - } - additionalBandwidth := 5 - if param := cfg.GetInt("additionalBandwidth"); param != 0 { - additionalBandwidth = param - } - accountNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ - Name: pulumi.StringRef(accountName), - MetroCode: metro, - }, nil).Number - c8KRouter, err := networkedge.NewDevice(ctx, "c8kRouter", &networkedge.DeviceArgs{ - Name: pulumi.String("catalystRouter"), - MetroCode: pulumi.String(metro), - TypeCode: pulumi.String("C8000V"), - SelfManaged: pulumi.Bool(true), - Byol: pulumi.Bool(true), - PackageCode: pulumi.String(devicePackageCode), - Notifications: pulumi.StringArray{ - pulumi.String("example@equinix.com"), - }, - Hostname: pulumi.String("C8KV"), - AccountNumber: *pulumi.String(accountNum), - Version: pulumi.Any(deviceVersion), - CoreCount: pulumi.Int(sizeInCores), - TermLength: pulumi.Int(termLength), - LicenseToken: pulumi.String(licenseToken), - AdditionalBandwidth: pulumi.Int(additionalBandwidth), - SshKey: &networkedge.DeviceSshKeyArgs{ - Username: pulumi.String(sshUserName), - KeyName: pulumi.String(sshKeyName), - }, - AclTemplateId: pulumi.String(aclTemplateId), - }) - if err != nil { - return err - } - ctx.Export("routerId", c8KRouter.ID()) - ctx.Export("provisionStatus", c8KRouter.Status) - ctx.Export("licenseStatus", c8KRouter.LicenseStatus) - ctx.Export("sshIpAddress", c8KRouter.SshIpAddress) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var accountName = config.Require("accountName"); - var licenseToken = config.Require("licenseToken"); - var sshUserName = config.Require("sshUserName"); - var sshKeyName = config.Require("sshKeyName"); - var aclTemplateId = config.Require("aclTemplateId"); - var metro = config.Get("metro") ?? "SV"; - var devicePackageCode = config.Get("devicePackageCode") ?? "network-essentials"; - var deviceVersion = config.Get("deviceVersion") ?? "17.06.01a"; - var sizeInCores = config.GetNumber("sizeInCores") ?? 2; - var termLength = config.GetNumber("termLength") ?? 6; - var additionalBandwidth = config.GetNumber("additionalBandwidth") ?? 5; - var accountNum = Equinix.NetworkEdge.GetAccount.Invoke(new() - { - Name = accountName, - MetroCode = metro, - }).Apply(invoke => invoke.Number); - - var c8KRouter = new Equinix.NetworkEdge.Device("c8kRouter", new() - { - Name = "catalystRouter", - MetroCode = metro, - TypeCode = "C8000V", - SelfManaged = true, - Byol = true, - PackageCode = devicePackageCode, - Notifications = new[] - { - "example@equinix.com", - }, - Hostname = "C8KV", - AccountNumber = accountNum, - Version = deviceVersion, - CoreCount = sizeInCores, - TermLength = termLength, - LicenseToken = licenseToken, - AdditionalBandwidth = additionalBandwidth, - SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs - { - Username = sshUserName, - KeyName = sshKeyName, - }, - AclTemplateId = aclTemplateId, - }); - - return new Dictionary - { - ["routerId"] = c8KRouter.Id, - ["provisionStatus"] = c8KRouter.Status, - ["licenseStatus"] = c8KRouter.LicenseStatus, - ["sshIpAddress"] = c8KRouter.SshIpAddress, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.Device; -import com.equinix.pulumi.networkedge.DeviceArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceSshKeyArgs; -import com.equinix.pulumi.networkedge.inputs.GetAccountArgs; -import com.equinix.pulumi.networkedge.NetworkedgeFunctions; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var accountName = config.get("accountName").get(); - final var licenseToken = config.get("licenseToken").get(); - final var sshUserName = config.get("sshUserName").get(); - final var sshKeyName = config.get("sshKeyName").get(); - final var aclTemplateId = config.get("aclTemplateId").get(); - final var metro = config.get("metro").orElse("SV"); - final var devicePackageCode = config.get("devicePackageCode").orElse("network-essentials"); - final var deviceVersion = config.get("deviceVersion").orElse("17.06.01a"); - final var sizeInCores = Integer.parseInt(config.get("sizeInCores").orElse("2")); - final var termLength = Integer.parseInt(config.get("termLength").orElse("6")); - final var additionalBandwidth = Integer.parseInt(config.get("additionalBandwidth").orElse("5")); - final var accountNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() - .name(accountName) - .metroCode(metro) - .build()).applyValue(account -> account.number()); - - var c8KRouter = new Device("c8KRouter", DeviceArgs.builder() - .name("catalystRouter") - .metroCode(metro) - .typeCode("C8000V") - .selfManaged(true) - .byol(true) - .packageCode(devicePackageCode) - .notifications("example@equinix.com") - .hostname("C8KV") - .accountNumber(accountNum) - .version(deviceVersion) - .coreCount(sizeInCores) - .termLength(termLength) - .licenseToken(licenseToken) - .additionalBandwidth(additionalBandwidth) - .sshKey(DeviceSshKeyArgs.builder() - .username(sshUserName) - .keyName(sshKeyName) - .build()) - .aclTemplateId(aclTemplateId) - .build()); - - ctx.export("routerId", c8KRouter.id()); - ctx.export("provisionStatus", c8KRouter.status()); - ctx.export("licenseStatus", c8KRouter.licenseStatus()); - ctx.export("sshIpAddress", c8KRouter.sshIpAddress()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -name: equinix-networkedge-device -runtime: yaml -description: An Equinix Network Edge virtual network device resource -config: - accountName: - type: string - licenseToken: - type: string - sshUserName: - type: string - sshKeyName: - type: string - aclTemplateId: - type: string - metro: - type: string - default: SV - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - sizeInCores: - type: integer - default: 2 - termLength: - type: integer - default: 6 - additionalBandwidth: - type: integer - default: 5 -variables: - accountNum: - fn::invoke: - function: equinix:networkedge:getAccount - arguments: - name: ${accountName} - metroCode: ${metro} - return: number -resources: - c8kRouter: - type: equinix:networkedge:Device - properties: - name: catalystRouter - metroCode: ${metro} - typeCode: C8000V - selfManaged: true - byol: true - packageCode: ${devicePackageCode} - notifications: - - "example@equinix.com" - hostname: C8KV - accountNumber: ${accountNum} - version: ${deviceVersion} - coreCount: ${sizeInCores} - termLength: ${termLength} - licenseToken: ${licenseToken} - additionalBandwidth: ${additionalBandwidth} - sshKey: - username: ${sshUserName} - keyName: ${sshKeyName} - aclTemplateId: ${aclTemplateId} -outputs: - routerId: ${c8kRouter.id} - provisionStatus: ${c8kRouter.status} - licenseStatus: ${c8kRouter.licenseStatus} - sshIpAddress: ${c8kRouter.sshIpAddress} -``` - -{{% /choosable %}} diff --git a/examples/network/device/example_1/Pulumi.yaml b/examples/network/device/example_1/Pulumi.yaml new file mode 100644 index 00000000..e2f5207a --- /dev/null +++ b/examples/network/device/example_1/Pulumi.yaml @@ -0,0 +1,46 @@ +name: equinix-network-device-example_1 +runtime: yaml +resources: + csr1000vHa: + type: equinix:networkedge:Device + name: csr1000v_ha + properties: + name: tf-csr1000v-p + throughput: 500 + throughputUnit: Mbps + metroCode: ${dc.metroCode} + typeCode: CSR1000V + selfManaged: false + connectivity: INTERNET-ACCESS + byol: false + packageCode: SEC + notifications: + - john@equinix.com + - marry@equinix.com + - fred@equinix.com + hostname: csr1000v-p + termLength: 12 + accountNumber: ${dc.number} + version: 16.09.05 + coreCount: 2 + secondaryDevice: + name: tf-csr1000v-s + metroCode: ${sv.metroCode} + hostname: csr1000v-s + notifications: + - john@equinix.com + - marry@equinix.com + accountNumber: ${sv.number} +variables: + # Create pair of redundant, managed CSR1000V routers with license subscription + # in two different metro locations + dc: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: DC + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: SV diff --git a/examples/network/device/example_1/csharp/.gitignore b/examples/network/device/example_1/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_1/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_1/csharp/Program.cs b/examples/network/device/example_1/csharp/Program.cs new file mode 100644 index 00000000..ccc760bb --- /dev/null +++ b/examples/network/device/example_1/csharp/Program.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var dc = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "DC", + }); + + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "SV", + }); + + var csr1000VHa = new Equinix.NetworkEdge.Device("csr1000vHa", new() + { + Name = "tf-csr1000v-p", + Throughput = 500, + ThroughputUnit = Equinix.NetworkEdge.ThroughputUnit.Mbps, + MetroCode = dc.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "CSR1000V", + SelfManaged = false, + Connectivity = "INTERNET-ACCESS", + Byol = false, + PackageCode = "SEC", + Notifications = new[] + { + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + }, + Hostname = "csr1000v-p", + TermLength = 12, + AccountNumber = dc.Apply(getAccountResult => getAccountResult.Number), + Version = "16.09.05", + CoreCount = 2, + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-csr1000v-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Hostname = "csr1000v-s", + Notifications = new[] + { + "john@equinix.com", + "marry@equinix.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + }, + }); + +}); + diff --git a/examples/network/device/example_1/csharp/Pulumi.yaml b/examples/network/device/example_1/csharp/Pulumi.yaml new file mode 100644 index 00000000..b58734a3 --- /dev/null +++ b/examples/network/device/example_1/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_1 +runtime: dotnet diff --git a/examples/network/device/example_1/csharp/equinix-network-device-example_1.csproj b/examples/network/device/example_1/csharp/equinix-network-device-example_1.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/device/example_1/csharp/equinix-network-device-example_1.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_1/go/Pulumi.yaml b/examples/network/device/example_1/go/Pulumi.yaml new file mode 100644 index 00000000..1855565e --- /dev/null +++ b/examples/network/device/example_1/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_1 +runtime: go diff --git a/examples/network/device/example_1/go/go.mod b/examples/network/device/example_1/go/go.mod new file mode 100644 index 00000000..9f7bd272 --- /dev/null +++ b/examples/network/device/example_1/go/go.mod @@ -0,0 +1,94 @@ +module equinix-network-device-example_1 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_1/go/main.go b/examples/network/device/example_1/go/main.go new file mode 100644 index 00000000..917de836 --- /dev/null +++ b/examples/network/device/example_1/go/main.go @@ -0,0 +1,58 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + dc, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "DC", + }, nil) + if err != nil { + return err + } + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "csr1000vHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-csr1000v-p"), + Throughput: pulumi.Int(500), + ThroughputUnit: pulumi.String(networkedge.ThroughputUnitMbps), + MetroCode: pulumi.String(dc.MetroCode), + TypeCode: pulumi.String("CSR1000V"), + SelfManaged: pulumi.Bool(false), + Connectivity: pulumi.String("INTERNET-ACCESS"), + Byol: pulumi.Bool(false), + PackageCode: pulumi.String("SEC"), + Notifications: pulumi.StringArray{ + pulumi.String("john@equinix.com"), + pulumi.String("marry@equinix.com"), + pulumi.String("fred@equinix.com"), + }, + Hostname: pulumi.String("csr1000v-p"), + TermLength: pulumi.Int(12), + AccountNumber: pulumi.String(dc.Number), + Version: pulumi.String("16.09.05"), + CoreCount: pulumi.Int(2), + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-csr1000v-s"), + MetroCode: pulumi.String(sv.MetroCode), + Hostname: pulumi.String("csr1000v-s"), + Notifications: pulumi.StringArray{ + pulumi.String("john@equinix.com"), + pulumi.String("marry@equinix.com"), + }, + AccountNumber: pulumi.String(sv.Number), + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_1/java/Pulumi.yaml b/examples/network/device/example_1/java/Pulumi.yaml new file mode 100644 index 00000000..b88cd865 --- /dev/null +++ b/examples/network/device/example_1/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_1 +runtime: java diff --git a/examples/network/device/example_1/java/pom.xml b/examples/network/device/example_1/java/pom.xml new file mode 100644 index 00000000..74fcd253 --- /dev/null +++ b/examples/network/device/example_1/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_1 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_1/java/src/main/java/generated_program/App.java b/examples/network/device/example_1/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..9f59ffd1 --- /dev/null +++ b/examples/network/device/example_1/java/src/main/java/generated_program/App.java @@ -0,0 +1,63 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var dc = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("DC") + .build()); + + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("SV") + .build()); + + var csr1000VHa = new Device("csr1000VHa", DeviceArgs.builder() + .name("tf-csr1000v-p") + .throughput(500) + .throughputUnit("Mbps") + .metroCode(dc.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("CSR1000V") + .selfManaged(false) + .connectivity("INTERNET-ACCESS") + .byol(false) + .packageCode("SEC") + .notifications( + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com") + .hostname("csr1000v-p") + .termLength(12) + .accountNumber(dc.applyValue(getAccountResult -> getAccountResult.number())) + .version("16.09.05") + .coreCount(2) + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-csr1000v-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .hostname("csr1000v-s") + .notifications( + "john@equinix.com", + "marry@equinix.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .build()) + .build()); + + } +} diff --git a/examples/network/device/example_1/python/.gitignore b/examples/network/device/example_1/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_1/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_1/python/Pulumi.yaml b/examples/network/device/example_1/python/Pulumi.yaml new file mode 100644 index 00000000..de7bcd56 --- /dev/null +++ b/examples/network/device/example_1/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_1 +runtime: python diff --git a/examples/network/device/example_1/python/__main__.py b/examples/network/device/example_1/python/__main__.py new file mode 100644 index 00000000..64c5580d --- /dev/null +++ b/examples/network/device/example_1/python/__main__.py @@ -0,0 +1,35 @@ +import pulumi +import pulumi_equinix as equinix + +dc = equinix.networkedge.get_account_output(metro_code="DC") +sv = equinix.networkedge.get_account_output(metro_code="SV") +csr1000_v_ha = equinix.networkedge.Device("csr1000vHa", + name="tf-csr1000v-p", + throughput=500, + throughput_unit=equinix.networkedge.ThroughputUnit.MBPS, + metro_code=dc.metro_code, + type_code="CSR1000V", + self_managed=False, + connectivity="INTERNET-ACCESS", + byol=False, + package_code="SEC", + notifications=[ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + hostname="csr1000v-p", + term_length=12, + account_number=dc.number, + version="16.09.05", + core_count=2, + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-csr1000v-s", + metro_code=sv.metro_code, + hostname="csr1000v-s", + notifications=[ + "john@equinix.com", + "marry@equinix.com", + ], + account_number=sv.number, + )) diff --git a/examples/network/device/example_1/python/requirements.txt b/examples/network/device/example_1/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/network/device/example_1/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_1/typescript/.gitignore b/examples/network/device/example_1/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_1/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_1/typescript/Pulumi.yaml b/examples/network/device/example_1/typescript/Pulumi.yaml new file mode 100644 index 00000000..fbde5128 --- /dev/null +++ b/examples/network/device/example_1/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_1 +runtime: nodejs diff --git a/examples/network/device/example_1/typescript/index.ts b/examples/network/device/example_1/typescript/index.ts new file mode 100644 index 00000000..bd97abc9 --- /dev/null +++ b/examples/network/device/example_1/typescript/index.ts @@ -0,0 +1,41 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const dc = equinix.networkedge.getAccountOutput({ + metroCode: "DC", +}); +const sv = equinix.networkedge.getAccountOutput({ + metroCode: "SV", +}); +const csr1000VHa = new equinix.networkedge.Device("csr1000vHa", { + name: "tf-csr1000v-p", + throughput: 500, + throughputUnit: equinix.networkedge.ThroughputUnit.Mbps, + metroCode: dc.apply(dc => dc.metroCode), + typeCode: "CSR1000V", + selfManaged: false, + connectivity: "INTERNET-ACCESS", + byol: false, + packageCode: "SEC", + notifications: [ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + hostname: "csr1000v-p", + termLength: 12, + accountNumber: dc.apply(dc => dc.number), + version: "16.09.05", + coreCount: 2, + secondaryDevice: { + name: "tf-csr1000v-s", + metroCode: sv.apply(sv => sv.metroCode), + hostname: "csr1000v-s", + notifications: [ + "john@equinix.com", + "marry@equinix.com", + ], + accountNumber: sv.apply(sv => sv.number), + }, +}); diff --git a/examples/network/device/example_1/typescript/package.json b/examples/network/device/example_1/typescript/package.json new file mode 100644 index 00000000..6fd4209b --- /dev/null +++ b/examples/network/device/example_1/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-network-device-example_1", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/network/device/example_1/typescript/tsconfig.json b/examples/network/device/example_1/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_1/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/example_2/Pulumi.yaml b/examples/network/device/example_2/Pulumi.yaml new file mode 100644 index 00000000..03b798f6 --- /dev/null +++ b/examples/network/device/example_2/Pulumi.yaml @@ -0,0 +1,43 @@ +name: equinix-network-device-example_2 +runtime: yaml +resources: + panwCluster: + type: equinix:networkedge:Device + name: panw_cluster + properties: + name: tf-panw + metroCode: ${sv.metroCode} + typeCode: PA-VM + selfManaged: true + byol: true + packageCode: VM100 + notifications: + - john@equinix.com + - marry@equinix.com + - fred@equinix.com + termLength: 12 + accountNumber: ${sv.number} + version: 10.1.3 + interfaceCount: 10 + coreCount: 2 + sshKey: + username: test + keyName: test-key + aclTemplateId: 0bff6e05-f0e7-44cd-804a-25b92b835f8b + clusterDetails: + clusterName: tf-panw-cluster + node0: + vendorConfiguration: + hostname: panw-node0 + licenseToken: licenseToken + node1: + vendorConfiguration: + hostname: panw-node1 + licenseToken: licenseToken +variables: + # Create self configured PANW cluster with BYOL license + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: SV diff --git a/examples/network/device/example_2/csharp/.gitignore b/examples/network/device/example_2/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_2/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_2/csharp/Program.cs b/examples/network/device/example_2/csharp/Program.cs new file mode 100644 index 00000000..6c886e99 --- /dev/null +++ b/examples/network/device/example_2/csharp/Program.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "SV", + }); + + var panwCluster = new Equinix.NetworkEdge.Device("panwCluster", new() + { + Name = "tf-panw", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "PA-VM", + SelfManaged = true, + Byol = true, + PackageCode = "VM100", + Notifications = new[] + { + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + }, + TermLength = 12, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "10.1.3", + InterfaceCount = 10, + CoreCount = 2, + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test", + KeyName = "test-key", + }, + AclTemplateId = "0bff6e05-f0e7-44cd-804a-25b92b835f8b", + ClusterDetails = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsArgs + { + ClusterName = "tf-panw-cluster", + Node0 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0Args + { + VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0VendorConfigurationArgs + { + Hostname = "panw-node0", + }, + LicenseToken = "licenseToken", + }, + Node1 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1Args + { + VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1VendorConfigurationArgs + { + Hostname = "panw-node1", + }, + LicenseToken = "licenseToken", + }, + }, + }); + +}); + diff --git a/examples/network/device/example_2/csharp/Pulumi.yaml b/examples/network/device/example_2/csharp/Pulumi.yaml new file mode 100644 index 00000000..57df57b8 --- /dev/null +++ b/examples/network/device/example_2/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_2 +runtime: dotnet diff --git a/examples/network/device/example_2/csharp/equinix-network-device-example_2.csproj b/examples/network/device/example_2/csharp/equinix-network-device-example_2.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/device/example_2/csharp/equinix-network-device-example_2.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_2/go/Pulumi.yaml b/examples/network/device/example_2/go/Pulumi.yaml new file mode 100644 index 00000000..f2280b1c --- /dev/null +++ b/examples/network/device/example_2/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_2 +runtime: go diff --git a/examples/network/device/example_2/go/go.mod b/examples/network/device/example_2/go/go.mod new file mode 100644 index 00000000..f717a8f2 --- /dev/null +++ b/examples/network/device/example_2/go/go.mod @@ -0,0 +1,94 @@ +module equinix-network-device-example_2 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_2/go/main.go b/examples/network/device/example_2/go/main.go new file mode 100644 index 00000000..799ee90e --- /dev/null +++ b/examples/network/device/example_2/go/main.go @@ -0,0 +1,59 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "panwCluster", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-panw"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("PA-VM"), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("VM100"), + Notifications: pulumi.StringArray{ + pulumi.String("john@equinix.com"), + pulumi.String("marry@equinix.com"), + pulumi.String("fred@equinix.com"), + }, + TermLength: pulumi.Int(12), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("10.1.3"), + InterfaceCount: pulumi.Int(10), + CoreCount: pulumi.Int(2), + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test"), + KeyName: pulumi.String("test-key"), + }, + AclTemplateId: pulumi.String("0bff6e05-f0e7-44cd-804a-25b92b835f8b"), + ClusterDetails: &networkedge.DeviceClusterDetailsArgs{ + ClusterName: pulumi.String("tf-panw-cluster"), + Node0: &networkedge.DeviceClusterDetailsNode0Args{ + VendorConfiguration: &networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs{ + Hostname: pulumi.String("panw-node0"), + }, + LicenseToken: pulumi.String("licenseToken"), + }, + Node1: &networkedge.DeviceClusterDetailsNode1Args{ + VendorConfiguration: &networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs{ + Hostname: pulumi.String("panw-node1"), + }, + LicenseToken: pulumi.String("licenseToken"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_2/java/Pulumi.yaml b/examples/network/device/example_2/java/Pulumi.yaml new file mode 100644 index 00000000..3159b0ec --- /dev/null +++ b/examples/network/device/example_2/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_2 +runtime: java diff --git a/examples/network/device/example_2/java/pom.xml b/examples/network/device/example_2/java/pom.xml new file mode 100644 index 00000000..1026b9f9 --- /dev/null +++ b/examples/network/device/example_2/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_2 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_2/java/src/main/java/generated_program/App.java b/examples/network/device/example_2/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..3ac94cc3 --- /dev/null +++ b/examples/network/device/example_2/java/src/main/java/generated_program/App.java @@ -0,0 +1,72 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0Args; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0VendorConfigurationArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1Args; +import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1VendorConfigurationArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("SV") + .build()); + + var panwCluster = new Device("panwCluster", DeviceArgs.builder() + .name("tf-panw") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("PA-VM") + .selfManaged(true) + .byol(true) + .packageCode("VM100") + .notifications( + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com") + .termLength(12) + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("10.1.3") + .interfaceCount(10) + .coreCount(2) + .sshKey(DeviceSshKeyArgs.builder() + .username("test") + .keyName("test-key") + .build()) + .aclTemplateId("0bff6e05-f0e7-44cd-804a-25b92b835f8b") + .clusterDetails(DeviceClusterDetailsArgs.builder() + .clusterName("tf-panw-cluster") + .node0(DeviceClusterDetailsNode0Args.builder() + .vendorConfiguration(DeviceClusterDetailsNode0VendorConfigurationArgs.builder() + .hostname("panw-node0") + .build()) + .licenseToken("licenseToken") + .build()) + .node1(DeviceClusterDetailsNode1Args.builder() + .vendorConfiguration(DeviceClusterDetailsNode1VendorConfigurationArgs.builder() + .hostname("panw-node1") + .build()) + .licenseToken("licenseToken") + .build()) + .build()) + .build()); + + } +} diff --git a/examples/network/device/example_2/python/.gitignore b/examples/network/device/example_2/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_2/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_2/python/Pulumi.yaml b/examples/network/device/example_2/python/Pulumi.yaml new file mode 100644 index 00000000..230b3619 --- /dev/null +++ b/examples/network/device/example_2/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_2 +runtime: python diff --git a/examples/network/device/example_2/python/__main__.py b/examples/network/device/example_2/python/__main__.py new file mode 100644 index 00000000..d13753e3 --- /dev/null +++ b/examples/network/device/example_2/python/__main__.py @@ -0,0 +1,41 @@ +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(metro_code="SV") +panw_cluster = equinix.networkedge.Device("panwCluster", + name="tf-panw", + metro_code=sv.metro_code, + type_code="PA-VM", + self_managed=True, + byol=True, + package_code="VM100", + notifications=[ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + term_length=12, + account_number=sv.number, + version="10.1.3", + interface_count=10, + core_count=2, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test", + key_name="test-key", + ), + acl_template_id="0bff6e05-f0e7-44cd-804a-25b92b835f8b", + cluster_details=equinix.networkedge.DeviceClusterDetailsArgs( + cluster_name="tf-panw-cluster", + node0=equinix.networkedge.DeviceClusterDetailsNode0Args( + vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs( + hostname="panw-node0", + ), + license_token="licenseToken", + ), + node1=equinix.networkedge.DeviceClusterDetailsNode1Args( + vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs( + hostname="panw-node1", + ), + license_token="licenseToken", + ), + )) diff --git a/examples/network/device/example_2/python/requirements.txt b/examples/network/device/example_2/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/network/device/example_2/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_2/typescript/.gitignore b/examples/network/device/example_2/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_2/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_2/typescript/Pulumi.yaml b/examples/network/device/example_2/typescript/Pulumi.yaml new file mode 100644 index 00000000..9aa5e5ba --- /dev/null +++ b/examples/network/device/example_2/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_2 +runtime: nodejs diff --git a/examples/network/device/example_2/typescript/index.ts b/examples/network/device/example_2/typescript/index.ts new file mode 100644 index 00000000..5a749729 --- /dev/null +++ b/examples/network/device/example_2/typescript/index.ts @@ -0,0 +1,45 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + metroCode: "SV", +}); +const panwCluster = new equinix.networkedge.Device("panwCluster", { + name: "tf-panw", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "PA-VM", + selfManaged: true, + byol: true, + packageCode: "VM100", + notifications: [ + "john@equinix.com", + "marry@equinix.com", + "fred@equinix.com", + ], + termLength: 12, + accountNumber: sv.apply(sv => sv.number), + version: "10.1.3", + interfaceCount: 10, + coreCount: 2, + sshKey: { + username: "test", + keyName: "test-key", + }, + aclTemplateId: "0bff6e05-f0e7-44cd-804a-25b92b835f8b", + clusterDetails: { + clusterName: "tf-panw-cluster", + node0: { + vendorConfiguration: { + hostname: "panw-node0", + }, + licenseToken: "licenseToken", + }, + node1: { + vendorConfiguration: { + hostname: "panw-node1", + }, + licenseToken: "licenseToken", + }, + }, +}); diff --git a/examples/network/device/example_2/typescript/package.json b/examples/network/device/example_2/typescript/package.json new file mode 100644 index 00000000..274d280b --- /dev/null +++ b/examples/network/device/example_2/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-network-device-example_2", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/network/device/example_2/typescript/tsconfig.json b/examples/network/device/example_2/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_2/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/example_3/Pulumi.yaml b/examples/network/device/example_3/Pulumi.yaml new file mode 100644 index 00000000..9ee157b7 --- /dev/null +++ b/examples/network/device/example_3/Pulumi.yaml @@ -0,0 +1,48 @@ +name: equinix-network-device-example_3 +runtime: yaml +configuration: + filepath: + type: string + default: cloudInitFileFolder/TF-AVX-cloud-init-file.txt +resources: + aviatrixCloudinitFile: + type: equinix:networkedge:NetworkFile + name: aviatrix_cloudinit_file + properties: + fileName: TF-AVX-cloud-init-file.txt + content: + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: ${sv.metroCode} + deviceTypeCode: AVIATRIX_EDGE + processType: CLOUD_INIT + selfManaged: true + byol: true + aviatrixSingle: + type: equinix:networkedge:Device + name: aviatrix_single + properties: + name: tf-aviatrix + metroCode: ${sv.metroCode} + typeCode: AVIATRIX_EDGE + selfManaged: true + byol: true + packageCode: STD + notifications: + - john@equinix.com + termLength: 12 + accountNumber: ${sv.number} + version: '6.9' + coreCount: 2 + cloudInitFileId: ${aviatrixCloudinitFile.uuid} + aclTemplateId: c06150ea-b604-4ad1-832a-d63936e9b938 +variables: + # Create self configured single Aviatrix device with cloud init file + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + metroCode: SV diff --git a/examples/network/device/example_3/csharp/.gitignore b/examples/network/device/example_3/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_3/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_3/csharp/Program.cs b/examples/network/device/example_3/csharp/Program.cs new file mode 100644 index 00000000..343caeca --- /dev/null +++ b/examples/network/device/example_3/csharp/Program.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; + +return await Deployment.RunAsync(() => +{ + var config = new Config(); + var filepath = config.Get("filepath") ?? "cloudInitFileFolder/TF-AVX-cloud-init-file.txt"; + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + MetroCode = "SV", + }); + + var aviatrixCloudinitFile = new Equinix.NetworkEdge.NetworkFile("aviatrixCloudinitFile", new() + { + FileName = "TF-AVX-cloud-init-file.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse), + DeviceTypeCode = "AVIATRIX_EDGE", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + SelfManaged = true, + Byol = true, + }); + + var aviatrixSingle = new Equinix.NetworkEdge.Device("aviatrixSingle", new() + { + Name = "tf-aviatrix", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "AVIATRIX_EDGE", + SelfManaged = true, + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "john@equinix.com", + }, + TermLength = 12, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "6.9", + CoreCount = 2, + CloudInitFileId = aviatrixCloudinitFile.Uuid, + AclTemplateId = "c06150ea-b604-4ad1-832a-d63936e9b938", + }); + +}); + diff --git a/examples/network/device/example_3/csharp/Pulumi.yaml b/examples/network/device/example_3/csharp/Pulumi.yaml new file mode 100644 index 00000000..ad6bc0ec --- /dev/null +++ b/examples/network/device/example_3/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_3 +runtime: dotnet diff --git a/examples/network/device/example_3/csharp/equinix-network-device-example_3.csproj b/examples/network/device/example_3/csharp/equinix-network-device-example_3.csproj new file mode 100644 index 00000000..ef1958d7 --- /dev/null +++ b/examples/network/device/example_3/csharp/equinix-network-device-example_3.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_3/go/Pulumi.yaml b/examples/network/device/example_3/go/Pulumi.yaml new file mode 100644 index 00000000..cbf38cc4 --- /dev/null +++ b/examples/network/device/example_3/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_3 +runtime: go diff --git a/examples/network/device/example_3/go/go.mod b/examples/network/device/example_3/go/go.mod new file mode 100644 index 00000000..4adb78b8 --- /dev/null +++ b/examples/network/device/example_3/go/go.mod @@ -0,0 +1,96 @@ +module equinix-network-device-example_3 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi-std/sdk v1.7.2 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/cast v1.5.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_3/go/main.go b/examples/network/device/example_3/go/main.go new file mode 100644 index 00000000..f4543aff --- /dev/null +++ b/examples/network/device/example_3/go/main.go @@ -0,0 +1,64 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi-std/sdk/go/std" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + cfg := config.New(ctx, "") + filepath := "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" + if param := cfg.Get("filepath"); param != "" { + filepath = param + } + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err + } + aviatrixCloudinitFile, err := networkedge.NewNetworkFile(ctx, "aviatrixCloudinitFile", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("TF-AVX-cloud-init-file.txt"), + Content: invokeFile.Result, + MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), + DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + }) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "aviatrixSingle", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-aviatrix"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("AVIATRIX_EDGE"), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("STD"), + Notifications: pulumi.StringArray{ + pulumi.String("john@equinix.com"), + }, + TermLength: pulumi.Int(12), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("6.9"), + CoreCount: pulumi.Int(2), + CloudInitFileId: aviatrixCloudinitFile.Uuid, + AclTemplateId: pulumi.String("c06150ea-b604-4ad1-832a-d63936e9b938"), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_3/java/Pulumi.yaml b/examples/network/device/example_3/java/Pulumi.yaml new file mode 100644 index 00000000..6edecd77 --- /dev/null +++ b/examples/network/device/example_3/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_3 +runtime: java diff --git a/examples/network/device/example_3/java/pom.xml b/examples/network/device/example_3/java/pom.xml new file mode 100644 index 00000000..cebc1f1d --- /dev/null +++ b/examples/network/device/example_3/java/pom.xml @@ -0,0 +1,96 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_3 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + com.pulumi + std + 1.7.2 + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_3/java/src/main/java/generated_program/App.java b/examples/network/device/example_3/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..6c799f93 --- /dev/null +++ b/examples/network/device/example_3/java/src/main/java/generated_program/App.java @@ -0,0 +1,60 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.NetworkFile; +import com.pulumi.equinix.networkedge.NetworkFileArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var config = ctx.config(); + final var filepath = config.get("filepath").orElse("cloudInitFileFolder/TF-AVX-cloud-init-file.txt"); + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .metroCode("SV") + .build()); + + var aviatrixCloudinitFile = new NetworkFile("aviatrixCloudinitFile", NetworkFileArgs.builder() + .fileName("TF-AVX-cloud-init-file.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .deviceTypeCode("AVIATRIX_EDGE") + .processType("CLOUD_INIT") + .selfManaged(true) + .byol(true) + .build()); + + var aviatrixSingle = new Device("aviatrixSingle", DeviceArgs.builder() + .name("tf-aviatrix") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("AVIATRIX_EDGE") + .selfManaged(true) + .byol(true) + .packageCode("STD") + .notifications("john@equinix.com") + .termLength(12) + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("6.9") + .coreCount(2) + .cloudInitFileId(aviatrixCloudinitFile.uuid()) + .aclTemplateId("c06150ea-b604-4ad1-832a-d63936e9b938") + .build()); + + } +} diff --git a/examples/network/device/example_3/python/.gitignore b/examples/network/device/example_3/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_3/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_3/python/Pulumi.yaml b/examples/network/device/example_3/python/Pulumi.yaml new file mode 100644 index 00000000..60df1a56 --- /dev/null +++ b/examples/network/device/example_3/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_3 +runtime: python diff --git a/examples/network/device/example_3/python/__main__.py b/examples/network/device/example_3/python/__main__.py new file mode 100644 index 00000000..8743c6ec --- /dev/null +++ b/examples/network/device/example_3/python/__main__.py @@ -0,0 +1,31 @@ +import pulumi +import pulumi_equinix as equinix +import pulumi_std as std + +config = pulumi.Config() +filepath = config.get("filepath") +if filepath is None: + filepath = "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" +sv = equinix.networkedge.get_account_output(metro_code="SV") +aviatrix_cloudinit_file = equinix.networkedge.NetworkFile("aviatrixCloudinitFile", + file_name="TF-AVX-cloud-init-file.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)), + device_type_code="AVIATRIX_EDGE", + process_type=equinix.networkedge.FileType.CLOUD_INIT, + self_managed=True, + byol=True) +aviatrix_single = equinix.networkedge.Device("aviatrixSingle", + name="tf-aviatrix", + metro_code=sv.metro_code, + type_code="AVIATRIX_EDGE", + self_managed=True, + byol=True, + package_code="STD", + notifications=["john@equinix.com"], + term_length=12, + account_number=sv.number, + version="6.9", + core_count=2, + cloud_init_file_id=aviatrix_cloudinit_file.uuid, + acl_template_id="c06150ea-b604-4ad1-832a-d63936e9b938") diff --git a/examples/network/device/example_3/python/requirements.txt b/examples/network/device/example_3/python/requirements.txt new file mode 100644 index 00000000..da9f8ddc --- /dev/null +++ b/examples/network/device/example_3/python/requirements.txt @@ -0,0 +1,3 @@ +pulumi-std==1.7.2 +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_3/typescript/.gitignore b/examples/network/device/example_3/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_3/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_3/typescript/Pulumi.yaml b/examples/network/device/example_3/typescript/Pulumi.yaml new file mode 100644 index 00000000..bbf7cb5b --- /dev/null +++ b/examples/network/device/example_3/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_3 +runtime: nodejs diff --git a/examples/network/device/example_3/typescript/index.ts b/examples/network/device/example_3/typescript/index.ts new file mode 100644 index 00000000..611abcac --- /dev/null +++ b/examples/network/device/example_3/typescript/index.ts @@ -0,0 +1,36 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; +import * as std from "@pulumi/std"; + +const config = new pulumi.Config(); +const filepath = config.get("filepath") || "cloudInitFileFolder/TF-AVX-cloud-init-file.txt"; +const sv = equinix.networkedge.getAccountOutput({ + metroCode: "SV", +}); +const aviatrixCloudinitFile = new equinix.networkedge.NetworkFile("aviatrixCloudinitFile", { + fileName: "TF-AVX-cloud-init-file.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]), + deviceTypeCode: "AVIATRIX_EDGE", + processType: equinix.networkedge.FileType.CloudInit, + selfManaged: true, + byol: true, +}); +const aviatrixSingle = new equinix.networkedge.Device("aviatrixSingle", { + name: "tf-aviatrix", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "AVIATRIX_EDGE", + selfManaged: true, + byol: true, + packageCode: "STD", + notifications: ["john@equinix.com"], + termLength: 12, + accountNumber: sv.apply(sv => sv.number), + version: "6.9", + coreCount: 2, + cloudInitFileId: aviatrixCloudinitFile.uuid, + aclTemplateId: "c06150ea-b604-4ad1-832a-d63936e9b938", +}); diff --git a/examples/network/device/example_3/typescript/package.json b/examples/network/device/example_3/typescript/package.json new file mode 100644 index 00000000..2f688661 --- /dev/null +++ b/examples/network/device/example_3/typescript/package.json @@ -0,0 +1,12 @@ +{ + "name": "equinix-network-device-example_3", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0", + "@pulumi/std": "1.7.2" + } +} \ No newline at end of file diff --git a/examples/network/device/example_3/typescript/tsconfig.json b/examples/network/device/example_3/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_3/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/example_4/Pulumi.yaml b/examples/network/device/example_4/Pulumi.yaml new file mode 100644 index 00000000..ac1b21a0 --- /dev/null +++ b/examples/network/device/example_4/Pulumi.yaml @@ -0,0 +1,34 @@ +name: equinix-network-device-example_4 +runtime: yaml +resources: + c8kvSingle: + type: equinix:networkedge:Device + name: c8kv_single + properties: + name: tf-c8kv + metroCode: ${sv.metroCode} + typeCode: C8000V + selfManaged: true + byol: true + packageCode: network-essentials + notifications: + - test@equinix.com + hostname: C8KV + accountNumber: ${sv.number} + version: 17.06.01a + coreCount: 2 + termLength: 12 + licenseToken: valid-license-token + additionalBandwidth: 5 + sshKey: + username: test-username + keyName: valid-key-name + aclTemplateId: 3e548c02-9164-4197-aa23-05b1f644883c +variables: + # Create self configured single Catalyst 8000V (Autonomous Mode) router with license token + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV diff --git a/examples/network/device/example_4/csharp/.gitignore b/examples/network/device/example_4/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_4/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_4/csharp/Program.cs b/examples/network/device/example_4/csharp/Program.cs new file mode 100644 index 00000000..408ea1dc --- /dev/null +++ b/examples/network/device/example_4/csharp/Program.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var c8KvSingle = new Equinix.NetworkEdge.Device("c8kvSingle", new() + { + Name = "tf-c8kv", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "C8000V", + SelfManaged = true, + Byol = true, + PackageCode = "network-essentials", + Notifications = new[] + { + "test@equinix.com", + }, + Hostname = "C8KV", + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "17.06.01a", + CoreCount = 2, + TermLength = 12, + LicenseToken = "valid-license-token", + AdditionalBandwidth = 5, + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test-username", + KeyName = "valid-key-name", + }, + AclTemplateId = "3e548c02-9164-4197-aa23-05b1f644883c", + }); + +}); + diff --git a/examples/network/device/example_4/csharp/Pulumi.yaml b/examples/network/device/example_4/csharp/Pulumi.yaml new file mode 100644 index 00000000..f88d1220 --- /dev/null +++ b/examples/network/device/example_4/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_4 +runtime: dotnet diff --git a/examples/network/device/example_4/csharp/equinix-network-device-example_4.csproj b/examples/network/device/example_4/csharp/equinix-network-device-example_4.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/device/example_4/csharp/equinix-network-device-example_4.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_4/go/Pulumi.yaml b/examples/network/device/example_4/go/Pulumi.yaml new file mode 100644 index 00000000..60dac89a --- /dev/null +++ b/examples/network/device/example_4/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_4 +runtime: go diff --git a/examples/network/device/example_4/go/go.mod b/examples/network/device/example_4/go/go.mod new file mode 100644 index 00000000..32d24147 --- /dev/null +++ b/examples/network/device/example_4/go/go.mod @@ -0,0 +1,94 @@ +module equinix-network-device-example_4 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_4/go/main.go b/examples/network/device/example_4/go/main.go new file mode 100644 index 00000000..a3dcd97c --- /dev/null +++ b/examples/network/device/example_4/go/main.go @@ -0,0 +1,45 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "c8kvSingle", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-c8kv"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("C8000V"), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("network-essentials"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + Hostname: pulumi.String("C8KV"), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("17.06.01a"), + CoreCount: pulumi.Int(2), + TermLength: pulumi.Int(12), + LicenseToken: pulumi.String("valid-license-token"), + AdditionalBandwidth: pulumi.Int(5), + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test-username"), + KeyName: pulumi.String("valid-key-name"), + }, + AclTemplateId: pulumi.String("3e548c02-9164-4197-aa23-05b1f644883c"), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_4/java/Pulumi.yaml b/examples/network/device/example_4/java/Pulumi.yaml new file mode 100644 index 00000000..014019bd --- /dev/null +++ b/examples/network/device/example_4/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_4 +runtime: java diff --git a/examples/network/device/example_4/java/pom.xml b/examples/network/device/example_4/java/pom.xml new file mode 100644 index 00000000..7f35cfd6 --- /dev/null +++ b/examples/network/device/example_4/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_4 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_4/java/src/main/java/generated_program/App.java b/examples/network/device/example_4/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..d009f17f --- /dev/null +++ b/examples/network/device/example_4/java/src/main/java/generated_program/App.java @@ -0,0 +1,52 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var c8KvSingle = new Device("c8KvSingle", DeviceArgs.builder() + .name("tf-c8kv") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("C8000V") + .selfManaged(true) + .byol(true) + .packageCode("network-essentials") + .notifications("test@equinix.com") + .hostname("C8KV") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("17.06.01a") + .coreCount(2) + .termLength(12) + .licenseToken("valid-license-token") + .additionalBandwidth(5) + .sshKey(DeviceSshKeyArgs.builder() + .username("test-username") + .keyName("valid-key-name") + .build()) + .aclTemplateId("3e548c02-9164-4197-aa23-05b1f644883c") + .build()); + + } +} diff --git a/examples/network/device/example_4/python/.gitignore b/examples/network/device/example_4/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_4/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_4/python/Pulumi.yaml b/examples/network/device/example_4/python/Pulumi.yaml new file mode 100644 index 00000000..b94e6f26 --- /dev/null +++ b/examples/network/device/example_4/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_4 +runtime: python diff --git a/examples/network/device/example_4/python/__main__.py b/examples/network/device/example_4/python/__main__.py new file mode 100644 index 00000000..4284214c --- /dev/null +++ b/examples/network/device/example_4/python/__main__.py @@ -0,0 +1,25 @@ +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +c8_kv_single = equinix.networkedge.Device("c8kvSingle", + name="tf-c8kv", + metro_code=sv.metro_code, + type_code="C8000V", + self_managed=True, + byol=True, + package_code="network-essentials", + notifications=["test@equinix.com"], + hostname="C8KV", + account_number=sv.number, + version="17.06.01a", + core_count=2, + term_length=12, + license_token="valid-license-token", + additional_bandwidth=5, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name="valid-key-name", + ), + acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c") diff --git a/examples/network/device/example_4/python/requirements.txt b/examples/network/device/example_4/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/network/device/example_4/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_4/typescript/.gitignore b/examples/network/device/example_4/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_4/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_4/typescript/Pulumi.yaml b/examples/network/device/example_4/typescript/Pulumi.yaml new file mode 100644 index 00000000..5861354a --- /dev/null +++ b/examples/network/device/example_4/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_4 +runtime: nodejs diff --git a/examples/network/device/example_4/typescript/index.ts b/examples/network/device/example_4/typescript/index.ts new file mode 100644 index 00000000..509392a9 --- /dev/null +++ b/examples/network/device/example_4/typescript/index.ts @@ -0,0 +1,29 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const c8KvSingle = new equinix.networkedge.Device("c8kvSingle", { + name: "tf-c8kv", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "C8000V", + selfManaged: true, + byol: true, + packageCode: "network-essentials", + notifications: ["test@equinix.com"], + hostname: "C8KV", + accountNumber: sv.apply(sv => sv.number), + version: "17.06.01a", + coreCount: 2, + termLength: 12, + licenseToken: "valid-license-token", + additionalBandwidth: 5, + sshKey: { + username: "test-username", + keyName: "valid-key-name", + }, + aclTemplateId: "3e548c02-9164-4197-aa23-05b1f644883c", +}); diff --git a/examples/network/device/example_4/typescript/package.json b/examples/network/device/example_4/typescript/package.json new file mode 100644 index 00000000..d4ea28b3 --- /dev/null +++ b/examples/network/device/example_4/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-network-device-example_4", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/network/device/example_4/typescript/tsconfig.json b/examples/network/device/example_4/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_4/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/example_5/Pulumi.yaml b/examples/network/device/example_5/Pulumi.yaml new file mode 100644 index 00000000..14a7c309 --- /dev/null +++ b/examples/network/device/example_5/Pulumi.yaml @@ -0,0 +1,35 @@ +name: equinix-network-device-example_5 +runtime: yaml +resources: + vsrxSingle: + type: equinix:networkedge:Device + name: vsrx_single + properties: + name: tf-c8kv-sdwan + metroCode: ${sv.metroCode} + typeCode: VSRX + selfManaged: true + byol: true + packageCode: STD + notifications: + - test@equinix.com + hostname: VSRX + accountNumber: ${sv.number} + version: 23.2R1.13 + coreCount: 2 + termLength: 12 + additionalBandwidth: 5 + projectId: a86d7112-d740-4758-9c9c-31e66373746b + diverseDeviceId: ed7891bd-15b4-4f72-ac56-d96cfdacddcc + sshKey: + username: test-username + keyName: valid-key-name + aclTemplateId: 3e548c02-9164-4197-aa23-05b1f644883c +variables: + # Create self configured single VSRX device with BYOL License + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV diff --git a/examples/network/device/example_5/csharp/.gitignore b/examples/network/device/example_5/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_5/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_5/csharp/Program.cs b/examples/network/device/example_5/csharp/Program.cs new file mode 100644 index 00000000..bb5ddb77 --- /dev/null +++ b/examples/network/device/example_5/csharp/Program.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var vsrxSingle = new Equinix.NetworkEdge.Device("vsrxSingle", new() + { + Name = "tf-c8kv-sdwan", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "VSRX", + SelfManaged = true, + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "test@equinix.com", + }, + Hostname = "VSRX", + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "23.2R1.13", + CoreCount = 2, + TermLength = 12, + AdditionalBandwidth = 5, + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", + DiverseDeviceId = "ed7891bd-15b4-4f72-ac56-d96cfdacddcc", + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test-username", + KeyName = "valid-key-name", + }, + AclTemplateId = "3e548c02-9164-4197-aa23-05b1f644883c", + }); + +}); + diff --git a/examples/network/device/example_5/csharp/Pulumi.yaml b/examples/network/device/example_5/csharp/Pulumi.yaml new file mode 100644 index 00000000..4552a97f --- /dev/null +++ b/examples/network/device/example_5/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_5 +runtime: dotnet diff --git a/examples/network/device/example_5/csharp/equinix-network-device-example_5.csproj b/examples/network/device/example_5/csharp/equinix-network-device-example_5.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/device/example_5/csharp/equinix-network-device-example_5.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_5/go/Pulumi.yaml b/examples/network/device/example_5/go/Pulumi.yaml new file mode 100644 index 00000000..f11ff8cb --- /dev/null +++ b/examples/network/device/example_5/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_5 +runtime: go diff --git a/examples/network/device/example_5/go/go.mod b/examples/network/device/example_5/go/go.mod new file mode 100644 index 00000000..f6c33267 --- /dev/null +++ b/examples/network/device/example_5/go/go.mod @@ -0,0 +1,94 @@ +module equinix-network-device-example_5 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_5/go/main.go b/examples/network/device/example_5/go/main.go new file mode 100644 index 00000000..30263df4 --- /dev/null +++ b/examples/network/device/example_5/go/main.go @@ -0,0 +1,46 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "vsrxSingle", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-c8kv-sdwan"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("VSRX"), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("STD"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + Hostname: pulumi.String("VSRX"), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("23.2R1.13"), + CoreCount: pulumi.Int(2), + TermLength: pulumi.Int(12), + AdditionalBandwidth: pulumi.Int(5), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), + DiverseDeviceId: pulumi.String("ed7891bd-15b4-4f72-ac56-d96cfdacddcc"), + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test-username"), + KeyName: pulumi.String("valid-key-name"), + }, + AclTemplateId: pulumi.String("3e548c02-9164-4197-aa23-05b1f644883c"), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_5/java/Pulumi.yaml b/examples/network/device/example_5/java/Pulumi.yaml new file mode 100644 index 00000000..3baa4789 --- /dev/null +++ b/examples/network/device/example_5/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_5 +runtime: java diff --git a/examples/network/device/example_5/java/pom.xml b/examples/network/device/example_5/java/pom.xml new file mode 100644 index 00000000..cca765fc --- /dev/null +++ b/examples/network/device/example_5/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_5 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_5/java/src/main/java/generated_program/App.java b/examples/network/device/example_5/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..1bbfb243 --- /dev/null +++ b/examples/network/device/example_5/java/src/main/java/generated_program/App.java @@ -0,0 +1,53 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var vsrxSingle = new Device("vsrxSingle", DeviceArgs.builder() + .name("tf-c8kv-sdwan") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("VSRX") + .selfManaged(true) + .byol(true) + .packageCode("STD") + .notifications("test@equinix.com") + .hostname("VSRX") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("23.2R1.13") + .coreCount(2) + .termLength(12) + .additionalBandwidth(5) + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") + .diverseDeviceId("ed7891bd-15b4-4f72-ac56-d96cfdacddcc") + .sshKey(DeviceSshKeyArgs.builder() + .username("test-username") + .keyName("valid-key-name") + .build()) + .aclTemplateId("3e548c02-9164-4197-aa23-05b1f644883c") + .build()); + + } +} diff --git a/examples/network/device/example_5/python/.gitignore b/examples/network/device/example_5/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_5/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_5/python/Pulumi.yaml b/examples/network/device/example_5/python/Pulumi.yaml new file mode 100644 index 00000000..c0ad6520 --- /dev/null +++ b/examples/network/device/example_5/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_5 +runtime: python diff --git a/examples/network/device/example_5/python/__main__.py b/examples/network/device/example_5/python/__main__.py new file mode 100644 index 00000000..240abc16 --- /dev/null +++ b/examples/network/device/example_5/python/__main__.py @@ -0,0 +1,26 @@ +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +vsrx_single = equinix.networkedge.Device("vsrxSingle", + name="tf-c8kv-sdwan", + metro_code=sv.metro_code, + type_code="VSRX", + self_managed=True, + byol=True, + package_code="STD", + notifications=["test@equinix.com"], + hostname="VSRX", + account_number=sv.number, + version="23.2R1.13", + core_count=2, + term_length=12, + additional_bandwidth=5, + project_id="a86d7112-d740-4758-9c9c-31e66373746b", + diverse_device_id="ed7891bd-15b4-4f72-ac56-d96cfdacddcc", + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name="valid-key-name", + ), + acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c") diff --git a/examples/network/device/example_5/python/requirements.txt b/examples/network/device/example_5/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/network/device/example_5/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_5/typescript/.gitignore b/examples/network/device/example_5/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_5/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_5/typescript/Pulumi.yaml b/examples/network/device/example_5/typescript/Pulumi.yaml new file mode 100644 index 00000000..ec11ab4b --- /dev/null +++ b/examples/network/device/example_5/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_5 +runtime: nodejs diff --git a/examples/network/device/example_5/typescript/index.ts b/examples/network/device/example_5/typescript/index.ts new file mode 100644 index 00000000..08f1f508 --- /dev/null +++ b/examples/network/device/example_5/typescript/index.ts @@ -0,0 +1,30 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const vsrxSingle = new equinix.networkedge.Device("vsrxSingle", { + name: "tf-c8kv-sdwan", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "VSRX", + selfManaged: true, + byol: true, + packageCode: "STD", + notifications: ["test@equinix.com"], + hostname: "VSRX", + accountNumber: sv.apply(sv => sv.number), + version: "23.2R1.13", + coreCount: 2, + termLength: 12, + additionalBandwidth: 5, + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", + diverseDeviceId: "ed7891bd-15b4-4f72-ac56-d96cfdacddcc", + sshKey: { + username: "test-username", + keyName: "valid-key-name", + }, + aclTemplateId: "3e548c02-9164-4197-aa23-05b1f644883c", +}); diff --git a/examples/network/device/example_5/typescript/package.json b/examples/network/device/example_5/typescript/package.json new file mode 100644 index 00000000..19be9def --- /dev/null +++ b/examples/network/device/example_5/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-network-device-example_5", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/network/device/example_5/typescript/tsconfig.json b/examples/network/device/example_5/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_5/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/example_6/Pulumi.yaml b/examples/network/device/example_6/Pulumi.yaml new file mode 100644 index 00000000..4d64f024 --- /dev/null +++ b/examples/network/device/example_6/Pulumi.yaml @@ -0,0 +1,49 @@ +name: equinix-network-device-example_6 +runtime: yaml +resources: + testPublicKey: + type: equinix:networkedge:SshKey + name: test_public_key + properties: + name: key-name + publicKey: ssh-dss key-value + type: DSA + aristaHa: + type: equinix:networkedge:Device + name: arista_ha + properties: + name: tf-arista-p + metroCode: ${sv.metroCode} + typeCode: ARISTA-ROUTER + selfManaged: true + connectivity: PRIVATE + byol: true + packageCode: CloudEOS + notifications: + - test@equinix.com + hostname: arista-p + accountNumber: ${sv.number} + version: 4.29.0 + coreCount: 4 + termLength: 12 + additionalBandwidth: 5 + sshKey: + username: test-username + keyName: ${testPublicKey.name} + aclTemplateId: c637a17b-7a6a-4486-924b-30e6c36904b0 + secondaryDevice: + name: tf-arista-s + metroCode: ${sv.metroCode} + hostname: arista-s + notifications: + - test@eq.com + accountNumber: ${sv.number} + aclTemplateId: fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138 +variables: + # Create self configured redundant Arista router with DSA key + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV diff --git a/examples/network/device/example_6/csharp/.gitignore b/examples/network/device/example_6/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_6/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_6/csharp/Program.cs b/examples/network/device/example_6/csharp/Program.cs new file mode 100644 index 00000000..a6af8406 --- /dev/null +++ b/examples/network/device/example_6/csharp/Program.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var testPublicKey = new Equinix.NetworkEdge.SshKey("testPublicKey", new() + { + Name = "key-name", + PublicKey = "ssh-dss key-value", + Type = "DSA", + }); + + var aristaHa = new Equinix.NetworkEdge.Device("aristaHa", new() + { + Name = "tf-arista-p", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "ARISTA-ROUTER", + SelfManaged = true, + Connectivity = "PRIVATE", + Byol = true, + PackageCode = "CloudEOS", + Notifications = new[] + { + "test@equinix.com", + }, + Hostname = "arista-p", + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "4.29.0", + CoreCount = 4, + TermLength = 12, + AdditionalBandwidth = 5, + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test-username", + KeyName = testPublicKey.Name, + }, + AclTemplateId = "c637a17b-7a6a-4486-924b-30e6c36904b0", + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-arista-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Hostname = "arista-s", + Notifications = new[] + { + "test@eq.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + AclTemplateId = "fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138", + }, + }); + +}); + diff --git a/examples/network/device/example_6/csharp/Pulumi.yaml b/examples/network/device/example_6/csharp/Pulumi.yaml new file mode 100644 index 00000000..b6489477 --- /dev/null +++ b/examples/network/device/example_6/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_6 +runtime: dotnet diff --git a/examples/network/device/example_6/csharp/equinix-network-device-example_6.csproj b/examples/network/device/example_6/csharp/equinix-network-device-example_6.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/device/example_6/csharp/equinix-network-device-example_6.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_6/go/Pulumi.yaml b/examples/network/device/example_6/go/Pulumi.yaml new file mode 100644 index 00000000..3fd6ffdf --- /dev/null +++ b/examples/network/device/example_6/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_6 +runtime: go diff --git a/examples/network/device/example_6/go/go.mod b/examples/network/device/example_6/go/go.mod new file mode 100644 index 00000000..229bb1e0 --- /dev/null +++ b/examples/network/device/example_6/go/go.mod @@ -0,0 +1,94 @@ +module equinix-network-device-example_6 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_6/go/main.go b/examples/network/device/example_6/go/main.go new file mode 100644 index 00000000..2b0e31db --- /dev/null +++ b/examples/network/device/example_6/go/main.go @@ -0,0 +1,63 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + testPublicKey, err := networkedge.NewSshKey(ctx, "testPublicKey", &networkedge.SshKeyArgs{ + Name: pulumi.String("key-name"), + PublicKey: pulumi.String("ssh-dss key-value"), + Type: pulumi.String("DSA"), + }) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "aristaHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-arista-p"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("ARISTA-ROUTER"), + SelfManaged: pulumi.Bool(true), + Connectivity: pulumi.String("PRIVATE"), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("CloudEOS"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + Hostname: pulumi.String("arista-p"), + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("4.29.0"), + CoreCount: pulumi.Int(4), + TermLength: pulumi.Int(12), + AdditionalBandwidth: pulumi.Int(5), + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test-username"), + KeyName: testPublicKey.Name, + }, + AclTemplateId: pulumi.String("c637a17b-7a6a-4486-924b-30e6c36904b0"), + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-arista-s"), + MetroCode: pulumi.String(sv.MetroCode), + Hostname: pulumi.String("arista-s"), + Notifications: pulumi.StringArray{ + pulumi.String("test@eq.com"), + }, + AccountNumber: pulumi.String(sv.Number), + AclTemplateId: pulumi.String("fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138"), + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_6/java/Pulumi.yaml b/examples/network/device/example_6/java/Pulumi.yaml new file mode 100644 index 00000000..7670bb6f --- /dev/null +++ b/examples/network/device/example_6/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_6 +runtime: java diff --git a/examples/network/device/example_6/java/pom.xml b/examples/network/device/example_6/java/pom.xml new file mode 100644 index 00000000..2923cded --- /dev/null +++ b/examples/network/device/example_6/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_6 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_6/java/src/main/java/generated_program/App.java b/examples/network/device/example_6/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..90555273 --- /dev/null +++ b/examples/network/device/example_6/java/src/main/java/generated_program/App.java @@ -0,0 +1,69 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.SshKey; +import com.pulumi.equinix.networkedge.SshKeyArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var testPublicKey = new SshKey("testPublicKey", SshKeyArgs.builder() + .name("key-name") + .publicKey("ssh-dss key-value") + .type("DSA") + .build()); + + var aristaHa = new Device("aristaHa", DeviceArgs.builder() + .name("tf-arista-p") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("ARISTA-ROUTER") + .selfManaged(true) + .connectivity("PRIVATE") + .byol(true) + .packageCode("CloudEOS") + .notifications("test@equinix.com") + .hostname("arista-p") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("4.29.0") + .coreCount(4) + .termLength(12) + .additionalBandwidth(5) + .sshKey(DeviceSshKeyArgs.builder() + .username("test-username") + .keyName(testPublicKey.name()) + .build()) + .aclTemplateId("c637a17b-7a6a-4486-924b-30e6c36904b0") + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-arista-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .hostname("arista-s") + .notifications("test@eq.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .aclTemplateId("fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138") + .build()) + .build()); + + } +} diff --git a/examples/network/device/example_6/python/.gitignore b/examples/network/device/example_6/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_6/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_6/python/Pulumi.yaml b/examples/network/device/example_6/python/Pulumi.yaml new file mode 100644 index 00000000..99886abb --- /dev/null +++ b/examples/network/device/example_6/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_6 +runtime: python diff --git a/examples/network/device/example_6/python/__main__.py b/examples/network/device/example_6/python/__main__.py new file mode 100644 index 00000000..6b0126b1 --- /dev/null +++ b/examples/network/device/example_6/python/__main__.py @@ -0,0 +1,37 @@ +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +test_public_key = equinix.networkedge.SshKey("testPublicKey", + name="key-name", + public_key="ssh-dss key-value", + type="DSA") +arista_ha = equinix.networkedge.Device("aristaHa", + name="tf-arista-p", + metro_code=sv.metro_code, + type_code="ARISTA-ROUTER", + self_managed=True, + connectivity="PRIVATE", + byol=True, + package_code="CloudEOS", + notifications=["test@equinix.com"], + hostname="arista-p", + account_number=sv.number, + version="4.29.0", + core_count=4, + term_length=12, + additional_bandwidth=5, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name=test_public_key.name, + ), + acl_template_id="c637a17b-7a6a-4486-924b-30e6c36904b0", + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-arista-s", + metro_code=sv.metro_code, + hostname="arista-s", + notifications=["test@eq.com"], + account_number=sv.number, + acl_template_id="fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138", + )) diff --git a/examples/network/device/example_6/python/requirements.txt b/examples/network/device/example_6/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/network/device/example_6/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_6/typescript/.gitignore b/examples/network/device/example_6/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_6/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_6/typescript/Pulumi.yaml b/examples/network/device/example_6/typescript/Pulumi.yaml new file mode 100644 index 00000000..6a986e85 --- /dev/null +++ b/examples/network/device/example_6/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_6 +runtime: nodejs diff --git a/examples/network/device/example_6/typescript/index.ts b/examples/network/device/example_6/typescript/index.ts new file mode 100644 index 00000000..0e2842b8 --- /dev/null +++ b/examples/network/device/example_6/typescript/index.ts @@ -0,0 +1,42 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const testPublicKey = new equinix.networkedge.SshKey("testPublicKey", { + name: "key-name", + publicKey: "ssh-dss key-value", + type: "DSA", +}); +const aristaHa = new equinix.networkedge.Device("aristaHa", { + name: "tf-arista-p", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "ARISTA-ROUTER", + selfManaged: true, + connectivity: "PRIVATE", + byol: true, + packageCode: "CloudEOS", + notifications: ["test@equinix.com"], + hostname: "arista-p", + accountNumber: sv.apply(sv => sv.number), + version: "4.29.0", + coreCount: 4, + termLength: 12, + additionalBandwidth: 5, + sshKey: { + username: "test-username", + keyName: testPublicKey.name, + }, + aclTemplateId: "c637a17b-7a6a-4486-924b-30e6c36904b0", + secondaryDevice: { + name: "tf-arista-s", + metroCode: sv.apply(sv => sv.metroCode), + hostname: "arista-s", + notifications: ["test@eq.com"], + accountNumber: sv.apply(sv => sv.number), + aclTemplateId: "fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138", + }, +}); diff --git a/examples/network/device/example_6/typescript/package.json b/examples/network/device/example_6/typescript/package.json new file mode 100644 index 00000000..1ffba8a0 --- /dev/null +++ b/examples/network/device/example_6/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-network-device-example_6", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/network/device/example_6/typescript/tsconfig.json b/examples/network/device/example_6/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_6/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/example_7/Pulumi.yaml b/examples/network/device/example_7/Pulumi.yaml new file mode 100644 index 00000000..eefa14a5 --- /dev/null +++ b/examples/network/device/example_7/Pulumi.yaml @@ -0,0 +1,58 @@ +name: equinix-network-device-example_7 +runtime: yaml +resources: + testPublicKey: + type: equinix:networkedge:SshKey + name: test_public_key + properties: + name: key-name + publicKey: ssh-dss key-value + type: DSA + bluecatBddsHa: + type: equinix:networkedge:Device + name: bluecat_bdds_ha + properties: + name: tf-bluecat-bdds-p + metroCode: ${sv.metroCode} + typeCode: BLUECAT + selfManaged: true + connectivity: PRIVATE + byol: true + packageCode: STD + notifications: + - test@equinix.com + accountNumber: ${sv.number} + version: 9.6.0 + coreCount: 2 + termLength: 12 + vendorConfiguration: + hostname: test + privateAddress: x.x.x.x + privateCidrMask: '24' + privateGateway: x.x.x.x + licenseKey: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx + licenseId: xxxxxxxxxxxxxxx + sshKey: + username: test-username + keyName: ${testPublicKey.name} + secondaryDevice: + name: tf-bluecat-bdds-s + metroCode: ${sv.metroCode} + notifications: + - test@eq.com + accountNumber: ${sv.number} + vendorConfiguration: + hostname: test + privateAddress: x.x.x.x + privateCidrMask: '24' + privateGateway: x.x.x.x + licenseKey: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx + licenseId: xxxxxxxxxxxxxxx +variables: + # Create self configured redundant BlueCat DNS and DHCP Server + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV diff --git a/examples/network/device/example_7/csharp/.gitignore b/examples/network/device/example_7/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_7/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_7/csharp/Program.cs b/examples/network/device/example_7/csharp/Program.cs new file mode 100644 index 00000000..993ac1e3 --- /dev/null +++ b/examples/network/device/example_7/csharp/Program.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var testPublicKey = new Equinix.NetworkEdge.SshKey("testPublicKey", new() + { + Name = "key-name", + PublicKey = "ssh-dss key-value", + Type = "DSA", + }); + + var bluecatBddsHa = new Equinix.NetworkEdge.Device("bluecatBddsHa", new() + { + Name = "tf-bluecat-bdds-p", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "BLUECAT", + SelfManaged = true, + Connectivity = "PRIVATE", + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "test@equinix.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + Version = "9.6.0", + CoreCount = 2, + TermLength = 12, + VendorConfiguration = + { + { "hostname", "test" }, + { "privateAddress", "x.x.x.x" }, + { "privateCidrMask", "24" }, + { "privateGateway", "x.x.x.x" }, + { "licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" }, + { "licenseId", "xxxxxxxxxxxxxxx" }, + }, + SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + { + Username = "test-username", + KeyName = testPublicKey.Name, + }, + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-bluecat-bdds-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Notifications = new[] + { + "test@eq.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + VendorConfiguration = + { + { "hostname", "test" }, + { "privateAddress", "x.x.x.x" }, + { "privateCidrMask", "24" }, + { "privateGateway", "x.x.x.x" }, + { "licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" }, + { "licenseId", "xxxxxxxxxxxxxxx" }, + }, + }, + }); + +}); + diff --git a/examples/network/device/example_7/csharp/Pulumi.yaml b/examples/network/device/example_7/csharp/Pulumi.yaml new file mode 100644 index 00000000..83f691ed --- /dev/null +++ b/examples/network/device/example_7/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_7 +runtime: dotnet diff --git a/examples/network/device/example_7/csharp/equinix-network-device-example_7.csproj b/examples/network/device/example_7/csharp/equinix-network-device-example_7.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/device/example_7/csharp/equinix-network-device-example_7.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_7/go/Pulumi.yaml b/examples/network/device/example_7/go/Pulumi.yaml new file mode 100644 index 00000000..a36ddc53 --- /dev/null +++ b/examples/network/device/example_7/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_7 +runtime: go diff --git a/examples/network/device/example_7/go/go.mod b/examples/network/device/example_7/go/go.mod new file mode 100644 index 00000000..2f36bbe7 --- /dev/null +++ b/examples/network/device/example_7/go/go.mod @@ -0,0 +1,94 @@ +module equinix-network-device-example_7 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_7/go/main.go b/examples/network/device/example_7/go/main.go new file mode 100644 index 00000000..ad7dc4ba --- /dev/null +++ b/examples/network/device/example_7/go/main.go @@ -0,0 +1,74 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + testPublicKey, err := networkedge.NewSshKey(ctx, "testPublicKey", &networkedge.SshKeyArgs{ + Name: pulumi.String("key-name"), + PublicKey: pulumi.String("ssh-dss key-value"), + Type: pulumi.String("DSA"), + }) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "bluecatBddsHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-bluecat-bdds-p"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("BLUECAT"), + SelfManaged: pulumi.Bool(true), + Connectivity: pulumi.String("PRIVATE"), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("STD"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + AccountNumber: pulumi.String(sv.Number), + Version: pulumi.String("9.6.0"), + CoreCount: pulumi.Int(2), + TermLength: pulumi.Int(12), + VendorConfiguration: pulumi.StringMap{ + "hostname": pulumi.String("test"), + "privateAddress": pulumi.String("x.x.x.x"), + "privateCidrMask": pulumi.String("24"), + "privateGateway": pulumi.String("x.x.x.x"), + "licenseKey": pulumi.String("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + "licenseId": pulumi.String("xxxxxxxxxxxxxxx"), + }, + SshKey: &networkedge.DeviceSshKeyArgs{ + Username: pulumi.String("test-username"), + KeyName: testPublicKey.Name, + }, + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-bluecat-bdds-s"), + MetroCode: pulumi.String(sv.MetroCode), + Notifications: pulumi.StringArray{ + pulumi.String("test@eq.com"), + }, + AccountNumber: pulumi.String(sv.Number), + VendorConfiguration: pulumi.StringMap{ + "hostname": pulumi.String("test"), + "privateAddress": pulumi.String("x.x.x.x"), + "privateCidrMask": pulumi.String("24"), + "privateGateway": pulumi.String("x.x.x.x"), + "licenseKey": pulumi.String("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + "licenseId": pulumi.String("xxxxxxxxxxxxxxx"), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_7/java/Pulumi.yaml b/examples/network/device/example_7/java/Pulumi.yaml new file mode 100644 index 00000000..8233493c --- /dev/null +++ b/examples/network/device/example_7/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_7 +runtime: java diff --git a/examples/network/device/example_7/java/pom.xml b/examples/network/device/example_7/java/pom.xml new file mode 100644 index 00000000..62cdded1 --- /dev/null +++ b/examples/network/device/example_7/java/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_7 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_7/java/src/main/java/generated_program/App.java b/examples/network/device/example_7/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..94caa136 --- /dev/null +++ b/examples/network/device/example_7/java/src/main/java/generated_program/App.java @@ -0,0 +1,80 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.SshKey; +import com.pulumi.equinix.networkedge.SshKeyArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var testPublicKey = new SshKey("testPublicKey", SshKeyArgs.builder() + .name("key-name") + .publicKey("ssh-dss key-value") + .type("DSA") + .build()); + + var bluecatBddsHa = new Device("bluecatBddsHa", DeviceArgs.builder() + .name("tf-bluecat-bdds-p") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("BLUECAT") + .selfManaged(true) + .connectivity("PRIVATE") + .byol(true) + .packageCode("STD") + .notifications("test@equinix.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .version("9.6.0") + .coreCount(2) + .termLength(12) + .vendorConfiguration(Map.ofEntries( + Map.entry("hostname", "test"), + Map.entry("privateAddress", "x.x.x.x"), + Map.entry("privateCidrMask", "24"), + Map.entry("privateGateway", "x.x.x.x"), + Map.entry("licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + Map.entry("licenseId", "xxxxxxxxxxxxxxx") + )) + .sshKey(DeviceSshKeyArgs.builder() + .username("test-username") + .keyName(testPublicKey.name()) + .build()) + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-bluecat-bdds-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .notifications("test@eq.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .vendorConfiguration(Map.ofEntries( + Map.entry("hostname", "test"), + Map.entry("privateAddress", "x.x.x.x"), + Map.entry("privateCidrMask", "24"), + Map.entry("privateGateway", "x.x.x.x"), + Map.entry("licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), + Map.entry("licenseId", "xxxxxxxxxxxxxxx") + )) + .build()) + .build()); + + } +} diff --git a/examples/network/device/example_7/python/.gitignore b/examples/network/device/example_7/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_7/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_7/python/Pulumi.yaml b/examples/network/device/example_7/python/Pulumi.yaml new file mode 100644 index 00000000..d49f02c9 --- /dev/null +++ b/examples/network/device/example_7/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_7 +runtime: python diff --git a/examples/network/device/example_7/python/__main__.py b/examples/network/device/example_7/python/__main__.py new file mode 100644 index 00000000..7ed1f829 --- /dev/null +++ b/examples/network/device/example_7/python/__main__.py @@ -0,0 +1,48 @@ +import pulumi +import pulumi_equinix as equinix + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +test_public_key = equinix.networkedge.SshKey("testPublicKey", + name="key-name", + public_key="ssh-dss key-value", + type="DSA") +bluecat_bdds_ha = equinix.networkedge.Device("bluecatBddsHa", + name="tf-bluecat-bdds-p", + metro_code=sv.metro_code, + type_code="BLUECAT", + self_managed=True, + connectivity="PRIVATE", + byol=True, + package_code="STD", + notifications=["test@equinix.com"], + account_number=sv.number, + version="9.6.0", + core_count=2, + term_length=12, + vendor_configuration={ + "hostname": "test", + "privateAddress": "x.x.x.x", + "privateCidrMask": "24", + "privateGateway": "x.x.x.x", + "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + "licenseId": "xxxxxxxxxxxxxxx", + }, + ssh_key=equinix.networkedge.DeviceSshKeyArgs( + username="test-username", + key_name=test_public_key.name, + ), + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-bluecat-bdds-s", + metro_code=sv.metro_code, + notifications=["test@eq.com"], + account_number=sv.number, + vendor_configuration={ + "hostname": "test", + "privateAddress": "x.x.x.x", + "privateCidrMask": "24", + "privateGateway": "x.x.x.x", + "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + "licenseId": "xxxxxxxxxxxxxxx", + }, + )) diff --git a/examples/network/device/example_7/python/requirements.txt b/examples/network/device/example_7/python/requirements.txt new file mode 100644 index 00000000..317d94a1 --- /dev/null +++ b/examples/network/device/example_7/python/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_7/typescript/.gitignore b/examples/network/device/example_7/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_7/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_7/typescript/Pulumi.yaml b/examples/network/device/example_7/typescript/Pulumi.yaml new file mode 100644 index 00000000..cf9b598a --- /dev/null +++ b/examples/network/device/example_7/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_7 +runtime: nodejs diff --git a/examples/network/device/example_7/typescript/index.ts b/examples/network/device/example_7/typescript/index.ts new file mode 100644 index 00000000..26a3f75a --- /dev/null +++ b/examples/network/device/example_7/typescript/index.ts @@ -0,0 +1,53 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const testPublicKey = new equinix.networkedge.SshKey("testPublicKey", { + name: "key-name", + publicKey: "ssh-dss key-value", + type: "DSA", +}); +const bluecatBddsHa = new equinix.networkedge.Device("bluecatBddsHa", { + name: "tf-bluecat-bdds-p", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "BLUECAT", + selfManaged: true, + connectivity: "PRIVATE", + byol: true, + packageCode: "STD", + notifications: ["test@equinix.com"], + accountNumber: sv.apply(sv => sv.number), + version: "9.6.0", + coreCount: 2, + termLength: 12, + vendorConfiguration: { + hostname: "test", + privateAddress: "x.x.x.x", + privateCidrMask: "24", + privateGateway: "x.x.x.x", + licenseKey: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + licenseId: "xxxxxxxxxxxxxxx", + }, + sshKey: { + username: "test-username", + keyName: testPublicKey.name, + }, + secondaryDevice: { + name: "tf-bluecat-bdds-s", + metroCode: sv.apply(sv => sv.metroCode), + notifications: ["test@eq.com"], + accountNumber: sv.apply(sv => sv.number), + vendorConfiguration: { + hostname: "test", + privateAddress: "x.x.x.x", + privateCidrMask: "24", + privateGateway: "x.x.x.x", + licenseKey: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx", + licenseId: "xxxxxxxxxxxxxxx", + }, + }, +}); diff --git a/examples/network/device/example_7/typescript/package.json b/examples/network/device/example_7/typescript/package.json new file mode 100644 index 00000000..d41f0460 --- /dev/null +++ b/examples/network/device/example_7/typescript/package.json @@ -0,0 +1,11 @@ +{ + "name": "equinix-network-device-example_7", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } +} \ No newline at end of file diff --git a/examples/network/device/example_7/typescript/tsconfig.json b/examples/network/device/example_7/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_7/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/example_8/Pulumi.yaml b/examples/network/device/example_8/Pulumi.yaml new file mode 100644 index 00000000..62586793 --- /dev/null +++ b/examples/network/device/example_8/Pulumi.yaml @@ -0,0 +1,68 @@ +name: equinix-network-device-example_8 +runtime: yaml +resources: + bluecatEdgeServicePointCloudinitPrimaryFile: + type: equinix:networkedge:NetworkFile + name: bluecat_edge_service_point_cloudinit_primary_file + properties: + fileName: TF-BLUECAT-ESP-cloud-init-file.txt + content: + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: ${sv.metroCode} + deviceTypeCode: BLUECAT-EDGE-SERVICE-POINT + processType: CLOUD_INIT + selfManaged: true + byol: true + bluecatEdgeServicePointCloudinitSecondaryFile: + type: equinix:networkedge:NetworkFile + name: bluecat_edge_service_point_cloudinit_secondary_file + properties: + fileName: TF-BLUECAT-ESP-cloud-init-file.txt + content: + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: ${sv.metroCode} + deviceTypeCode: BLUECAT-EDGE-SERVICE-POINT + processType: CLOUD_INIT + selfManaged: true + byol: true + bluecatEdgeServicePointHa: + type: equinix:networkedge:Device + name: bluecat_edge_service_point_ha + properties: + name: tf-bluecat-edge-service-point-p + metroCode: ${sv.metroCode} + typeCode: BLUECAT-EDGE-SERVICE-POINT + selfManaged: true + connectivity: PRIVATE + byol: true + packageCode: STD + notifications: + - test@equinix.com + accountNumber: ${sv.number} + cloudInitFileId: ${bluecatEdgeServicePointCloudinitPrimaryFile.uuid} + version: 4.6.3 + coreCount: 4 + termLength: 12 + secondaryDevice: + name: tf-bluecat-edge-service-point-s + metroCode: ${sv.metroCode} + notifications: + - test@eq.com + accountNumber: ${sv.number} + cloudInitFileId: ${bluecatEdgeServicePointCloudinitSecondaryFile.uuid} +variables: + # Create self configured redundant BlueCat Edge Service Point + sv: + fn::invoke: + Function: equinix:networkedge:getAccount + Arguments: + name: account-name + metroCode: SV diff --git a/examples/network/device/example_8/csharp/.gitignore b/examples/network/device/example_8/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/device/example_8/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/device/example_8/csharp/Program.cs b/examples/network/device/example_8/csharp/Program.cs new file mode 100644 index 00000000..119c4d84 --- /dev/null +++ b/examples/network/device/example_8/csharp/Program.cs @@ -0,0 +1,75 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; + +return await Deployment.RunAsync(() => +{ + var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + { + Name = "account-name", + MetroCode = "SV", + }); + + var bluecatEdgeServicePointCloudinitPrimaryFile = new Equinix.NetworkEdge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", new() + { + FileName = "TF-BLUECAT-ESP-cloud-init-file.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse), + DeviceTypeCode = "BLUECAT-EDGE-SERVICE-POINT", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + SelfManaged = true, + Byol = true, + }); + + var bluecatEdgeServicePointCloudinitSecondaryFile = new Equinix.NetworkEdge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", new() + { + FileName = "TF-BLUECAT-ESP-cloud-init-file.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse), + DeviceTypeCode = "BLUECAT-EDGE-SERVICE-POINT", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + SelfManaged = true, + Byol = true, + }); + + var bluecatEdgeServicePointHa = new Equinix.NetworkEdge.Device("bluecatEdgeServicePointHa", new() + { + Name = "tf-bluecat-edge-service-point-p", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + TypeCode = "BLUECAT-EDGE-SERVICE-POINT", + SelfManaged = true, + Connectivity = "PRIVATE", + Byol = true, + PackageCode = "STD", + Notifications = new[] + { + "test@equinix.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + CloudInitFileId = bluecatEdgeServicePointCloudinitPrimaryFile.Uuid, + Version = "4.6.3", + CoreCount = 4, + TermLength = 12, + SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + { + Name = "tf-bluecat-edge-service-point-s", + MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + Notifications = new[] + { + "test@eq.com", + }, + AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + CloudInitFileId = bluecatEdgeServicePointCloudinitSecondaryFile.Uuid, + }, + }); + +}); + diff --git a/examples/network/device/example_8/csharp/Pulumi.yaml b/examples/network/device/example_8/csharp/Pulumi.yaml new file mode 100644 index 00000000..d921cd3c --- /dev/null +++ b/examples/network/device/example_8/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_8 +runtime: dotnet diff --git a/examples/network/device/example_8/csharp/equinix-network-device-example_8.csproj b/examples/network/device/example_8/csharp/equinix-network-device-example_8.csproj new file mode 100644 index 00000000..ef1958d7 --- /dev/null +++ b/examples/network/device/example_8/csharp/equinix-network-device-example_8.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + + + + + + + + \ No newline at end of file diff --git a/examples/network/device/example_8/go/Pulumi.yaml b/examples/network/device/example_8/go/Pulumi.yaml new file mode 100644 index 00000000..a910a59f --- /dev/null +++ b/examples/network/device/example_8/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_8 +runtime: go diff --git a/examples/network/device/example_8/go/go.mod b/examples/network/device/example_8/go/go.mod new file mode 100644 index 00000000..ffd98fa0 --- /dev/null +++ b/examples/network/device/example_8/go/go.mod @@ -0,0 +1,95 @@ +module equinix-network-device-example_8 + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi-std/sdk v1.7.2 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/device/example_8/go/main.go b/examples/network/device/example_8/go/main.go new file mode 100644 index 00000000..4b257811 --- /dev/null +++ b/examples/network/device/example_8/go/main.go @@ -0,0 +1,86 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi-std/sdk/go/std" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ + Name: pulumi.StringRef("account-name"), + MetroCode: "SV", + }, nil) + if err != nil { + return err + } + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err + } + bluecatEdgeServicePointCloudinitPrimaryFile, err := networkedge.NewNetworkFile(ctx, "bluecatEdgeServicePointCloudinitPrimaryFile", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("TF-BLUECAT-ESP-cloud-init-file.txt"), + Content: invokeFile.Result, + MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), + DeviceTypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + }) + if err != nil { + return err + } + invokeFile1, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err + } + bluecatEdgeServicePointCloudinitSecondaryFile, err := networkedge.NewNetworkFile(ctx, "bluecatEdgeServicePointCloudinitSecondaryFile", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("TF-BLUECAT-ESP-cloud-init-file.txt"), + Content: invokeFile1.Result, + MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), + DeviceTypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + }) + if err != nil { + return err + } + _, err = networkedge.NewDevice(ctx, "bluecatEdgeServicePointHa", &networkedge.DeviceArgs{ + Name: pulumi.String("tf-bluecat-edge-service-point-p"), + MetroCode: pulumi.String(sv.MetroCode), + TypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), + SelfManaged: pulumi.Bool(true), + Connectivity: pulumi.String("PRIVATE"), + Byol: pulumi.Bool(true), + PackageCode: pulumi.String("STD"), + Notifications: pulumi.StringArray{ + pulumi.String("test@equinix.com"), + }, + AccountNumber: pulumi.String(sv.Number), + CloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.Uuid, + Version: pulumi.String("4.6.3"), + CoreCount: pulumi.Int(4), + TermLength: pulumi.Int(12), + SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ + Name: pulumi.String("tf-bluecat-edge-service-point-s"), + MetroCode: pulumi.String(sv.MetroCode), + Notifications: pulumi.StringArray{ + pulumi.String("test@eq.com"), + }, + AccountNumber: pulumi.String(sv.Number), + CloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.Uuid, + }, + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/device/example_8/java/Pulumi.yaml b/examples/network/device/example_8/java/Pulumi.yaml new file mode 100644 index 00000000..b0024a9a --- /dev/null +++ b/examples/network/device/example_8/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_8 +runtime: java diff --git a/examples/network/device/example_8/java/pom.xml b/examples/network/device/example_8/java/pom.xml new file mode 100644 index 00000000..4bd28f4c --- /dev/null +++ b/examples/network/device/example_8/java/pom.xml @@ -0,0 +1,96 @@ + + + 4.0.0 + + com.pulumi + equinix-network-device-example_8 + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + com.pulumi + std + 1.7.2 + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/device/example_8/java/src/main/java/generated_program/App.java b/examples/network/device/example_8/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..6b8c9979 --- /dev/null +++ b/examples/network/device/example_8/java/src/main/java/generated_program/App.java @@ -0,0 +1,79 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.inputs.GetAccountArgs; +import com.pulumi.equinix.networkedge.NetworkFile; +import com.pulumi.equinix.networkedge.NetworkFileArgs; +import com.pulumi.equinix.networkedge.Device; +import com.pulumi.equinix.networkedge.DeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() + .name("account-name") + .metroCode("SV") + .build()); + + var bluecatEdgeServicePointCloudinitPrimaryFile = new NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", NetworkFileArgs.builder() + .fileName("TF-BLUECAT-ESP-cloud-init-file.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .deviceTypeCode("BLUECAT-EDGE-SERVICE-POINT") + .processType("CLOUD_INIT") + .selfManaged(true) + .byol(true) + .build()); + + var bluecatEdgeServicePointCloudinitSecondaryFile = new NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", NetworkFileArgs.builder() + .fileName("TF-BLUECAT-ESP-cloud-init-file.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .deviceTypeCode("BLUECAT-EDGE-SERVICE-POINT") + .processType("CLOUD_INIT") + .selfManaged(true) + .byol(true) + .build()); + + var bluecatEdgeServicePointHa = new Device("bluecatEdgeServicePointHa", DeviceArgs.builder() + .name("tf-bluecat-edge-service-point-p") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .typeCode("BLUECAT-EDGE-SERVICE-POINT") + .selfManaged(true) + .connectivity("PRIVATE") + .byol(true) + .packageCode("STD") + .notifications("test@equinix.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .cloudInitFileId(bluecatEdgeServicePointCloudinitPrimaryFile.uuid()) + .version("4.6.3") + .coreCount(4) + .termLength(12) + .secondaryDevice(DeviceSecondaryDeviceArgs.builder() + .name("tf-bluecat-edge-service-point-s") + .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode())) + .notifications("test@eq.com") + .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number())) + .cloudInitFileId(bluecatEdgeServicePointCloudinitSecondaryFile.uuid()) + .build()) + .build()); + + } +} diff --git a/examples/network/device/example_8/python/.gitignore b/examples/network/device/example_8/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/device/example_8/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/device/example_8/python/Pulumi.yaml b/examples/network/device/example_8/python/Pulumi.yaml new file mode 100644 index 00000000..e830463d --- /dev/null +++ b/examples/network/device/example_8/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_8 +runtime: python diff --git a/examples/network/device/example_8/python/__main__.py b/examples/network/device/example_8/python/__main__.py new file mode 100644 index 00000000..78e64d2d --- /dev/null +++ b/examples/network/device/example_8/python/__main__.py @@ -0,0 +1,43 @@ +import pulumi +import pulumi_equinix as equinix +import pulumi_std as std + +sv = equinix.networkedge.get_account_output(name="account-name", + metro_code="SV") +bluecat_edge_service_point_cloudinit_primary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", + file_name="TF-BLUECAT-ESP-cloud-init-file.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)), + device_type_code="BLUECAT-EDGE-SERVICE-POINT", + process_type=equinix.networkedge.FileType.CLOUD_INIT, + self_managed=True, + byol=True) +bluecat_edge_service_point_cloudinit_secondary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", + file_name="TF-BLUECAT-ESP-cloud-init-file.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)), + device_type_code="BLUECAT-EDGE-SERVICE-POINT", + process_type=equinix.networkedge.FileType.CLOUD_INIT, + self_managed=True, + byol=True) +bluecat_edge_service_point_ha = equinix.networkedge.Device("bluecatEdgeServicePointHa", + name="tf-bluecat-edge-service-point-p", + metro_code=sv.metro_code, + type_code="BLUECAT-EDGE-SERVICE-POINT", + self_managed=True, + connectivity="PRIVATE", + byol=True, + package_code="STD", + notifications=["test@equinix.com"], + account_number=sv.number, + cloud_init_file_id=bluecat_edge_service_point_cloudinit_primary_file.uuid, + version="4.6.3", + core_count=4, + term_length=12, + secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs( + name="tf-bluecat-edge-service-point-s", + metro_code=sv.metro_code, + notifications=["test@eq.com"], + account_number=sv.number, + cloud_init_file_id=bluecat_edge_service_point_cloudinit_secondary_file.uuid, + )) diff --git a/examples/network/device/example_8/python/requirements.txt b/examples/network/device/example_8/python/requirements.txt new file mode 100644 index 00000000..da9f8ddc --- /dev/null +++ b/examples/network/device/example_8/python/requirements.txt @@ -0,0 +1,3 @@ +pulumi-std==1.7.2 +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device/example_8/typescript/.gitignore b/examples/network/device/example_8/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/device/example_8/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/device/example_8/typescript/Pulumi.yaml b/examples/network/device/example_8/typescript/Pulumi.yaml new file mode 100644 index 00000000..e3a64e65 --- /dev/null +++ b/examples/network/device/example_8/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-device-example_8 +runtime: nodejs diff --git a/examples/network/device/example_8/typescript/index.ts b/examples/network/device/example_8/typescript/index.ts new file mode 100644 index 00000000..bc083479 --- /dev/null +++ b/examples/network/device/example_8/typescript/index.ts @@ -0,0 +1,53 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as equinix from "@pulumi/equinix"; +import * as std from "@pulumi/std"; + +const sv = equinix.networkedge.getAccountOutput({ + name: "account-name", + metroCode: "SV", +}); +const bluecatEdgeServicePointCloudinitPrimaryFile = new equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", { + fileName: "TF-BLUECAT-ESP-cloud-init-file.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]), + deviceTypeCode: "BLUECAT-EDGE-SERVICE-POINT", + processType: equinix.networkedge.FileType.CloudInit, + selfManaged: true, + byol: true, +}); +const bluecatEdgeServicePointCloudinitSecondaryFile = new equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", { + fileName: "TF-BLUECAT-ESP-cloud-init-file.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]), + deviceTypeCode: "BLUECAT-EDGE-SERVICE-POINT", + processType: equinix.networkedge.FileType.CloudInit, + selfManaged: true, + byol: true, +}); +const bluecatEdgeServicePointHa = new equinix.networkedge.Device("bluecatEdgeServicePointHa", { + name: "tf-bluecat-edge-service-point-p", + metroCode: sv.apply(sv => sv.metroCode), + typeCode: "BLUECAT-EDGE-SERVICE-POINT", + selfManaged: true, + connectivity: "PRIVATE", + byol: true, + packageCode: "STD", + notifications: ["test@equinix.com"], + accountNumber: sv.apply(sv => sv.number), + cloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.uuid, + version: "4.6.3", + coreCount: 4, + termLength: 12, + secondaryDevice: { + name: "tf-bluecat-edge-service-point-s", + metroCode: sv.apply(sv => sv.metroCode), + notifications: ["test@eq.com"], + accountNumber: sv.apply(sv => sv.number), + cloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.uuid, + }, +}); diff --git a/examples/network/device/example_8/typescript/package.json b/examples/network/device/example_8/typescript/package.json new file mode 100644 index 00000000..7956f0b3 --- /dev/null +++ b/examples/network/device/example_8/typescript/package.json @@ -0,0 +1,12 @@ +{ + "name": "equinix-network-device-example_8", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0", + "@pulumi/std": "1.7.2" + } +} \ No newline at end of file diff --git a/examples/network/device/example_8/typescript/tsconfig.json b/examples/network/device/example_8/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/device/example_8/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/device/go/Pulumi.yaml b/examples/network/device/go/Pulumi.yaml deleted file mode 100644 index 671e0308..00000000 --- a/examples/network/device/go/Pulumi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: equinix-networkedge-device-cisco-C8KV -runtime: go -description: An Equinix Network Edge virtual network device - Cisco Catalyst 8000V Router -config: - accountName: - type: string - aclTemplateId: - type: string - additionalBandwidth: - type: integer - default: 5 - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - licenseToken: - type: string - metro: - type: string - default: SV - sizeInCores: - type: integer - default: 2 - sshKeyName: - type: string - sshUserName: - type: string - termLength: - type: integer - default: 6 diff --git a/examples/network/device/go/go.mod b/examples/network/device/go/go.mod deleted file mode 100644 index 29687b8c..00000000 --- a/examples/network/device/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-networkedge-device-cisco-C8KV - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/network/device/go/main.go b/examples/network/device/go/main.go deleted file mode 100644 index abda349f..00000000 --- a/examples/network/device/go/main.go +++ /dev/null @@ -1,77 +0,0 @@ -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - accountName := cfg.Require("accountName") - licenseToken := cfg.Require("licenseToken") - sshUserName := cfg.Require("sshUserName") - sshKeyName := cfg.Require("sshKeyName") - aclTemplateId := cfg.Require("aclTemplateId") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param - } - devicePackageCode := "network-essentials" - if param := cfg.Get("devicePackageCode"); param != "" { - devicePackageCode = param - } - deviceVersion := "17.06.01a" - if param := cfg.Get("deviceVersion"); param != "" { - deviceVersion = param - } - sizeInCores := 2 - if param := cfg.GetInt("sizeInCores"); param != 0 { - sizeInCores = param - } - termLength := 6 - if param := cfg.GetInt("termLength"); param != 0 { - termLength = param - } - additionalBandwidth := 5 - if param := cfg.GetInt("additionalBandwidth"); param != 0 { - additionalBandwidth = param - } - accountNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ - Name: pulumi.StringRef(accountName), - MetroCode: metro, - }, nil).Number - c8KRouter, err := networkedge.NewDevice(ctx, "c8kRouter", &networkedge.DeviceArgs{ - Name: pulumi.String("catalystRouter"), - MetroCode: pulumi.String(metro), - TypeCode: pulumi.String("C8000V"), - SelfManaged: pulumi.Bool(true), - Byol: pulumi.Bool(true), - PackageCode: pulumi.String(devicePackageCode), - Notifications: pulumi.StringArray{ - pulumi.String("example@equinix.com"), - }, - Hostname: pulumi.String("C8KV"), - AccountNumber: *pulumi.String(accountNum), - Version: pulumi.Any(deviceVersion), - CoreCount: pulumi.Int(sizeInCores), - TermLength: pulumi.Int(termLength), - LicenseToken: pulumi.String(licenseToken), - AdditionalBandwidth: pulumi.Int(additionalBandwidth), - SshKey: &networkedge.DeviceSshKeyArgs{ - Username: pulumi.String(sshUserName), - KeyName: pulumi.String(sshKeyName), - }, - AclTemplateId: pulumi.String(aclTemplateId), - }) - if err != nil { - return err - } - ctx.Export("routerId", c8KRouter.ID()) - ctx.Export("provisionStatus", c8KRouter.Status) - ctx.Export("licenseStatus", c8KRouter.LicenseStatus) - ctx.Export("sshIpAddress", c8KRouter.SshIpAddress) - return nil - }) -} diff --git a/examples/network/device/java/.gitignore b/examples/network/device/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/network/device/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/network/device/java/Pulumi.yaml b/examples/network/device/java/Pulumi.yaml deleted file mode 100644 index 9bb0fb67..00000000 --- a/examples/network/device/java/Pulumi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: equinix-networkedge-device-cisco-C8KV -runtime: java -description: An Equinix Network Edge virtual network device - Cisco Catalyst 8000V Router -config: - accountName: - type: string - aclTemplateId: - type: string - additionalBandwidth: - type: string - default: "5" - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - licenseToken: - type: string - metro: - type: string - default: SV - sizeInCores: - type: string - default: "2" - sshKeyName: - type: string - sshUserName: - type: string - termLength: - type: string - default: "6" diff --git a/examples/network/device/java/pom.xml b/examples/network/device/java/pom.xml deleted file mode 100644 index 39e63c99..00000000 --- a/examples/network/device/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-networkedge-device-cisco-C8KV - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/network/device/java/src/main/java/generated_program/App.java b/examples/network/device/java/src/main/java/generated_program/App.java deleted file mode 100644 index 2420903b..00000000 --- a/examples/network/device/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,68 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.Device; -import com.equinix.pulumi.networkedge.DeviceArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceSshKeyArgs; -import com.equinix.pulumi.networkedge.inputs.GetAccountArgs; -import com.equinix.pulumi.networkedge.NetworkedgeFunctions; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var accountName = config.get("accountName").get(); - final var licenseToken = config.get("licenseToken").get(); - final var sshUserName = config.get("sshUserName").get(); - final var sshKeyName = config.get("sshKeyName").get(); - final var aclTemplateId = config.get("aclTemplateId").get(); - final var metro = config.get("metro").orElse("SV"); - final var devicePackageCode = config.get("devicePackageCode").orElse("network-essentials"); - final var deviceVersion = config.get("deviceVersion").orElse("17.06.01a"); - final var sizeInCores = Integer.parseInt(config.get("sizeInCores").orElse("2")); - final var termLength = Integer.parseInt(config.get("termLength").orElse("6")); - final var additionalBandwidth = Integer.parseInt(config.get("additionalBandwidth").orElse("5")); - final var accountNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() - .name(accountName) - .metroCode(metro) - .build()).applyValue(account -> account.number()); - - var c8KRouter = new Device("c8KRouter", DeviceArgs.builder() - .name("catalystRouter") - .metroCode(metro) - .typeCode("C8000V") - .selfManaged(true) - .byol(true) - .packageCode(devicePackageCode) - .notifications("example@equinix.com") - .hostname("C8KV") - .accountNumber(accountNum) - .version(deviceVersion) - .coreCount(sizeInCores) - .termLength(termLength) - .licenseToken(licenseToken) - .additionalBandwidth(additionalBandwidth) - .sshKey(DeviceSshKeyArgs.builder() - .username(sshUserName) - .keyName(sshKeyName) - .build()) - .aclTemplateId(aclTemplateId) - .build()); - - ctx.export("routerId", c8KRouter.id()); - ctx.export("provisionStatus", c8KRouter.status()); - ctx.export("licenseStatus", c8KRouter.licenseStatus()); - ctx.export("sshIpAddress", c8KRouter.sshIpAddress()); - } -} diff --git a/examples/network/device/python/Pulumi.yaml b/examples/network/device/python/Pulumi.yaml deleted file mode 100644 index 5724766d..00000000 --- a/examples/network/device/python/Pulumi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: equinix-networkedge-device-cisco-C8KV -runtime: python -description: An Equinix Network Edge virtual network device - Cisco Catalyst 8000V Router -config: - accountName: - type: string - aclTemplateId: - type: string - additionalBandwidth: - type: integer - default: 5 - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - licenseToken: - type: string - metro: - type: string - default: SV - sizeInCores: - type: integer - default: 2 - sshKeyName: - type: string - sshUserName: - type: string - termLength: - type: integer - default: 6 diff --git a/examples/network/device/python/__main__.py b/examples/network/device/python/__main__.py deleted file mode 100644 index 9b469d88..00000000 --- a/examples/network/device/python/__main__.py +++ /dev/null @@ -1,53 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -account_name = config.require("accountName") -license_token = config.require("licenseToken") -ssh_user_name = config.require("sshUserName") -ssh_key_name = config.require("sshKeyName") -acl_template_id = config.require("aclTemplateId") -metro = config.get("metro") -if metro is None: - metro = "SV" -device_package_code = config.get("devicePackageCode") -if device_package_code is None: - device_package_code = "network-essentials" -device_version = config.get("deviceVersion") -if device_version is None: - device_version = "17.06.01a" -size_in_cores = config.get_int("sizeInCores") -if size_in_cores is None: - size_in_cores = 2 -term_length = config.get_int("termLength") -if term_length is None: - term_length = 6 -additional_bandwidth = config.get_int("additionalBandwidth") -if additional_bandwidth is None: - additional_bandwidth = 5 -account_num = equinix.networkedge.get_account(name=account_name, - metro_code=metro).number -c8_k_router = equinix.networkedge.Device("c8kRouter", - name="catalystRouter", - metro_code=metro, - type_code="C8000V", - self_managed=True, - byol=True, - package_code=device_package_code, - notifications=["example@equinix.com"], - hostname="C8KV", - account_number=account_num, - version=device_version, - core_count=size_in_cores, - term_length=term_length, - license_token=license_token, - additional_bandwidth=additional_bandwidth, - ssh_key=equinix.networkedge.DeviceSshKeyArgs( - username=ssh_user_name, - key_name=ssh_key_name, - ), - acl_template_id=acl_template_id) -pulumi.export("routerId", c8_k_router.id) -pulumi.export("provisionStatus", c8_k_router.status) -pulumi.export("licenseStatus", c8_k_router.license_status) -pulumi.export("sshIpAddress", c8_k_router.ssh_ip_address) diff --git a/examples/network/device/python/requirements.txt b/examples/network/device/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/network/device/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/network/device/typescript/Pulumi.yaml b/examples/network/device/typescript/Pulumi.yaml deleted file mode 100644 index 45c25000..00000000 --- a/examples/network/device/typescript/Pulumi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: equinix-networkedge-device-cisco-C8KV -runtime: nodejs -description: An Equinix Network Edge virtual network device - Cisco Catalyst 8000V Router -config: - accountName: - type: string - aclTemplateId: - type: string - additionalBandwidth: - type: integer - default: 5 - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - licenseToken: - type: string - metro: - type: string - default: SV - sizeInCores: - type: integer - default: 2 - sshKeyName: - type: string - sshUserName: - type: string - termLength: - type: integer - default: 6 diff --git a/examples/network/device/typescript/index.ts b/examples/network/device/typescript/index.ts deleted file mode 100644 index 27fa0d20..00000000 --- a/examples/network/device/typescript/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const accountName = config.require("accountName"); -const licenseToken = config.require("licenseToken"); -const sshUserName = config.require("sshUserName"); -const sshKeyName = config.require("sshKeyName"); -const aclTemplateId = config.require("aclTemplateId"); -const metro = config.get("metro") || "SV"; -const devicePackageCode = config.get("devicePackageCode") || "network-essentials"; -const deviceVersion = config.get("deviceVersion") || "17.06.01a"; -const sizeInCores = config.getNumber("sizeInCores") || 2; -const termLength = config.getNumber("termLength") || 6; -const additionalBandwidth = config.getNumber("additionalBandwidth") || 5; -const accountNum = equinix.networkedge.getAccount({ - name: accountName, - metroCode: metro, -}).then(invoke => invoke.number); -const c8KRouter = new equinix.networkedge.Device("c8kRouter", { - name: "catalystRouter", - metroCode: metro, - typeCode: "C8000V", - selfManaged: true, - byol: true, - packageCode: devicePackageCode, - notifications: ["example@equinix.com"], - hostname: "C8KV", - accountNumber: accountNum, - version: deviceVersion, - coreCount: sizeInCores, - termLength: termLength, - licenseToken: licenseToken, - additionalBandwidth: additionalBandwidth, - sshKey: { - username: sshUserName, - keyName: sshKeyName, - }, - aclTemplateId: aclTemplateId, -}); -export const routerId = c8KRouter.id; -export const provisionStatus = c8KRouter.status; -export const licenseStatus = c8KRouter.licenseStatus; -export const sshIpAddress = c8KRouter.sshIpAddress; diff --git a/examples/network/device/typescript/package.json b/examples/network/device/typescript/package.json deleted file mode 100644 index d74a1143..00000000 --- a/examples/network/device/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-networkedge-device-cisco-C8KV", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/network/device/typescript/tsconfig.json b/examples/network/device/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/network/device/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/network/device/yaml/Pulumi.yaml b/examples/network/device/yaml/Pulumi.yaml deleted file mode 100644 index da68fa64..00000000 --- a/examples/network/device/yaml/Pulumi.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: equinix-networkedge-device -runtime: yaml -description: An Equinix Network Edge virtual network device resource -config: - accountName: - type: string - licenseToken: - type: string - sshUserName: - type: string - sshKeyName: - type: string - aclTemplateId: - type: string - metro: - type: string - default: SV - devicePackageCode: - type: string - default: network-essentials - deviceVersion: - type: string - default: 17.06.01a - sizeInCores: - type: integer - default: 2 - termLength: - type: integer - default: 6 - additionalBandwidth: - type: integer - default: 5 -variables: - accountNum: - fn::invoke: - function: equinix:networkedge:getAccount - arguments: - name: ${accountName} - metroCode: ${metro} - return: number -resources: - c8kRouter: - type: equinix:networkedge:Device - properties: - name: catalystRouter - metroCode: ${metro} - typeCode: C8000V - selfManaged: true - byol: true - packageCode: ${devicePackageCode} - notifications: - - "example@equinix.com" - hostname: C8KV - accountNumber: ${accountNum} - version: ${deviceVersion} - coreCount: ${sizeInCores} - termLength: ${termLength} - licenseToken: ${licenseToken} - additionalBandwidth: ${additionalBandwidth} - sshKey: - username: ${sshUserName} - keyName: ${sshKeyName} - aclTemplateId: ${aclTemplateId} -outputs: - routerId: ${c8kRouter.id} - provisionStatus: ${c8kRouter.status} - licenseStatus: ${c8kRouter.licenseStatus} - sshIpAddress: ${c8kRouter.sshIpAddress} \ No newline at end of file diff --git a/examples/network/device_link/Pulumi.yaml b/examples/network/device_link/Pulumi.yaml new file mode 100644 index 00000000..e156d8bc --- /dev/null +++ b/examples/network/device_link/Pulumi.yaml @@ -0,0 +1,24 @@ +name: equinix-network-device_link +runtime: yaml +resources: + # Example of device link with HA device pair + # where each device is in different metro + test: + type: equinix:networkedge:DeviceLink + properties: + name: test-link + subnet: 192.168.40.64/27 + projectId: a86d7112-d740-4758-9c9c-31e66373746b + devices: + - id: ${testEquinixNetworkDevice.uuid} + asn: 22111 + interfaceId: 6 + - id: ${testEquinixNetworkDevice.secondaryDevice[0].uuid} + asn: 22333 + interfaceId: 7 + links: + - accountNumber: ${testEquinixNetworkDevice.accountNumber} + srcMetroCode: ${testEquinixNetworkDevice.metroCode} + dstMetroCode: ${testEquinixNetworkDevice.secondaryDevice[0].metroCode} + throughput: '50' + throughputUnit: Mbps diff --git a/examples/network/device_link/csharp/Program.cs b/examples/network/device_link/csharp/Program.cs index c4af2816..7b7b9c58 100644 --- a/examples/network/device_link/csharp/Program.cs +++ b/examples/network/device_link/csharp/Program.cs @@ -1,45 +1,26 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var accountName = config.Require("accountName"); - var accountMetro = config.Require("accountMetro"); - var device1Id = config.Require("device1Id"); - var device2Id = config.Require("device2Id"); - var accountfNum = Equinix.NetworkEdge.GetAccount.Invoke(new() - { - Name = accountName, - MetroCode = accountMetro, - }).Apply(invoke => invoke.Number); - - var device1Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - { - Uuid = device1Id, - }).Apply(invoke => invoke.MetroCode); - - var device2Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - { - Uuid = device2Id, - }).Apply(invoke => invoke.MetroCode); - - var deviceLink = new Equinix.NetworkEdge.DeviceLink("deviceLink", new() + var test = new Equinix.NetworkEdge.DeviceLink("test", new() { Name = "test-link", Subnet = "192.168.40.64/27", + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", Devices = new[] { new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs { - Id = "device1Id", + Id = testEquinixNetworkDevice.Uuid, Asn = 22111, InterfaceId = 6, }, new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs { - Id = "device2Id", + Id = testEquinixNetworkDevice.SecondaryDevice[0].Uuid, Asn = 22333, InterfaceId = 7, }, @@ -48,19 +29,14 @@ { new Equinix.NetworkEdge.Inputs.DeviceLinkLinkArgs { - AccountNumber = accountfNum, - SrcMetroCode = device1Metro, - DstMetroCode = device2Metro, + AccountNumber = testEquinixNetworkDevice.AccountNumber, + SrcMetroCode = testEquinixNetworkDevice.MetroCode, + DstMetroCode = testEquinixNetworkDevice.SecondaryDevice[0].MetroCode, Throughput = "50", ThroughputUnit = "Mbps", }, }, }); - return new Dictionary - { - ["status"] = deviceLink.Status, - ["devices"] = deviceLink.Devices, - }; }); diff --git a/examples/network/device_link/csharp/Pulumi.yaml b/examples/network/device_link/csharp/Pulumi.yaml index ebe81ecf..8849ff76 100644 --- a/examples/network/device_link/csharp/Pulumi.yaml +++ b/examples/network/device_link/csharp/Pulumi.yaml @@ -1,12 +1,2 @@ -name: equinix-networkedge-device-link +name: equinix-network-device_link runtime: dotnet -description: An Equinix Network Edge virtual network device link resource -config: - accountMetro: - type: string - accountName: - type: string - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/device_link/csharp/equinix-network-device_link.csproj b/examples/network/device_link/csharp/equinix-network-device_link.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/device_link/csharp/equinix-network-device_link.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/device_link/csharp/equinix-networkedge-device-link.csproj b/examples/network/device_link/csharp/equinix-networkedge-device-link.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/device_link/csharp/equinix-networkedge-device-link.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/device_link/example.md b/examples/network/device_link/example.md deleted file mode 100644 index a4ba5916..00000000 --- a/examples/network/device_link/example.md +++ /dev/null @@ -1,366 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const accountName = config.require("accountName"); -const accountMetro = config.require("accountMetro"); -const device1Id = config.require("device1Id"); -const device2Id = config.require("device2Id"); -const accountfNum = equinix.networkedge.getAccount({ - name: accountName, - metroCode: accountMetro, -}).then(invoke => invoke.number); -const device1Metro = equinix.networkedge.getDevice({ - uuid: device1Id, -}).then(invoke => invoke.metroCode); -const device2Metro = equinix.networkedge.getDevice({ - uuid: device2Id, -}).then(invoke => invoke.metroCode); -const deviceLink = new equinix.networkedge.DeviceLink("deviceLink", { - name: "test-link", - subnet: "192.168.40.64/27", - devices: [ - { - id: "device1Id", - asn: 22111, - interfaceId: 6, - }, - { - id: "device2Id", - asn: 22333, - interfaceId: 7, - }, - ], - links: [{ - accountNumber: accountfNum, - srcMetroCode: device1Metro, - dstMetroCode: device2Metro, - throughput: "50", - throughputUnit: "Mbps", - }], -}); -export const status = deviceLink.status; -export const devices = deviceLink.devices; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -account_name = config.require("accountName") -account_metro = config.require("accountMetro") -device1_id = config.require("device1Id") -device2_id = config.require("device2Id") -accountf_num = equinix.networkedge.get_account(name=account_name, - metro_code=account_metro).number -device1_metro = equinix.networkedge.get_device(uuid=device1_id).metro_code -device2_metro = equinix.networkedge.get_device(uuid=device2_id).metro_code -device_link = equinix.networkedge.DeviceLink("deviceLink", - name="test-link", - subnet="192.168.40.64/27", - devices=[ - equinix.networkedge.DeviceLinkDeviceArgs( - id="device1Id", - asn=22111, - interface_id=6, - ), - equinix.networkedge.DeviceLinkDeviceArgs( - id="device2Id", - asn=22333, - interface_id=7, - ), - ], - links=[equinix.networkedge.DeviceLinkLinkArgs( - account_number=accountf_num, - src_metro_code=device1_metro, - dst_metro_code=device2_metro, - throughput="50", - throughput_unit="Mbps", - )]) -pulumi.export("status", device_link.status) -pulumi.export("devices", device_link.devices) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - accountName := cfg.Require("accountName") - accountMetro := cfg.Require("accountMetro") - device1Id := cfg.Require("device1Id") - device2Id := cfg.Require("device2Id") - accountfNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ - Name: pulumi.StringRef(accountName), - MetroCode: accountMetro, - }, nil).Number - device1Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ - Uuid: pulumi.StringRef(device1Id), - }, nil).MetroCode - device2Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ - Uuid: pulumi.StringRef(device2Id), - }, nil).MetroCode - deviceLink, err := networkedge.NewDeviceLink(ctx, "deviceLink", &networkedge.DeviceLinkArgs{ - Name: pulumi.String("test-link"), - Subnet: pulumi.String("192.168.40.64/27"), - Devices: networkedge.DeviceLinkDeviceArray{ - &networkedge.DeviceLinkDeviceArgs{ - Id: pulumi.String("device1Id"), - Asn: pulumi.Int(22111), - InterfaceId: pulumi.Int(6), - }, - &networkedge.DeviceLinkDeviceArgs{ - Id: pulumi.String("device2Id"), - Asn: pulumi.Int(22333), - InterfaceId: pulumi.Int(7), - }, - }, - Links: networkedge.DeviceLinkLinkArray{ - &networkedge.DeviceLinkLinkArgs{ - AccountNumber: *pulumi.String(accountfNum), - SrcMetroCode: *pulumi.String(device1Metro), - DstMetroCode: *pulumi.String(device2Metro), - Throughput: pulumi.String("50"), - ThroughputUnit: pulumi.String("Mbps"), - }, - }, - }) - if err != nil { - return err - } - ctx.Export("status", deviceLink.Status) - ctx.Export("devices", deviceLink.Devices) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var accountName = config.Require("accountName"); - var accountMetro = config.Require("accountMetro"); - var device1Id = config.Require("device1Id"); - var device2Id = config.Require("device2Id"); - var accountfNum = Equinix.NetworkEdge.GetAccount.Invoke(new() - { - Name = accountName, - MetroCode = accountMetro, - }).Apply(invoke => invoke.Number); - - var device1Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - { - Uuid = device1Id, - }).Apply(invoke => invoke.MetroCode); - - var device2Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - { - Uuid = device2Id, - }).Apply(invoke => invoke.MetroCode); - - var deviceLink = new Equinix.NetworkEdge.DeviceLink("deviceLink", new() - { - Name = "test-link", - Subnet = "192.168.40.64/27", - Devices = new[] - { - new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs - { - Id = "device1Id", - Asn = 22111, - InterfaceId = 6, - }, - new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs - { - Id = "device2Id", - Asn = 22333, - InterfaceId = 7, - }, - }, - Links = new[] - { - new Equinix.NetworkEdge.Inputs.DeviceLinkLinkArgs - { - AccountNumber = accountfNum, - SrcMetroCode = device1Metro, - DstMetroCode = device2Metro, - Throughput = "50", - ThroughputUnit = "Mbps", - }, - }, - }); - - return new Dictionary - { - ["status"] = deviceLink.Status, - ["devices"] = deviceLink.Devices, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.DeviceLink; -import com.equinix.pulumi.networkedge.DeviceLinkArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceLinkDeviceArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceLinkLinkArgs; -import com.equinix.pulumi.networkedge.inputs.GetAccountArgs; -import com.equinix.pulumi.networkedge.inputs.GetDeviceArgs; -import com.equinix.pulumi.networkedge.NetworkedgeFunctions; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var accountName = config.get("accountName").get(); - final var accountMetro = config.get("accountMetro").get(); - final var device1Id = config.get("device1Id").get(); - final var device2Id = config.get("device2Id").get(); - final var accountfNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() - .name(accountName) - .metroCode(accountMetro) - .build()).applyValue(account -> account.number()); - - final var device1Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder() - .uuid(device1Id) - .build()).applyValue(device -> device.metroCode()); - - final var device2Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder() - .uuid(device2Id) - .build()).applyValue(device -> device.metroCode()); - - var deviceLink = new DeviceLink("deviceLink", DeviceLinkArgs.builder() - .name("test-link") - .subnet("192.168.40.64/27") - .devices( - DeviceLinkDeviceArgs.builder() - .id("device1Id") - .asn(22111) - .interfaceId(6) - .build(), - DeviceLinkDeviceArgs.builder() - .id("device2Id") - .asn(22333) - .interfaceId(7) - .build()) - .links(DeviceLinkLinkArgs.builder() - .accountNumber(accountfNum) - .srcMetroCode(device1Metro) - .dstMetroCode(device2Metro) - .throughput("50") - .throughputUnit("Mbps") - .build()) - .build()); - - ctx.export("status", deviceLink.status()); - ctx.export("devices", deviceLink.devices()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - accountName: - type: string - accountMetro: - type: string - device1Id: - type: string - device2Id: - type: string -variables: - accountfNum: - fn::invoke: - function: equinix:networkedge:getAccount - arguments: - name: ${accountName} - metroCode: ${accountMetro} - return: number - device1Metro: - fn::invoke: - function: equinix:networkedge:getDevice - arguments: - uuid: ${device1Id} - return: metroCode - device2Metro: - fn::invoke: - function: equinix:networkedge:getDevice - arguments: - uuid: ${device2Id} - return: metroCode -resources: - deviceLink: - type: equinix:networkedge:DeviceLink - properties: - name: test-link - subnet: 192.168.40.64/27 - devices: - - id: device1Id - asn: 22111 - interfaceId: 6 - - id: device2Id - asn: 22333 - interfaceId: 7 - links: - - accountNumber: ${accountfNum} - srcMetroCode: ${device1Metro} - dstMetroCode: ${device2Metro} - throughput: 50 - throughputUnit: Mbps -outputs: - status: ${deviceLink.status} - devices: ${deviceLink.devices} -``` - -{{% /choosable %}} diff --git a/examples/network/device_link/go/Pulumi.yaml b/examples/network/device_link/go/Pulumi.yaml index 508ac7bf..f8901f04 100644 --- a/examples/network/device_link/go/Pulumi.yaml +++ b/examples/network/device_link/go/Pulumi.yaml @@ -1,12 +1,2 @@ -name: equinix-networkedge-device-link +name: equinix-network-device_link runtime: go -description: An Equinix Network Edge virtual network device link resource -config: - accountMetro: - type: string - accountName: - type: string - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/device_link/go/go.mod b/examples/network/device_link/go/go.mod index 0c28c8c2..e69b38e3 100644 --- a/examples/network/device_link/go/go.mod +++ b/examples/network/device_link/go/go.mod @@ -1,59 +1,94 @@ -module equinix-networkedge-device-link +module equinix-network-device_link -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/network/device_link/go/main.go b/examples/network/device_link/go/main.go index 122400e8..67860f71 100644 --- a/examples/network/device_link/go/main.go +++ b/examples/network/device_link/go/main.go @@ -3,46 +3,31 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - accountName := cfg.Require("accountName") - accountMetro := cfg.Require("accountMetro") - device1Id := cfg.Require("device1Id") - device2Id := cfg.Require("device2Id") - accountfNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ - Name: pulumi.StringRef(accountName), - MetroCode: accountMetro, - }, nil).Number - device1Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ - Uuid: pulumi.StringRef(device1Id), - }, nil).MetroCode - device2Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ - Uuid: pulumi.StringRef(device2Id), - }, nil).MetroCode - deviceLink, err := networkedge.NewDeviceLink(ctx, "deviceLink", &networkedge.DeviceLinkArgs{ - Name: pulumi.String("test-link"), - Subnet: pulumi.String("192.168.40.64/27"), + _, err := networkedge.NewDeviceLink(ctx, "test", &networkedge.DeviceLinkArgs{ + Name: pulumi.String("test-link"), + Subnet: pulumi.String("192.168.40.64/27"), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), Devices: networkedge.DeviceLinkDeviceArray{ &networkedge.DeviceLinkDeviceArgs{ - Id: pulumi.String("device1Id"), + Id: pulumi.Any(testEquinixNetworkDevice.Uuid), Asn: pulumi.Int(22111), InterfaceId: pulumi.Int(6), }, &networkedge.DeviceLinkDeviceArgs{ - Id: pulumi.String("device2Id"), + Id: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].Uuid), Asn: pulumi.Int(22333), InterfaceId: pulumi.Int(7), }, }, Links: networkedge.DeviceLinkLinkArray{ &networkedge.DeviceLinkLinkArgs{ - AccountNumber: *pulumi.String(accountfNum), - SrcMetroCode: *pulumi.String(device1Metro), - DstMetroCode: *pulumi.String(device2Metro), + AccountNumber: pulumi.Any(testEquinixNetworkDevice.AccountNumber), + SrcMetroCode: pulumi.Any(testEquinixNetworkDevice.MetroCode), + DstMetroCode: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].MetroCode), Throughput: pulumi.String("50"), ThroughputUnit: pulumi.String("Mbps"), }, @@ -51,8 +36,6 @@ func main() { if err != nil { return err } - ctx.Export("status", deviceLink.Status) - ctx.Export("devices", deviceLink.Devices) return nil }) } diff --git a/examples/network/device_link/java/.gitignore b/examples/network/device_link/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/network/device_link/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/network/device_link/java/Pulumi.yaml b/examples/network/device_link/java/Pulumi.yaml index 2f971da0..4c1f32d8 100644 --- a/examples/network/device_link/java/Pulumi.yaml +++ b/examples/network/device_link/java/Pulumi.yaml @@ -1,12 +1,2 @@ -name: equinix-networkedge-device-link +name: equinix-network-device_link runtime: java -description: An Equinix Network Edge virtual network device link resource -config: - accountMetro: - type: string - accountName: - type: string - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/device_link/java/pom.xml b/examples/network/device_link/java/pom.xml index af423c0d..c1e3cf7c 100644 --- a/examples/network/device_link/java/pom.xml +++ b/examples/network/device_link/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-networkedge-device-link + equinix-network-device_link 1.0-SNAPSHOT @@ -26,7 +26,7 @@ com.pulumi equinix - [0.1.0,) + (,1.0) diff --git a/examples/network/device_link/java/src/main/java/generated_program/App.java b/examples/network/device_link/java/src/main/java/generated_program/App.java index 831ecde1..dfc12fe4 100644 --- a/examples/network/device_link/java/src/main/java/generated_program/App.java +++ b/examples/network/device_link/java/src/main/java/generated_program/App.java @@ -3,13 +3,10 @@ import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.DeviceLink; -import com.equinix.pulumi.networkedge.DeviceLinkArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceLinkDeviceArgs; -import com.equinix.pulumi.networkedge.inputs.DeviceLinkLinkArgs; -import com.equinix.pulumi.networkedge.inputs.GetAccountArgs; -import com.equinix.pulumi.networkedge.inputs.GetDeviceArgs; -import com.equinix.pulumi.networkedge.NetworkedgeFunctions; +import com.pulumi.equinix.networkedge.DeviceLink; +import com.pulumi.equinix.networkedge.DeviceLinkArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceLinkDeviceArgs; +import com.pulumi.equinix.networkedge.inputs.DeviceLinkLinkArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -23,48 +20,29 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var accountName = config.get("accountName").get(); - final var accountMetro = config.get("accountMetro").get(); - final var device1Id = config.get("device1Id").get(); - final var device2Id = config.get("device2Id").get(); - final var accountfNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder() - .name(accountName) - .metroCode(accountMetro) - .build()).applyValue(account -> account.number()); - - final var device1Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder() - .uuid(device1Id) - .build()).applyValue(device -> device.metroCode()); - - final var device2Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder() - .uuid(device2Id) - .build()).applyValue(device -> device.metroCode()); - - var deviceLink = new DeviceLink("deviceLink", DeviceLinkArgs.builder() + var test = new DeviceLink("test", DeviceLinkArgs.builder() .name("test-link") .subnet("192.168.40.64/27") + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") .devices( DeviceLinkDeviceArgs.builder() - .id("device1Id") + .id(testEquinixNetworkDevice.uuid()) .asn(22111) .interfaceId(6) .build(), DeviceLinkDeviceArgs.builder() - .id("device2Id") + .id(testEquinixNetworkDevice.secondaryDevice()[0].uuid()) .asn(22333) .interfaceId(7) .build()) .links(DeviceLinkLinkArgs.builder() - .accountNumber(accountfNum) - .srcMetroCode(device1Metro) - .dstMetroCode(device2Metro) + .accountNumber(testEquinixNetworkDevice.accountNumber()) + .srcMetroCode(testEquinixNetworkDevice.metroCode()) + .dstMetroCode(testEquinixNetworkDevice.secondaryDevice()[0].metroCode()) .throughput("50") .throughputUnit("Mbps") .build()) .build()); - ctx.export("status", deviceLink.status()); - ctx.export("devices", deviceLink.devices()); } } diff --git a/examples/network/device_link/python/Pulumi.yaml b/examples/network/device_link/python/Pulumi.yaml index e318bb21..6a6618c1 100644 --- a/examples/network/device_link/python/Pulumi.yaml +++ b/examples/network/device_link/python/Pulumi.yaml @@ -1,12 +1,2 @@ -name: equinix-networkedge-device-link +name: equinix-network-device_link runtime: python -description: An Equinix Network Edge virtual network device link resource -config: - accountMetro: - type: string - accountName: - type: string - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/device_link/python/__main__.py b/examples/network/device_link/python/__main__.py index a631d95f..2a76e354 100644 --- a/examples/network/device_link/python/__main__.py +++ b/examples/network/device_link/python/__main__.py @@ -1,36 +1,26 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -account_name = config.require("accountName") -account_metro = config.require("accountMetro") -device1_id = config.require("device1Id") -device2_id = config.require("device2Id") -accountf_num = equinix.networkedge.get_account(name=account_name, - metro_code=account_metro).number -device1_metro = equinix.networkedge.get_device(uuid=device1_id).metro_code -device2_metro = equinix.networkedge.get_device(uuid=device2_id).metro_code -device_link = equinix.networkedge.DeviceLink("deviceLink", +test = equinix.networkedge.DeviceLink("test", name="test-link", subnet="192.168.40.64/27", + project_id="a86d7112-d740-4758-9c9c-31e66373746b", devices=[ equinix.networkedge.DeviceLinkDeviceArgs( - id="device1Id", + id=test_equinix_network_device["uuid"], asn=22111, interface_id=6, ), equinix.networkedge.DeviceLinkDeviceArgs( - id="device2Id", + id=test_equinix_network_device["secondaryDevice"][0]["uuid"], asn=22333, interface_id=7, ), ], links=[equinix.networkedge.DeviceLinkLinkArgs( - account_number=accountf_num, - src_metro_code=device1_metro, - dst_metro_code=device2_metro, + account_number=test_equinix_network_device["accountNumber"], + src_metro_code=test_equinix_network_device["metroCode"], + dst_metro_code=test_equinix_network_device["secondaryDevice"][0]["metroCode"], throughput="50", throughput_unit="Mbps", )]) -pulumi.export("status", device_link.status) -pulumi.export("devices", device_link.devices) diff --git a/examples/network/device_link/python/requirements.txt b/examples/network/device_link/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/network/device_link/python/requirements.txt +++ b/examples/network/device_link/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/device_link/typescript/Pulumi.yaml b/examples/network/device_link/typescript/Pulumi.yaml index ad2bff04..2d8f0265 100644 --- a/examples/network/device_link/typescript/Pulumi.yaml +++ b/examples/network/device_link/typescript/Pulumi.yaml @@ -1,12 +1,2 @@ -name: equinix-networkedge-device-link +name: equinix-network-device_link runtime: nodejs -description: An Equinix Network Edge virtual network device link resource -config: - accountMetro: - type: string - accountName: - type: string - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/device_link/typescript/index.ts b/examples/network/device_link/typescript/index.ts index de4ceaf8..f3529f53 100644 --- a/examples/network/device_link/typescript/index.ts +++ b/examples/network/device_link/typescript/index.ts @@ -1,43 +1,27 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const accountName = config.require("accountName"); -const accountMetro = config.require("accountMetro"); -const device1Id = config.require("device1Id"); -const device2Id = config.require("device2Id"); -const accountfNum = equinix.networkedge.getAccount({ - name: accountName, - metroCode: accountMetro, -}).then(invoke => invoke.number); -const device1Metro = equinix.networkedge.getDevice({ - uuid: device1Id, -}).then(invoke => invoke.metroCode); -const device2Metro = equinix.networkedge.getDevice({ - uuid: device2Id, -}).then(invoke => invoke.metroCode); -const deviceLink = new equinix.networkedge.DeviceLink("deviceLink", { +const test = new equinix.networkedge.DeviceLink("test", { name: "test-link", subnet: "192.168.40.64/27", + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", devices: [ { - id: "device1Id", + id: testEquinixNetworkDevice.uuid, asn: 22111, interfaceId: 6, }, { - id: "device2Id", + id: testEquinixNetworkDevice.secondaryDevice[0].uuid, asn: 22333, interfaceId: 7, }, ], links: [{ - accountNumber: accountfNum, - srcMetroCode: device1Metro, - dstMetroCode: device2Metro, + accountNumber: testEquinixNetworkDevice.accountNumber, + srcMetroCode: testEquinixNetworkDevice.metroCode, + dstMetroCode: testEquinixNetworkDevice.secondaryDevice[0].metroCode, throughput: "50", throughputUnit: "Mbps", }], }); -export const status = deviceLink.status; -export const devices = deviceLink.devices; diff --git a/examples/network/device_link/typescript/package.json b/examples/network/device_link/typescript/package.json index fc0b230a..791407a1 100644 --- a/examples/network/device_link/typescript/package.json +++ b/examples/network/device_link/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-networkedge-device-link", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-network-device_link", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/network/device_link/typescript/tsconfig.json b/examples/network/device_link/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/network/device_link/typescript/tsconfig.json +++ b/examples/network/device_link/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/network/device_link/yaml/Pulumi.yaml b/examples/network/device_link/yaml/Pulumi.yaml deleted file mode 100644 index 4efbf13e..00000000 --- a/examples/network/device_link/yaml/Pulumi.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: equinix-networkedge-device-link -runtime: yaml -description: An Equinix Network Edge virtual network device link resource -config: - accountName: - type: string - accountMetro: - type: string - device1Id: - type: string - device2Id: - type: string -variables: - accountfNum: - fn::invoke: - function: equinix:networkedge:getAccount - arguments: - name: ${accountName} - metroCode: ${accountMetro} - return: number - device1Metro: - fn::invoke: - function: equinix:networkedge:getDevice - arguments: - uuid: ${device1Id} - return: metroCode - device2Metro: - fn::invoke: - function: equinix:networkedge:getDevice - arguments: - uuid: ${device2Id} - return: metroCode -resources: - deviceLink: - type: equinix:networkedge:DeviceLink - properties: - name: test-link - subnet: 192.168.40.64/27 - devices: - - id: device1Id - asn: 22111 - interfaceId: 6 - - id: device2Id - asn: 22333 - interfaceId: 7 - links: - - accountNumber: ${accountfNum} - srcMetroCode: ${device1Metro} - dstMetroCode: ${device2Metro} - throughput: "50" - throughputUnit: Mbps -outputs: - status: ${deviceLink.status} - devices: ${deviceLink.devices} diff --git a/examples/network/file/Pulumi.yaml b/examples/network/file/Pulumi.yaml new file mode 100644 index 00000000..43ae0f3e --- /dev/null +++ b/examples/network/file/Pulumi.yaml @@ -0,0 +1,22 @@ +name: equinix-network-file +runtime: yaml +configuration: + filepath: + type: string + default: fileFolder/fileName.txt +resources: + test-file: + type: equinix:networkedge:NetworkFile + properties: + fileName: fileName.txt + content: + fn::invoke: + Function: std:file + Arguments: + input: ${filepath} + Return: result + metroCode: SV + deviceTypeCode: AVIATRIX_EDGE + processType: CLOUD_INIT + selfManaged: true + byol: true diff --git a/examples/network/file/csharp/.gitignore b/examples/network/file/csharp/.gitignore new file mode 100644 index 00000000..e6452706 --- /dev/null +++ b/examples/network/file/csharp/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/examples/network/file/csharp/Program.cs b/examples/network/file/csharp/Program.cs new file mode 100644 index 00000000..d6ddf180 --- /dev/null +++ b/examples/network/file/csharp/Program.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Equinix = Pulumi.Equinix; +using Std = Pulumi.Std; + +return await Deployment.RunAsync(() => +{ + var config = new Config(); + var filepath = config.Get("filepath") ?? "fileFolder/fileName.txt"; + var testFile = new Equinix.NetworkEdge.NetworkFile("test-file", new() + { + FileName = "fileName.txt", + Content = Std.File.Invoke(new() + { + Input = filepath, + }).Apply(invoke => invoke.Result), + MetroCode = Equinix.Metro.SiliconValley, + DeviceTypeCode = "AVIATRIX_EDGE", + ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + SelfManaged = true, + Byol = true, + }); + +}); + diff --git a/examples/network/file/csharp/Pulumi.yaml b/examples/network/file/csharp/Pulumi.yaml new file mode 100644 index 00000000..a88083ac --- /dev/null +++ b/examples/network/file/csharp/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-file +runtime: dotnet diff --git a/examples/network/file/csharp/equinix-network-file.csproj b/examples/network/file/csharp/equinix-network-file.csproj new file mode 100644 index 00000000..ef1958d7 --- /dev/null +++ b/examples/network/file/csharp/equinix-network-file.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + + + + + + + + \ No newline at end of file diff --git a/examples/network/file/go/Pulumi.yaml b/examples/network/file/go/Pulumi.yaml new file mode 100644 index 00000000..0aca86d5 --- /dev/null +++ b/examples/network/file/go/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-file +runtime: go diff --git a/examples/network/file/go/go.mod b/examples/network/file/go/go.mod new file mode 100644 index 00000000..7c3616b9 --- /dev/null +++ b/examples/network/file/go/go.mod @@ -0,0 +1,96 @@ +module equinix-network-file + +go 1.21 + +toolchain go1.22.4 + +require ( + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi-std/sdk v1.7.2 + github.com/pulumi/pulumi/sdk/v3 v3.121.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/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 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.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // 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 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-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/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/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/cast v1.5.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // 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.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect +) diff --git a/examples/network/file/go/main.go b/examples/network/file/go/main.go new file mode 100644 index 00000000..c5e13e00 --- /dev/null +++ b/examples/network/file/go/main.go @@ -0,0 +1,38 @@ +package main + +import ( + "github.com/equinix/pulumi-equinix/sdk/go/equinix" + "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" + "github.com/pulumi/pulumi-std/sdk/go/std" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + cfg := config.New(ctx, "") + filepath := "fileFolder/fileName.txt" + if param := cfg.Get("filepath"); param != "" { + filepath = param + } + invokeFile, err := std.File(ctx, &std.FileArgs{ + Input: filepath, + }, nil) + if err != nil { + return err + } + _, err = networkedge.NewNetworkFile(ctx, "test-file", &networkedge.NetworkFileArgs{ + FileName: pulumi.String("fileName.txt"), + Content: invokeFile.Result, + MetroCode: pulumi.String(equinix.MetroSiliconValley), + DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), + ProcessType: pulumi.String(networkedge.FileTypeCloudInit), + SelfManaged: pulumi.Bool(true), + Byol: pulumi.Bool(true), + }) + if err != nil { + return err + } + return nil + }) +} diff --git a/examples/network/file/java/Pulumi.yaml b/examples/network/file/java/Pulumi.yaml new file mode 100644 index 00000000..4050dae3 --- /dev/null +++ b/examples/network/file/java/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-file +runtime: java diff --git a/examples/network/file/java/pom.xml b/examples/network/file/java/pom.xml new file mode 100644 index 00000000..2a0e3242 --- /dev/null +++ b/examples/network/file/java/pom.xml @@ -0,0 +1,96 @@ + + + 4.0.0 + + com.pulumi + equinix-network-file + 1.0-SNAPSHOT + + + UTF-8 + 11 + 11 + 11 + generated_program.App + + + + + + com.pulumi + pulumi + (,1.0] + + + com.pulumi + equinix + (,1.0) + + com.pulumi + std + 1.7.2 + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + true + ${mainClass} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + + true + ${mainClass} + + + + jar-with-dependencies + + + + + make-my-jar-with-dependencies + package + + single + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + ${mainClass} + ${mainArgs} + + + + org.apache.maven.plugins + maven-wrapper-plugin + 3.1.1 + + 3.8.5 + + + + + \ No newline at end of file diff --git a/examples/network/file/java/src/main/java/generated_program/App.java b/examples/network/file/java/src/main/java/generated_program/App.java new file mode 100644 index 00000000..52071d55 --- /dev/null +++ b/examples/network/file/java/src/main/java/generated_program/App.java @@ -0,0 +1,36 @@ +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.equinix.networkedge.NetworkFile; +import com.pulumi.equinix.networkedge.NetworkFileArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var config = ctx.config(); + final var filepath = config.get("filepath").orElse("fileFolder/fileName.txt"); + var testFile = new NetworkFile("testFile", NetworkFileArgs.builder() + .fileName("fileName.txt") + .content(StdFunctions.file(FileArgs.builder() + .input(filepath) + .build()).result()) + .metroCode("SV") + .deviceTypeCode("AVIATRIX_EDGE") + .processType("CLOUD_INIT") + .selfManaged(true) + .byol(true) + .build()); + + } +} diff --git a/examples/network/file/python/.gitignore b/examples/network/file/python/.gitignore new file mode 100644 index 00000000..b664ab4e --- /dev/null +++ b/examples/network/file/python/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv/ \ No newline at end of file diff --git a/examples/network/file/python/Pulumi.yaml b/examples/network/file/python/Pulumi.yaml new file mode 100644 index 00000000..e76cb5a2 --- /dev/null +++ b/examples/network/file/python/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-file +runtime: python diff --git a/examples/network/file/python/__main__.py b/examples/network/file/python/__main__.py new file mode 100644 index 00000000..ef4b24d7 --- /dev/null +++ b/examples/network/file/python/__main__.py @@ -0,0 +1,16 @@ +import pulumi +import pulumi_equinix as equinix +import pulumi_std as std + +config = pulumi.Config() +filepath = config.get("filepath") +if filepath is None: + filepath = "fileFolder/fileName.txt" +test_file = equinix.networkedge.NetworkFile("test-file", + file_name="fileName.txt", + content=std.file_output(input=filepath).apply(lambda invoke: invoke.result), + metro_code=equinix.Metro.SILICON_VALLEY, + device_type_code="AVIATRIX_EDGE", + process_type=equinix.networkedge.FileType.CLOUD_INIT, + self_managed=True, + byol=True) diff --git a/examples/network/file/python/requirements.txt b/examples/network/file/python/requirements.txt new file mode 100644 index 00000000..da9f8ddc --- /dev/null +++ b/examples/network/file/python/requirements.txt @@ -0,0 +1,3 @@ +pulumi-std==1.7.2 +pulumi>=3.0.0,<4.0.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/file/typescript/.gitignore b/examples/network/file/typescript/.gitignore new file mode 100644 index 00000000..dc902b57 --- /dev/null +++ b/examples/network/file/typescript/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ \ No newline at end of file diff --git a/examples/network/file/typescript/Pulumi.yaml b/examples/network/file/typescript/Pulumi.yaml new file mode 100644 index 00000000..a4daa5ec --- /dev/null +++ b/examples/network/file/typescript/Pulumi.yaml @@ -0,0 +1,2 @@ +name: equinix-network-file +runtime: nodejs diff --git a/examples/network/file/typescript/index.ts b/examples/network/file/typescript/index.ts new file mode 100644 index 00000000..966683f2 --- /dev/null +++ b/examples/network/file/typescript/index.ts @@ -0,0 +1,17 @@ +import * as pulumi from "@pulumi/pulumi"; +import * as equinix from "@equinix-labs/pulumi-equinix"; +import * as std from "@pulumi/std"; + +const config = new pulumi.Config(); +const filepath = config.get("filepath") || "fileFolder/fileName.txt"; +const testFile = new equinix.networkedge.NetworkFile("test-file", { + fileName: "fileName.txt", + content: std.fileOutput({ + input: filepath, + }).apply(invoke => invoke.result), + metroCode: equinix.index.Metro.SiliconValley, + deviceTypeCode: "AVIATRIX_EDGE", + processType: equinix.networkedge.FileType.CloudInit, + selfManaged: true, + byol: true, +}); diff --git a/examples/network/file/typescript/package.json b/examples/network/file/typescript/package.json new file mode 100644 index 00000000..f7503340 --- /dev/null +++ b/examples/network/file/typescript/package.json @@ -0,0 +1,12 @@ +{ + "name": "equinix-network-file", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0", + "@pulumi/std": "1.7.2" + } +} \ No newline at end of file diff --git a/examples/network/file/typescript/tsconfig.json b/examples/network/file/typescript/tsconfig.json new file mode 100644 index 00000000..11fc69af --- /dev/null +++ b/examples/network/file/typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] +} \ No newline at end of file diff --git a/examples/network/network_file/assets/aviatrix-cloud-init.txt b/examples/network/network_file/assets/aviatrix-cloud-init.txt deleted file mode 100644 index c7bff4a2..00000000 --- a/examples/network/network_file/assets/aviatrix-cloud-init.txt +++ /dev/null @@ -1,6 +0,0 @@ -#cloud-config-example - -// THIS IS AN EXAMPLE FILE. YOU MAY NEED TO FOLLOW INSTRUCTIONS -// TO GENERATE A VALID CLOUDINIT ZTP FILE FOR AVIATRIX DEVICES -// https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/Aviatrix/NE-create-Aviatrix-Edge.htm?Highlight=Aviatrix -// https://docs.aviatrix.com/documentation/latest/deploying-secure-networks/edge-equinix-workflow.html diff --git a/examples/network/network_file/csharp/Program.cs b/examples/network/network_file/csharp/Program.cs deleted file mode 100644 index 1cda54be..00000000 --- a/examples/network/network_file/csharp/Program.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var metro = config.Get("metro") ?? "SV"; - var networkFile = new Equinix.NetworkEdge.NetworkFile("networkFile", new() - { - FileName = "Aviatrix-ZTP-file", - Content = File.ReadAllText("./../assets/aviatrix-cloud-init.txt"), - MetroCode = metro, - DeviceTypeCode = "AVIATRIX_EDGE", - ProcessType = "CLOUD_INIT", - SelfManaged = true, - Byol = true, - }); - - return new Dictionary - { - ["networkFileId"] = networkFile.Id, - ["networkFileStatus"] = networkFile.Status, - }; -}); - diff --git a/examples/network/network_file/csharp/Pulumi.yaml b/examples/network/network_file/csharp/Pulumi.yaml deleted file mode 100644 index 69076064..00000000 --- a/examples/network/network_file/csharp/Pulumi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: equinix-networkedge-file -runtime: dotnet -description: An Equinix Network Edge File (LICENSE or CLOUD_INIT) resource -config: - metro: - type: string - default: SV diff --git a/examples/network/network_file/csharp/equinix-networkedge-file.csproj b/examples/network/network_file/csharp/equinix-networkedge-file.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/network_file/csharp/equinix-networkedge-file.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/network_file/example.md b/examples/network/network_file/example.md deleted file mode 100644 index 543b9ac2..00000000 --- a/examples/network/network_file/example.md +++ /dev/null @@ -1,209 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; - -const config = new pulumi.Config(); -const metro = config.get("metro") || "SV"; -const networkFile = new equinix.networkedge.NetworkFile("networkFile", { - fileName: "Aviatrix-ZTP-file", - content: fs.readFileSync("./../assets/aviatrix-cloud-init.txt"), - metroCode: metro, - deviceTypeCode: "AVIATRIX_EDGE", - processType: "CLOUD_INIT", - selfManaged: true, - byol: true, -}); -export const networkFileId = networkFile.id; -export const networkFileStatus = networkFile.status; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "SV" -network_file = equinix.networkedge.NetworkFile("networkFile", - file_name="Aviatrix-ZTP-file", - content=(lambda path: open(path).read())("./../assets/aviatrix-cloud-init.txt"), - metro_code=metro, - device_type_code="AVIATRIX_EDGE", - process_type="CLOUD_INIT", - self_managed=True, - byol=True) -pulumi.export("networkFileId", network_file.id) -pulumi.export("networkFileStatus", network_file.status) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "os" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param - } - networkFile, err := networkedge.NewNetworkFile(ctx, "networkFile", &networkedge.NetworkFileArgs{ - FileName: pulumi.String("Aviatrix-ZTP-file"), - Content: readFileOrPanic("./../assets/aviatrix-cloud-init.txt"), - MetroCode: pulumi.String(metro), - DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), - ProcessType: pulumi.String("CLOUD_INIT"), - SelfManaged: pulumi.Bool(true), - Byol: pulumi.Bool(true), - }) - if err != nil { - return err - } - ctx.Export("networkFileId", networkFile.ID()) - ctx.Export("networkFileStatus", networkFile.Status) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using System.IO; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var metro = config.Get("metro") ?? "SV"; - var networkFile = new Equinix.NetworkEdge.NetworkFile("networkFile", new() - { - FileName = "Aviatrix-ZTP-file", - Content = File.ReadAllText("./../assets/aviatrix-cloud-init.txt"), - MetroCode = metro, - DeviceTypeCode = "AVIATRIX_EDGE", - ProcessType = "CLOUD_INIT", - SelfManaged = true, - Byol = true, - }); - - return new Dictionary - { - ["networkFileId"] = networkFile.Id, - ["networkFileStatus"] = networkFile.Status, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.NetworkFile; -import com.equinix.pulumi.networkedge.NetworkFileArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.IOException; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("SV"); - - String content = null; - try { - content = Files.readString(Paths.get("./../assets/aviatrix-cloud-init.txt")); - } catch (IOException e) { - e.printStackTrace(); - } - - var networkFile = new NetworkFile("networkFile", NetworkFileArgs.builder() - .fileName("Aviatrix-ZTP-file") - .content(content) - .metroCode(metro) - .deviceTypeCode("AVIATRIX_EDGE") - .processType("CLOUD_INIT") - .selfManaged(true) - .byol(true) - .build()); - - ctx.export("networkFileId", networkFile.id()); - ctx.export("networkFileStatus", networkFile.status()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - metro: - type: string - default: SV -resources: - networkFile: - type: equinix:networkedge:NetworkFile - properties: - fileName: Aviatrix-ZTP-file - content: - fn::readFile: ./../assets/aviatrix-cloud-init.txt - metroCode: ${metro} - deviceTypeCode: AVIATRIX_EDGE - processType: CLOUD_INIT - selfManaged: true - byol: true -outputs: - networkFileId: ${networkFile.id} - networkFileStatus: ${networkFile.status} -``` - -{{% /choosable %}} diff --git a/examples/network/network_file/go/Pulumi.yaml b/examples/network/network_file/go/Pulumi.yaml deleted file mode 100644 index d454deac..00000000 --- a/examples/network/network_file/go/Pulumi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: equinix-networkedge-file -runtime: go -description: An Equinix Network Edge File (LICENSE or CLOUD_INIT) resource -config: - metro: - type: string - default: SV diff --git a/examples/network/network_file/go/go.mod b/examples/network/network_file/go/go.mod deleted file mode 100644 index f4629aca..00000000 --- a/examples/network/network_file/go/go.mod +++ /dev/null @@ -1,59 +0,0 @@ -module equinix-networkedge-file - -go 1.17 - -require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 -) - -require ( - 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/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/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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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/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/cast v1.3.1 // indirect - github.com/spf13/cobra v1.4.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 - 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 -) diff --git a/examples/network/network_file/go/main.go b/examples/network/network_file/go/main.go deleted file mode 100644 index 5d8f78b8..00000000 --- a/examples/network/network_file/go/main.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "os" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - metro := "SV" - if param := cfg.Get("metro"); param != "" { - metro = param - } - networkFile, err := networkedge.NewNetworkFile(ctx, "networkFile", &networkedge.NetworkFileArgs{ - FileName: pulumi.String("Aviatrix-ZTP-file"), - Content: readFileOrPanic("./../assets/aviatrix-cloud-init.txt"), - MetroCode: pulumi.String(metro), - DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), - ProcessType: pulumi.String("CLOUD_INIT"), - SelfManaged: pulumi.Bool(true), - Byol: pulumi.Bool(true), - }) - if err != nil { - return err - } - ctx.Export("networkFileId", networkFile.ID()) - ctx.Export("networkFileStatus", networkFile.Status) - return nil - }) -} diff --git a/examples/network/network_file/java/.gitignore b/examples/network/network_file/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/network/network_file/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/network/network_file/java/Pulumi.yaml b/examples/network/network_file/java/Pulumi.yaml deleted file mode 100644 index 5381cad9..00000000 --- a/examples/network/network_file/java/Pulumi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: equinix-networkedge-file -runtime: java -description: An Equinix Network Edge File (LICENSE or CLOUD_INIT) resource -config: - metro: - type: string - default: SV diff --git a/examples/network/network_file/java/pom.xml b/examples/network/network_file/java/pom.xml deleted file mode 100644 index 3008c104..00000000 --- a/examples/network/network_file/java/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - com.pulumi - equinix-networkedge-file - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - generated_program.App - - - - - - com.equinix.pulumi - equinix - [0.1.0,) - - - com.pulumi - pulumi - (,1.0] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - \ No newline at end of file diff --git a/examples/network/network_file/java/src/main/java/generated_program/App.java b/examples/network/network_file/java/src/main/java/generated_program/App.java deleted file mode 100644 index 9c2315c6..00000000 --- a/examples/network/network_file/java/src/main/java/generated_program/App.java +++ /dev/null @@ -1,45 +0,0 @@ -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.NetworkFile; -import com.equinix.pulumi.networkedge.NetworkFileArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.IOException; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var metro = config.get("metro").orElse("SV"); - - String content = null; - try { - content = Files.readString(Paths.get("./../assets/aviatrix-cloud-init.txt")); - } catch (IOException e) { - e.printStackTrace(); - } - - var networkFile = new NetworkFile("networkFile", NetworkFileArgs.builder() - .fileName("Aviatrix-ZTP-file") - .content(content) - .metroCode(metro) - .deviceTypeCode("AVIATRIX_EDGE") - .processType("CLOUD_INIT") - .selfManaged(true) - .byol(true) - .build()); - - ctx.export("networkFileId", networkFile.id()); - ctx.export("networkFileStatus", networkFile.status()); - } -} diff --git a/examples/network/network_file/python/Pulumi.yaml b/examples/network/network_file/python/Pulumi.yaml deleted file mode 100644 index 21affd5d..00000000 --- a/examples/network/network_file/python/Pulumi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: equinix-networkedge-file -runtime: python -description: An Equinix Network Edge File (LICENSE or CLOUD_INIT) resource -config: - metro: - type: string - default: SV diff --git a/examples/network/network_file/python/__main__.py b/examples/network/network_file/python/__main__.py deleted file mode 100644 index a8a187c3..00000000 --- a/examples/network/network_file/python/__main__.py +++ /dev/null @@ -1,17 +0,0 @@ -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -metro = config.get("metro") -if metro is None: - metro = "SV" -network_file = equinix.networkedge.NetworkFile("networkFile", - file_name="Aviatrix-ZTP-file", - content=(lambda path: open(path).read())("./../assets/aviatrix-cloud-init.txt"), - metro_code=metro, - device_type_code="AVIATRIX_EDGE", - process_type="CLOUD_INIT", - self_managed=True, - byol=True) -pulumi.export("networkFileId", network_file.id) -pulumi.export("networkFileStatus", network_file.status) diff --git a/examples/network/network_file/python/requirements.txt b/examples/network/network_file/python/requirements.txt deleted file mode 100644 index 805364e7..00000000 --- a/examples/network/network_file/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 diff --git a/examples/network/network_file/typescript/Pulumi.yaml b/examples/network/network_file/typescript/Pulumi.yaml deleted file mode 100644 index 126b3b05..00000000 --- a/examples/network/network_file/typescript/Pulumi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: equinix-networkedge-file -runtime: nodejs -description: An Equinix Network Edge File (LICENSE or CLOUD_INIT) resource -config: - metro: - type: string - default: SV diff --git a/examples/network/network_file/typescript/index.ts b/examples/network/network_file/typescript/index.ts deleted file mode 100644 index aae6812b..00000000 --- a/examples/network/network_file/typescript/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; - -const config = new pulumi.Config(); -const metro = config.get("metro") || "SV"; -const networkFile = new equinix.networkedge.NetworkFile("networkFile", { - fileName: "Aviatrix-ZTP-file", - content: fs.readFileSync("./../assets/aviatrix-cloud-init.txt"), - metroCode: metro, - deviceTypeCode: "AVIATRIX_EDGE", - processType: "CLOUD_INIT", - selfManaged: true, - byol: true, -}); -export const networkFileId = networkFile.id; -export const networkFileStatus = networkFile.status; diff --git a/examples/network/network_file/typescript/package.json b/examples/network/network_file/typescript/package.json deleted file mode 100644 index 010d0c37..00000000 --- a/examples/network/network_file/typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "equinix-networkedge-file", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } -} \ No newline at end of file diff --git a/examples/network/network_file/typescript/tsconfig.json b/examples/network/network_file/typescript/tsconfig.json deleted file mode 100644 index d6ab08be..00000000 --- a/examples/network/network_file/typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] -} \ No newline at end of file diff --git a/examples/network/network_file/yaml/Pulumi.yaml b/examples/network/network_file/yaml/Pulumi.yaml deleted file mode 100644 index 17d66451..00000000 --- a/examples/network/network_file/yaml/Pulumi.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: equinix-networkedge-file -runtime: yaml -description: An Equinix Network Edge File (LICENSE or CLOUD_INIT) resource -config: - metro: - type: string - default: SV -resources: - networkFile: - type: equinix:networkedge:NetworkFile - properties: - fileName: Aviatrix-ZTP-file - content: - fn::readFile: ./../assets/aviatrix-cloud-init.txt - metroCode: ${metro} - deviceTypeCode: AVIATRIX_EDGE - processType: CLOUD_INIT - selfManaged: true - byol: true -outputs: - networkFileId: ${networkFile.id} - networkFileStatus: ${networkFile.status} diff --git a/examples/network/ssh_key/Pulumi.yaml b/examples/network/ssh_key/Pulumi.yaml new file mode 100644 index 00000000..2bba4c98 --- /dev/null +++ b/examples/network/ssh_key/Pulumi.yaml @@ -0,0 +1,20 @@ +name: equinix-network-ssh_key +runtime: yaml +resources: + john: + type: equinix:networkedge:SshKey + properties: + name: johnKent + publicKey: |2 + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com + type: RSA + projectId: a86d7112-d740-4758-9c9c-31e66373746b diff --git a/examples/network/ssh_key/csharp/Program.cs b/examples/network/ssh_key/csharp/Program.cs index d8edb8b7..d90e7a3f 100644 --- a/examples/network/ssh_key/csharp/Program.cs +++ b/examples/network/ssh_key/csharp/Program.cs @@ -1,19 +1,27 @@ using System.Collections.Generic; -using System.IO; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var sshKey = new Equinix.NetworkEdge.SshKey("sshKey", new() + var john = new Equinix.NetworkEdge.SshKey("john", new() { Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/ne_rsa.pub"), + PublicKey = @" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +", + Type = "RSA", + ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", }); - return new Dictionary - { - ["sshKeyId"] = sshKey.Id, - }; }); diff --git a/examples/network/ssh_key/csharp/Pulumi.yaml b/examples/network/ssh_key/csharp/Pulumi.yaml index 8c2113c1..10e867c3 100644 --- a/examples/network/ssh_key/csharp/Pulumi.yaml +++ b/examples/network/ssh_key/csharp/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-ssh-key +name: equinix-network-ssh_key runtime: dotnet -description: An Equinix Network Edge SSH Key resource diff --git a/examples/network/ssh_key/csharp/equinix-network-ssh_key.csproj b/examples/network/ssh_key/csharp/equinix-network-ssh_key.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/ssh_key/csharp/equinix-network-ssh_key.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/ssh_key/csharp/equinix-networkedge-ssh-key.csproj b/examples/network/ssh_key/csharp/equinix-networkedge-ssh-key.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/ssh_key/csharp/equinix-networkedge-ssh-key.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/ssh_key/example.md b/examples/network/ssh_key/example.md deleted file mode 100644 index 32ea3f0f..00000000 --- a/examples/network/ssh_key/example.md +++ /dev/null @@ -1,152 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; - -const sshKey = new equinix.networkedge.SshKey("sshKey", { - name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/ne_rsa.pub"), -}); -export const sshKeyId = sshKey.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -ssh_key = equinix.networkedge.SshKey("sshKey", - name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/ne_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "os" - - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - sshKey, err := networkedge.NewSshKey(ctx, "sshKey", &networkedge.SshKeyArgs{ - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/ne_rsa.pub"), - }) - if err != nil { - return err - } - ctx.Export("sshKeyId", sshKey.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using System.IO; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var sshKey = new Equinix.NetworkEdge.SshKey("sshKey", new() - { - Name = "johnKent", - PublicKey = File.ReadAllText("/Users/John/.ssh/ne_rsa.pub"), - }); - - return new Dictionary - { - ["sshKeyId"] = sshKey.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.SshKey; -import com.equinix.pulumi.networkedge.SshKeyArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.IOException; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - String key = null; - try { - key = Files.readString(Paths.get("/Users/John/.ssh/ne_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } - - var sshKey = new SshKey("sshKey", SshKeyArgs.builder() - .name("johnKent") - .publicKey(key) - .build()); - - ctx.export("sshKeyId", sshKey.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -resources: - sshKey: - type: equinix:networkedge:SshKey - properties: - name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/ne_rsa.pub -outputs: - sshKeyId: ${sshKey.id} -``` - -{{% /choosable %}} diff --git a/examples/network/ssh_key/go/Pulumi.yaml b/examples/network/ssh_key/go/Pulumi.yaml index e20ec0bb..e0c9d5f3 100644 --- a/examples/network/ssh_key/go/Pulumi.yaml +++ b/examples/network/ssh_key/go/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-ssh-key +name: equinix-network-ssh_key runtime: go -description: An Equinix Network Edge SSH Key resource diff --git a/examples/network/ssh_key/go/go.mod b/examples/network/ssh_key/go/go.mod index 0455187f..aea53574 100644 --- a/examples/network/ssh_key/go/go.mod +++ b/examples/network/ssh_key/go/go.mod @@ -1,58 +1,94 @@ -module equinix-networkedge-ssh-key +module equinix-network-ssh_key -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/network/ssh_key/go/main.go b/examples/network/ssh_key/go/main.go index 7e91f267..0fd801e6 100644 --- a/examples/network/ssh_key/go/main.go +++ b/examples/network/ssh_key/go/main.go @@ -1,30 +1,31 @@ package main import ( - "os" - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -func readFileOrPanic(path string) pulumi.StringPtrInput { - data, err := os.ReadFile(path) - if err != nil { - panic(err.Error()) - } - return pulumi.String(string(data)) -} - func main() { pulumi.Run(func(ctx *pulumi.Context) error { - sshKey, err := networkedge.NewSshKey(ctx, "sshKey", &networkedge.SshKeyArgs{ - Name: pulumi.String("johnKent"), - PublicKey: readFileOrPanic("/Users/John/.ssh/ne_rsa.pub"), + _, err := networkedge.NewSshKey(ctx, "john", &networkedge.SshKeyArgs{ + Name: pulumi.String("johnKent"), + PublicKey: pulumi.String(` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +`), + Type: pulumi.String("RSA"), + ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), }) if err != nil { return err } - ctx.Export("sshKeyId", sshKey.ID()) return nil }) } diff --git a/examples/network/ssh_key/java/.gitignore b/examples/network/ssh_key/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/network/ssh_key/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/network/ssh_key/java/Pulumi.yaml b/examples/network/ssh_key/java/Pulumi.yaml index 7124114f..a047ffed 100644 --- a/examples/network/ssh_key/java/Pulumi.yaml +++ b/examples/network/ssh_key/java/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-ssh-key +name: equinix-network-ssh_key runtime: java -description: An Equinix Network Edge SSH Key resource diff --git a/examples/network/ssh_key/java/pom.xml b/examples/network/ssh_key/java/pom.xml index 3c7d9407..8d9329ea 100644 --- a/examples/network/ssh_key/java/pom.xml +++ b/examples/network/ssh_key/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-networkedge-ssh-key + equinix-network-ssh_key 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/network/ssh_key/java/src/main/java/generated_program/App.java b/examples/network/ssh_key/java/src/main/java/generated_program/App.java index 1498a416..3fb022ef 100644 --- a/examples/network/ssh_key/java/src/main/java/generated_program/App.java +++ b/examples/network/ssh_key/java/src/main/java/generated_program/App.java @@ -3,12 +3,11 @@ import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.SshKey; -import com.equinix.pulumi.networkedge.SshKeyArgs; +import com.pulumi.equinix.networkedge.SshKey; +import com.pulumi.equinix.networkedge.SshKeyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; -import java.io.IOException; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; @@ -19,18 +18,23 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - String key = null; - try { - key = Files.readString(Paths.get("/Users/John/.ssh/ne_rsa.pub")); - } catch (IOException e) { - e.printStackTrace(); - } - - var sshKey = new SshKey("sshKey", SshKeyArgs.builder() + var john = new SshKey("john", SshKeyArgs.builder() .name("johnKent") - .publicKey(key) + .publicKey(""" + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com + """) + .type("RSA") + .projectId("a86d7112-d740-4758-9c9c-31e66373746b") .build()); - ctx.export("sshKeyId", sshKey.id()); } } diff --git a/examples/network/ssh_key/python/Pulumi.yaml b/examples/network/ssh_key/python/Pulumi.yaml index c8e716cb..c2249ac5 100644 --- a/examples/network/ssh_key/python/Pulumi.yaml +++ b/examples/network/ssh_key/python/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-ssh-key +name: equinix-network-ssh_key runtime: python -description: An Equinix Network Edge SSH Key resource diff --git a/examples/network/ssh_key/python/__main__.py b/examples/network/ssh_key/python/__main__.py index 75c03d25..44208121 100644 --- a/examples/network/ssh_key/python/__main__.py +++ b/examples/network/ssh_key/python/__main__.py @@ -1,7 +1,18 @@ import pulumi import pulumi_equinix as equinix -ssh_key = equinix.networkedge.SshKey("sshKey", +john = equinix.networkedge.SshKey("john", name="johnKent", - public_key=(lambda path: open(path).read())("/Users/John/.ssh/ne_rsa.pub")) -pulumi.export("sshKeyId", ssh_key.id) + public_key=""" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +""", + type="RSA", + project_id="a86d7112-d740-4758-9c9c-31e66373746b") diff --git a/examples/network/ssh_key/python/requirements.txt b/examples/network/ssh_key/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/network/ssh_key/python/requirements.txt +++ b/examples/network/ssh_key/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/ssh_key/typescript/Pulumi.yaml b/examples/network/ssh_key/typescript/Pulumi.yaml index f9d0efd6..c7e42ed7 100644 --- a/examples/network/ssh_key/typescript/Pulumi.yaml +++ b/examples/network/ssh_key/typescript/Pulumi.yaml @@ -1,3 +1,2 @@ -name: equinix-networkedge-ssh-key +name: equinix-network-ssh_key runtime: nodejs -description: An Equinix Network Edge SSH Key resource diff --git a/examples/network/ssh_key/typescript/index.ts b/examples/network/ssh_key/typescript/index.ts index 5290535c..45711fd4 100644 --- a/examples/network/ssh_key/typescript/index.ts +++ b/examples/network/ssh_key/typescript/index.ts @@ -1,9 +1,19 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -import * as fs from "fs"; -const sshKey = new equinix.networkedge.SshKey("sshKey", { +const john = new equinix.networkedge.SshKey("john", { name: "johnKent", - publicKey: fs.readFileSync("/Users/John/.ssh/ne_rsa.pub"), + publicKey: ` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +`, + type: "RSA", + projectId: "a86d7112-d740-4758-9c9c-31e66373746b", }); -export const sshKeyId = sshKey.id; diff --git a/examples/network/ssh_key/typescript/package.json b/examples/network/ssh_key/typescript/package.json index fa382f12..4016e91b 100644 --- a/examples/network/ssh_key/typescript/package.json +++ b/examples/network/ssh_key/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-networkedge-ssh-key", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-network-ssh_key", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/network/ssh_key/typescript/tsconfig.json b/examples/network/ssh_key/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/network/ssh_key/typescript/tsconfig.json +++ b/examples/network/ssh_key/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/network/ssh_key/yaml/Pulumi.yaml b/examples/network/ssh_key/yaml/Pulumi.yaml deleted file mode 100644 index 3446fb1f..00000000 --- a/examples/network/ssh_key/yaml/Pulumi.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: equinix-networkedge-ssh-key -runtime: yaml -description: An Equinix Network Edge SSH Key resource -resources: - sshKey: - type: equinix:networkedge:SshKey - properties: - name: johnKent - publicKey: - fn::readFile: /Users/John/.ssh/ne_rsa.pub -outputs: - sshKeyId: ${sshKey.id} diff --git a/examples/network/ssh_user/Pulumi.yaml b/examples/network/ssh_user/Pulumi.yaml new file mode 100644 index 00000000..cc1f40d3 --- /dev/null +++ b/examples/network/ssh_user/Pulumi.yaml @@ -0,0 +1,13 @@ +name: equinix-network-ssh_user +runtime: yaml +resources: + # Create SSH user with password auth method and associate it with + # two virtual network devices + john: + type: equinix:networkedge:SshUser + properties: + username: john + password: secret + deviceIds: + - csr1000v-ha-uuid + - csr1000v-ha-redundant-uuid diff --git a/examples/network/ssh_user/csharp/Program.cs b/examples/network/ssh_user/csharp/Program.cs index 1201be3d..7a6d511a 100644 --- a/examples/network/ssh_user/csharp/Program.cs +++ b/examples/network/ssh_user/csharp/Program.cs @@ -1,25 +1,20 @@ using System.Collections.Generic; +using System.Linq; using Pulumi; using Equinix = Pulumi.Equinix; return await Deployment.RunAsync(() => { - var config = new Config(); - var device1Id = config.Require("device1Id"); - var device2Id = config.Require("device2Id"); - var sshUser = new Equinix.NetworkEdge.SshUser("sshUser", new() + var john = new Equinix.NetworkEdge.SshUser("john", new() { - Username = "johnKent", + Username = "john", + Password = "secret", DeviceIds = new[] { - device1Id, - device2Id, + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid", }, }); - return new Dictionary - { - ["sshUserId"] = sshUser.Id, - }; }); diff --git a/examples/network/ssh_user/csharp/Pulumi.yaml b/examples/network/ssh_user/csharp/Pulumi.yaml index e5f7c77a..bff4e51a 100644 --- a/examples/network/ssh_user/csharp/Pulumi.yaml +++ b/examples/network/ssh_user/csharp/Pulumi.yaml @@ -1,8 +1,2 @@ -name: equinix-networkedge-ssh-user +name: equinix-network-ssh_user runtime: dotnet -description: An Equinix Network Edge SSH User resource -config: - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/ssh_user/csharp/equinix-network-ssh_user.csproj b/examples/network/ssh_user/csharp/equinix-network-ssh_user.csproj new file mode 100644 index 00000000..36182104 --- /dev/null +++ b/examples/network/ssh_user/csharp/equinix-network-ssh_user.csproj @@ -0,0 +1,13 @@ + + + + Exe + net6.0 + enable + + + + + + + \ No newline at end of file diff --git a/examples/network/ssh_user/csharp/equinix-networkedge-ssh-user.csproj b/examples/network/ssh_user/csharp/equinix-networkedge-ssh-user.csproj deleted file mode 100644 index 1565d39e..00000000 --- a/examples/network/ssh_user/csharp/equinix-networkedge-ssh-user.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - \ No newline at end of file diff --git a/examples/network/ssh_user/example.md b/examples/network/ssh_user/example.md deleted file mode 100644 index 93730f36..00000000 --- a/examples/network/ssh_user/example.md +++ /dev/null @@ -1,169 +0,0 @@ -{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} - -{{% choosable language "javascript,typescript" %}} - -```typescript -import * as pulumi from "@pulumi/pulumi"; -import * as equinix from "@equinix-labs/pulumi-equinix"; - -const config = new pulumi.Config(); -const device1Id = config.require("device1Id"); -const device2Id = config.require("device2Id"); -const sshUser = new equinix.networkedge.SshUser("sshUser", { - username: "johnKent", - deviceIds: [ - device1Id, - device2Id, - ], -}); -export const sshUserId = sshUser.id; -``` - -{{% /choosable %}} - -{{% choosable language python %}} - -```python -import pulumi -import pulumi_equinix as equinix - -config = pulumi.Config() -device1_id = config.require("device1Id") -device2_id = config.require("device2Id") -ssh_user = equinix.networkedge.SshUser("sshUser", - username="johnKent", - device_ids=[ - device1_id, - device2_id, - ]) -pulumi.export("sshUserId", ssh_user.id) -``` - -{{% /choosable %}} - -{{% choosable language go %}} - -```go -package main - -import ( - "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - device1Id := cfg.Require("device1Id") - device2Id := cfg.Require("device2Id") - sshUser, err := networkedge.NewSshUser(ctx, "sshUser", &networkedge.SshUserArgs{ - Username: pulumi.String("johnKent"), - DeviceIds: pulumi.StringArray{ - pulumi.String(device1Id), - pulumi.String(device2Id), - }, - }) - if err != nil { - return err - } - ctx.Export("sshUserId", sshUser.ID()) - return nil - }) -} -``` - -{{% /choosable %}} - -{{% choosable language csharp %}} - -```csharp -using System.Collections.Generic; -using Pulumi; -using Equinix = Pulumi.Equinix; - -return await Deployment.RunAsync(() => -{ - var config = new Config(); - var device1Id = config.Require("device1Id"); - var device2Id = config.Require("device2Id"); - var sshUser = new Equinix.NetworkEdge.SshUser("sshUser", new() - { - Username = "johnKent", - DeviceIds = new[] - { - device1Id, - device2Id, - }, - }); - - return new Dictionary - { - ["sshUserId"] = sshUser.Id, - }; -}); -``` - -{{% /choosable %}} - -{{% choosable language java %}} - -```java -package generated_program; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.SshUser; -import com.equinix.pulumi.networkedge.SshUserArgs; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var config = ctx.config(); - final var device1Id = config.get("device1Id").get(); - final var device2Id = config.get("device2Id").get(); - var sshUser = new SshUser("sshUser", SshUserArgs.builder() - .username("johnKent") - .deviceIds( - device1Id, - device2Id) - .build()); - - ctx.export("sshUserId", sshUser.id()); - } -} -``` - -{{% /choosable %}} - -{{% choosable language yaml %}} - -```yaml -config: - device1Id: - type: string - device2Id: - type: string -resources: - sshUser: - type: equinix:networkedge:SshUser - properties: - username: johnKent - deviceIds: - - ${device1Id} - - ${device2Id} -outputs: - sshUserId: ${sshUser.id} -``` - -{{% /choosable %}} diff --git a/examples/network/ssh_user/go/Pulumi.yaml b/examples/network/ssh_user/go/Pulumi.yaml index 82f06aba..750a89da 100644 --- a/examples/network/ssh_user/go/Pulumi.yaml +++ b/examples/network/ssh_user/go/Pulumi.yaml @@ -1,8 +1,2 @@ -name: equinix-networkedge-ssh-user +name: equinix-network-ssh_user runtime: go -description: An Equinix Network Edge SSH User resource -config: - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/ssh_user/go/go.mod b/examples/network/ssh_user/go/go.mod index 43236a8a..0d638bb2 100644 --- a/examples/network/ssh_user/go/go.mod +++ b/examples/network/ssh_user/go/go.mod @@ -1,59 +1,94 @@ -module equinix-networkedge-ssh-user +module equinix-network-ssh_user -go 1.17 +go 1.21 + +toolchain go1.22.4 require ( - github.com/equinix/pulumi-equinix v0.1.0 - github.com/pulumi/pulumi/sdk/v3 v3.30.0 + github.com/equinix/pulumi-equinix/sdk 0.11.5 + github.com/pulumi/pulumi/sdk/v3 v3.121.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.0 // 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/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // 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-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/cast v1.3.1 // 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/texttheater/golang-levenshtein v1.0.1 // 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/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 ) diff --git a/examples/network/ssh_user/go/main.go b/examples/network/ssh_user/go/main.go index b9835fdb..57b4ec20 100644 --- a/examples/network/ssh_user/go/main.go +++ b/examples/network/ssh_user/go/main.go @@ -3,25 +3,21 @@ package main import ( "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - cfg := config.New(ctx, "") - device1Id := cfg.Require("device1Id") - device2Id := cfg.Require("device2Id") - sshUser, err := networkedge.NewSshUser(ctx, "sshUser", &networkedge.SshUserArgs{ - Username: pulumi.String("johnKent"), + _, err := networkedge.NewSshUser(ctx, "john", &networkedge.SshUserArgs{ + Username: pulumi.String("john"), + Password: pulumi.String("secret"), DeviceIds: pulumi.StringArray{ - pulumi.String(device1Id), - pulumi.String(device2Id), + pulumi.String("csr1000v-ha-uuid"), + pulumi.String("csr1000v-ha-redundant-uuid"), }, }) if err != nil { return err } - ctx.Export("sshUserId", sshUser.ID()) return nil }) } diff --git a/examples/network/ssh_user/java/.gitignore b/examples/network/ssh_user/java/.gitignore deleted file mode 100644 index 9dbec41e..00000000 --- a/examples/network/ssh_user/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/repo -/target \ No newline at end of file diff --git a/examples/network/ssh_user/java/Pulumi.yaml b/examples/network/ssh_user/java/Pulumi.yaml index 4234bf0d..f7190299 100644 --- a/examples/network/ssh_user/java/Pulumi.yaml +++ b/examples/network/ssh_user/java/Pulumi.yaml @@ -1,8 +1,2 @@ -name: equinix-networkedge-ssh-user +name: equinix-network-ssh_user runtime: java -description: An Equinix Network Edge SSH User resource -config: - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/ssh_user/java/pom.xml b/examples/network/ssh_user/java/pom.xml index 1ad61f90..3875caf7 100644 --- a/examples/network/ssh_user/java/pom.xml +++ b/examples/network/ssh_user/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - equinix-networkedge-ssh-user + equinix-network-ssh_user 1.0-SNAPSHOT @@ -18,16 +18,16 @@ - - com.equinix.pulumi - equinix - [0.1.0,) - com.pulumi pulumi (,1.0] + + com.pulumi + equinix + (,1.0) + diff --git a/examples/network/ssh_user/java/src/main/java/generated_program/App.java b/examples/network/ssh_user/java/src/main/java/generated_program/App.java index 4f4b3544..7a8b853b 100644 --- a/examples/network/ssh_user/java/src/main/java/generated_program/App.java +++ b/examples/network/ssh_user/java/src/main/java/generated_program/App.java @@ -3,8 +3,8 @@ import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.equinix.pulumi.networkedge.SshUser; -import com.equinix.pulumi.networkedge.SshUserArgs; +import com.pulumi.equinix.networkedge.SshUser; +import com.pulumi.equinix.networkedge.SshUserArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -18,16 +18,13 @@ public static void main(String[] args) { } public static void stack(Context ctx) { - final var config = ctx.config(); - final var device1Id = config.get("device1Id").get(); - final var device2Id = config.get("device2Id").get(); - var sshUser = new SshUser("sshUser", SshUserArgs.builder() - .username("johnKent") + var john = new SshUser("john", SshUserArgs.builder() + .username("john") + .password("secret") .deviceIds( - device1Id, - device2Id) + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid") .build()); - ctx.export("sshUserId", sshUser.id()); } } diff --git a/examples/network/ssh_user/python/Pulumi.yaml b/examples/network/ssh_user/python/Pulumi.yaml index 9ab854a3..ae084306 100644 --- a/examples/network/ssh_user/python/Pulumi.yaml +++ b/examples/network/ssh_user/python/Pulumi.yaml @@ -1,8 +1,2 @@ -name: equinix-networkedge-ssh-user +name: equinix-network-ssh_user runtime: python -description: An Equinix Network Edge SSH User resource -config: - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/ssh_user/python/__main__.py b/examples/network/ssh_user/python/__main__.py index 3c63a17b..87940f16 100644 --- a/examples/network/ssh_user/python/__main__.py +++ b/examples/network/ssh_user/python/__main__.py @@ -1,13 +1,10 @@ import pulumi import pulumi_equinix as equinix -config = pulumi.Config() -device1_id = config.require("device1Id") -device2_id = config.require("device2Id") -ssh_user = equinix.networkedge.SshUser("sshUser", - username="johnKent", +john = equinix.networkedge.SshUser("john", + username="john", + password="secret", device_ids=[ - device1_id, - device2_id, + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid", ]) -pulumi.export("sshUserId", ssh_user.id) diff --git a/examples/network/ssh_user/python/requirements.txt b/examples/network/ssh_user/python/requirements.txt index 805364e7..317d94a1 100644 --- a/examples/network/ssh_user/python/requirements.txt +++ b/examples/network/ssh_user/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_equinix=>0.1.0 +pulumi_equinix==<1.0.0 diff --git a/examples/network/ssh_user/typescript/Pulumi.yaml b/examples/network/ssh_user/typescript/Pulumi.yaml index d2a85b7e..be7bc45c 100644 --- a/examples/network/ssh_user/typescript/Pulumi.yaml +++ b/examples/network/ssh_user/typescript/Pulumi.yaml @@ -1,8 +1,2 @@ -name: equinix-networkedge-ssh-user +name: equinix-network-ssh_user runtime: nodejs -description: An Equinix Network Edge SSH User resource -config: - device1Id: - type: string - device2Id: - type: string diff --git a/examples/network/ssh_user/typescript/index.ts b/examples/network/ssh_user/typescript/index.ts index b6cf7cd2..9d2973f2 100644 --- a/examples/network/ssh_user/typescript/index.ts +++ b/examples/network/ssh_user/typescript/index.ts @@ -1,14 +1,11 @@ import * as pulumi from "@pulumi/pulumi"; import * as equinix from "@equinix-labs/pulumi-equinix"; -const config = new pulumi.Config(); -const device1Id = config.require("device1Id"); -const device2Id = config.require("device2Id"); -const sshUser = new equinix.networkedge.SshUser("sshUser", { - username: "johnKent", +const john = new equinix.networkedge.SshUser("john", { + username: "john", + password: "secret", deviceIds: [ - device1Id, - device2Id, + "csr1000v-ha-uuid", + "csr1000v-ha-redundant-uuid", ], }); -export const sshUserId = sshUser.id; diff --git a/examples/network/ssh_user/typescript/package.json b/examples/network/ssh_user/typescript/package.json index 950e457b..f939285f 100644 --- a/examples/network/ssh_user/typescript/package.json +++ b/examples/network/ssh_user/typescript/package.json @@ -1,11 +1,11 @@ { - "name": "equinix-networkedge-ssh-user", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@equinix-labs/pulumi-equinix": "^0.1.0" - } + "name": "equinix-network-ssh_user", + "devDependencies": { + "@types/node": "^14" + }, + "dependencies": { + "typescript": "^4.0.0", + "@pulumi/pulumi": "^3.0.0", + "@equinix-labs/pulumi-equinix": "<1.0.0" + } } \ No newline at end of file diff --git a/examples/network/ssh_user/typescript/tsconfig.json b/examples/network/ssh_user/typescript/tsconfig.json index d6ab08be..11fc69af 100644 --- a/examples/network/ssh_user/typescript/tsconfig.json +++ b/examples/network/ssh_user/typescript/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "strict": true, - "outDir": "bin", - "target": "es2016", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.ts" - ] + "compilerOptions": { + "strict": true, + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.ts", + ] } \ No newline at end of file diff --git a/examples/network/ssh_user/yaml/Pulumi.yaml b/examples/network/ssh_user/yaml/Pulumi.yaml deleted file mode 100644 index cee962aa..00000000 --- a/examples/network/ssh_user/yaml/Pulumi.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: equinix-networkedge-ssh-user -runtime: yaml -description: An Equinix Network Edge SSH User resource -config: - device1Id: - type: string - device2Id: - type: string -resources: - sshUser: - type: equinix:networkedge:SshUser - properties: - username: johnKent - deviceIds: - - ${device1Id} - - ${device2Id} -outputs: - sshUserId: ${sshUser.id} diff --git a/go.work.sum b/go.work.sum index 34fdf256..10463b81 100644 --- a/go.work.sum +++ b/go.work.sum @@ -70,6 +70,8 @@ cloud.google.com/go/cloudtasks v1.12.6/go.mod h1:b7c7fe4+TJsFZfDyzO51F7cjq7HLUlR cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= +cloud.google.com/go/compute v1.25.0 h1:H1/4SqSUhjPFE7L5ddzHOfY2bCAvjwNRZPNl6Ni5oYU= +cloud.google.com/go/compute v1.25.0/go.mod h1:GR7F0ZPZH8EhChlMo9FkLd7eUTwEymjqQagxzilIxIE= cloud.google.com/go/contactcenterinsights v1.9.1 h1:hy4L0bc3fQNZZrhPjuoH62RiisD5B71/S1OZNunsTRk= cloud.google.com/go/contactcenterinsights v1.12.0/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= cloud.google.com/go/contactcenterinsights v1.12.1/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= @@ -2326,6 +2328,7 @@ golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/provider/cmd/pulumi-resource-equinix/schema.json b/provider/cmd/pulumi-resource-equinix/schema.json index 924f7728..1ee96299 100644 --- a/provider/cmd/pulumi-resource-equinix/schema.json +++ b/provider/cmd/pulumi-resource-equinix/schema.json @@ -12766,7 +12766,7 @@ }, "resources": { "equinix:fabric/cloudRouter:CloudRouter": { - "description": "Fabric V4 API compatible resource allows creation and management of [Equinix Fabric Cloud Router](https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks).\n\nAdditional documentation:\n* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks\n* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst metro = config.get(\"metro\") || \"FR\";\nconst accountNum = config.requireNumber(\"accountNum\");\nconst router = new equinix.fabric.CloudRouter(\"router\", {\n name: \"My-Fabric-Cloud-Router\",\n type: \"XF_ROUTER\",\n location: {\n metroCode: metro,\n },\n \"package\": {\n code: \"BASIC\",\n },\n notifications: [{\n type: \"ALL\",\n emails: [\"example@equinix.com\"],\n }],\n account: {\n accountNumber: 272010,\n },\n \"project\": {\n \"projectId\": \"995072000433550\"\n }\n});\nexport const routerId = router.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"FR\"\naccount_num = config.require_int(\"accountNum\")\nrouter = equinix.fabric.CloudRouter(\"router\",\n name=\"My-Fabric-Cloud-Router\",\n type=\"XF_ROUTER\",\n location=equinix.fabric.CloudRouterLocationArgs(\n metro_code=metro,\n ),\n package=equinix.fabric.CloudRouterPackageArgs(\n code=\"BASIC\",\n ),\n notifications=[equinix.fabric.CloudRouterNotificationArgs(\n type=\"ALL\",\n emails=[\"example@equinix.com\"],\n )],\n account=equinix.fabric.CloudRouterAccountArgs(\n account_number=272010,\n ))\n project=equinix.fabric.CloudRouterProjectArgs(\n project_id=995072000433550,\n ))\npulumi.export(\"routerId\", router.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tmetro := \"FR\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\taccountNum := cfg.RequireInt(\"accountNum\")\n\t\trouter, err := fabric.NewCloudRouter(ctx, \"router\", \u0026fabric.CloudRouterArgs{\n\t\t\tName: pulumi.String(\"My-Fabric-Cloud-Router\"),\n\t\t\tType: pulumi.String(\"XF_ROUTER\"),\n\t\t\tLocation: \u0026fabric.CloudRouterLocationArgs{\n\t\t\t\tMetroCode: pulumi.String(metro),\n\t\t\t},\n\t\t\tPackage: \u0026fabric.CloudRouterPackageArgs{\n\t\t\t\tCode: pulumi.String(\"BASIC\"),\n\t\t\t},\n\t\t\tNotifications: fabric.CloudRouterNotificationArray{\n\t\t\t\t\u0026fabric.CloudRouterNotificationArgs{\n\t\t\t\t\tType: pulumi.String(\"ALL\"),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tAccount: \u0026fabric.CloudRouterAccountArgs{\n\t\t\t\tAccountNumber: pulumi.Int(272010),\n\t\t\t},\n\t\t\tProject: \u0026fabric.CloudRouterProjectArgs{\n\t\t\t\tProjectId: pulumi.String(\"995072000433550\"),\n },\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"routerId\", router.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var metro = config.Get(\"metro\") ?? \"FR\";\n var accountNum = config.RequireInt32(\"accountNum\");\n var router = new Equinix.Fabric.CloudRouter(\"router\", new()\n {\n Name = \"My-Fabric-Cloud-Router\",\n Type = \"XF_ROUTER\",\n Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs\n {\n MetroCode = metro,\n },\n Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs\n {\n Code = \"BASIC\",\n },\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.CloudRouterNotificationArgs\n {\n Type = \"ALL\",\n Emails = new[]\n {\n \"example@equinix.com\",\n },\n },\n },\n Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs\n {\n AccountNumber = 272010,\n },\n Project = new Equinix.Fabric.Inputs.CloudRouterProjectArgs\n {\n ProjectId = \"995072000433550\",\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"routerId\"] = router.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.CloudRouter;\nimport com.pulumi.equinix.fabric.CloudRouterArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterLocationArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterPackageArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var metro = config.get(\"metro\").orElse(\"FR\");\n final var accountNum = config.get(\"accountNum\");\n var router = new CloudRouter(\"router\", CloudRouterArgs.builder() \n .name(\"My-Fabric-Cloud-Router\")\n .type(\"XF_ROUTER\")\n .location(CloudRouterLocationArgs.builder()\n .metroCode(metro)\n .build())\n .package_(CloudRouterPackageArgs.builder()\n .code(\"BASIC\")\n .build())\n .notifications(CloudRouterNotificationArgs.builder()\n .type(\"ALL\")\n .emails(\"example@equinix.com\")\n .build())\n .account(CloudRouterAccountArgs.builder()\n .accountNumber(272010)\n .build())\n .project(CloudRouterProjectArgs.builder()\n .projectId(\"995072000433550\")\n .build())\n .build());\n\n ctx.export(\"routerId\", router.id());\n }\n}\n```\n```yaml\nconfig:\n metro:\n type: string\n default: FR\n accountNum:\n type: integer\nresources:\n router:\n type: equinix:fabric:CloudRouter\n properties:\n name: My-Fabric-Cloud-Router\n type: XF_ROUTER\n location:\n metroCode: ${metro}\n package:\n code: BASIC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n account:\n accountNumber: 272010\n project:\n projectId: 995072000433550\noutputs:\n routerId: ${router.id}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Fabric V4 API compatible resource allows creation and management of [Equinix Fabric Cloud Router](https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks).\n\nAdditional documentation:\n* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks\n* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst newCloudRouter = new equinix.fabric.CloudRouter(\"newCloudRouter\", {\n name: \"Router-SV\",\n type: \"XF_ROUTER\",\n notifications: [{\n type: \"ALL\",\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n location: {\n metroCode: \"SV\",\n },\n \"package\": {\n code: \"STANDARD\",\n },\n project: {\n projectId: \"776847000642406\",\n },\n account: {\n accountNumber: 203612,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nnew_cloud_router = equinix.fabric.CloudRouter(\"newCloudRouter\",\n name=\"Router-SV\",\n type=\"XF_ROUTER\",\n notifications=[equinix.fabric.CloudRouterNotificationArgs(\n type=\"ALL\",\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n order=equinix.fabric.CloudRouterOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n location=equinix.fabric.CloudRouterLocationArgs(\n metro_code=\"SV\",\n ),\n package=equinix.fabric.CloudRouterPackageArgs(\n code=\"STANDARD\",\n ),\n project=equinix.fabric.CloudRouterProjectArgs(\n project_id=\"776847000642406\",\n ),\n account=equinix.fabric.CloudRouterAccountArgs(\n account_number=203612,\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewCloudRouter(ctx, \"newCloudRouter\", \u0026fabric.CloudRouterArgs{\n\t\t\tName: pulumi.String(\"Router-SV\"),\n\t\t\tType: pulumi.String(\"XF_ROUTER\"),\n\t\t\tNotifications: fabric.CloudRouterNotificationArray{\n\t\t\t\t\u0026fabric.CloudRouterNotificationArgs{\n\t\t\t\t\tType: pulumi.String(\"ALL\"),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOrder: \u0026fabric.CloudRouterOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tLocation: \u0026fabric.CloudRouterLocationArgs{\n\t\t\t\tMetroCode: pulumi.String(\"SV\"),\n\t\t\t},\n\t\t\tPackage: \u0026fabric.CloudRouterPackageArgs{\n\t\t\t\tCode: pulumi.String(\"STANDARD\"),\n\t\t\t},\n\t\t\tProject: \u0026fabric.CloudRouterProjectArgs{\n\t\t\t\tProjectId: pulumi.String(\"776847000642406\"),\n\t\t\t},\n\t\t\tAccount: \u0026fabric.CloudRouterAccountArgs{\n\t\t\t\tAccountNumber: pulumi.Int(203612),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var newCloudRouter = new Equinix.Fabric.CloudRouter(\"newCloudRouter\", new()\n {\n Name = \"Router-SV\",\n Type = \"XF_ROUTER\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.CloudRouterNotificationArgs\n {\n Type = \"ALL\",\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Order = new Equinix.Fabric.Inputs.CloudRouterOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs\n {\n MetroCode = \"SV\",\n },\n Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs\n {\n Code = \"STANDARD\",\n },\n Project = new Equinix.Fabric.Inputs.CloudRouterProjectArgs\n {\n ProjectId = \"776847000642406\",\n },\n Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs\n {\n AccountNumber = 203612,\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.CloudRouter;\nimport com.pulumi.equinix.fabric.CloudRouterArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterLocationArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterPackageArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterProjectArgs;\nimport com.pulumi.equinix.fabric.inputs.CloudRouterAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var newCloudRouter = new CloudRouter(\"newCloudRouter\", CloudRouterArgs.builder()\n .name(\"Router-SV\")\n .type(\"XF_ROUTER\")\n .notifications(CloudRouterNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .order(CloudRouterOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .location(CloudRouterLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .package_(CloudRouterPackageArgs.builder()\n .code(\"STANDARD\")\n .build())\n .project(CloudRouterProjectArgs.builder()\n .projectId(\"776847000642406\")\n .build())\n .account(CloudRouterAccountArgs.builder()\n .accountNumber(\"203612\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n newCloudRouter:\n type: equinix:fabric:CloudRouter\n name: new_cloud_router\n properties:\n name: Router-SV\n type: XF_ROUTER\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n order:\n purchaseOrderNumber: 1-323292\n location:\n metroCode: SV\n package:\n code: STANDARD\n project:\n projectId: '776847000642406'\n account:\n accountNumber: '203612'\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "account": { "$ref": "#/types/equinix:fabric/CloudRouterAccount:CloudRouterAccount", @@ -13018,7 +13018,7 @@ } }, "equinix:fabric/connection:Connection": { - "description": "\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst metro = config.get(\"metro\") || \"FR\";\nconst speedInMbps = config.getNumber(\"speedInMbps\") || 50;\nconst fabricPortName = config.require(\"fabricPortName\");\nconst awsRegion = config.get(\"awsRegion\") || \"eu-central-1\";\nconst awsAccountId = config.require(\"awsAccountId\");\nconst serviceProfileId = equinix.fabric.getServiceProfiles({\n filter: {\n property: \"/name\",\n operator: \"=\",\n values: [\"AWS Direct Connect\"],\n },\n}).then(invoke =\u003e invoke.data?.[0]?.uuid!);\nconst portId = equinix.fabric.getPorts({\n filter: {\n name: fabricPortName,\n },\n}).then(invoke =\u003e invoke.data?.[0]?.uuid!);\nconst colo2Aws = new equinix.fabric.Connection(\"colo2Aws\", {\n name: \"Pulumi-colo2Aws\",\n type: \"EVPL_VC\",\n notifications: [{\n type: \"ALL\",\n emails: [\"example@equinix.com\"],\n }],\n bandwidth: speedInMbps,\n redundancy: {\n priority: \"PRIMARY\",\n },\n aSide: {\n accessPoint: {\n type: \"COLO\",\n port: {\n uuid: portId,\n },\n linkProtocol: {\n type: \"DOT1Q\",\n vlanTag: 1234,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: \"SP\",\n authenticationKey: awsAccountId,\n sellerRegion: awsRegion,\n profile: {\n type: \"L2_PROFILE\",\n uuid: serviceProfileId,\n },\n location: {\n metroCode: metro,\n },\n },\n },\n});\nexport const connectionId = colo2Aws.id;\nexport const connectionStatus = colo2Aws.operation.apply(operation =\u003e operation.equinixStatus);\nexport const connectionProviderStatus = colo2Aws.operation.apply(operation =\u003e operation.providerStatus);\nexport const awsDirectConnectId = colo2Aws.zSide.apply(zSide =\u003e zSide.accessPoint?.providerConnectionId);\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"FR\"\nspeed_in_mbps = config.get_int(\"speedInMbps\")\nif speed_in_mbps is None:\n speed_in_mbps = 50\nfabric_port_name = config.require(\"fabricPortName\")\naws_region = config.get(\"awsRegion\")\nif aws_region is None:\n aws_region = \"eu-central-1\"\naws_account_id = config.require(\"awsAccountId\")\nservice_profile_id = equinix.fabric.get_service_profiles(filter=equinix.fabric.GetServiceProfilesFilterArgs(\n property=\"/name\",\n operator=\"=\",\n values=[\"AWS Direct Connect\"],\n)).data[0].uuid\nport_id = equinix.fabric.get_ports(filter=equinix.fabric.GetPortsFilterArgs(\n name=fabric_port_name,\n)).data[0].uuid\ncolo2_aws = equinix.fabric.Connection(\"colo2Aws\",\n name=\"Pulumi-colo2Aws\",\n type=\"EVPL_VC\",\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=\"ALL\",\n emails=[\"example@equinix.com\"],\n )],\n bandwidth=speed_in_mbps,\n redundancy=equinix.fabric.ConnectionRedundancyArgs(\n priority=\"PRIMARY\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=\"COLO\",\n port=equinix.fabric.ConnectionASideAccessPointPortArgs(\n uuid=port_id,\n ),\n link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(\n type=\"DOT1Q\",\n vlan_tag=1234,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=\"SP\",\n authentication_key=aws_account_id,\n seller_region=aws_region,\n profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(\n type=\"L2_PROFILE\",\n uuid=service_profile_id,\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=metro,\n ),\n ),\n ))\npulumi.export(\"connectionId\", colo2_aws.id)\npulumi.export(\"connectionStatus\", colo2_aws.operation.equinix_status)\npulumi.export(\"connectionProviderStatus\", colo2_aws.operation.provider_status)\npulumi.export(\"awsDirectConnectId\", colo2_aws.z_side.access_point.provider_connection_id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tmetro := \"FR\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tspeedInMbps := 50\n\t\tif param := cfg.GetInt(\"speedInMbps\"); param != 0 {\n\t\t\tspeedInMbps = param\n\t\t}\n\t\tfabricPortName := cfg.Require(\"fabricPortName\")\n\t\tawsRegion := \"eu-central-1\"\n\t\tif param := cfg.Get(\"awsRegion\"); param != \"\" {\n\t\t\tawsRegion = param\n\t\t}\n\t\tawsAccountId := cfg.Require(\"awsAccountId\")\n\t\tserviceProfileId := fabric.GetServiceProfiles(ctx, \u0026fabric.GetServiceProfilesArgs{\n\t\t\tFilter: fabric.GetServiceProfilesFilter{\n\t\t\t\tProperty: pulumi.StringRef(\"/name\"),\n\t\t\t\tOperator: pulumi.StringRef(\"=\"),\n\t\t\t\tValues: []string{\n\t\t\t\t\t\"AWS Direct Connect\",\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil).Data[0].Uuid\n\t\tportId := fabric.GetPorts(ctx, \u0026fabric.GetPortsArgs{\n\t\t\tFilter: fabric.GetPortsFilter{\n\t\t\t\tName: pulumi.StringRef(fabricPortName),\n\t\t\t},\n\t\t}, nil).Data[0].Uuid\n\t\tcolo2Aws, err := fabric.NewConnection(ctx, \"colo2Aws\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"Pulumi-colo2Aws\"),\n\t\t\tType: pulumi.String(\"EVPL_VC\"),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(\"ALL\"),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(speedInMbps),\n\t\t\tRedundancy: \u0026fabric.ConnectionRedundancyArgs{\n\t\t\t\tPriority: pulumi.String(\"PRIMARY\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(\"COLO\"),\n\t\t\t\t\tPort: \u0026fabric.ConnectionASideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: *pulumi.String(portId),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionASideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(\"DOT1Q\"),\n\t\t\t\t\t\tVlanTag: pulumi.Int(1234),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(\"SP\"),\n\t\t\t\t\tAuthenticationKey: pulumi.String(awsAccountId),\n\t\t\t\t\tSellerRegion: pulumi.String(awsRegion),\n\t\t\t\t\tProfile: \u0026fabric.ConnectionZSideAccessPointProfileArgs{\n\t\t\t\t\t\tType: pulumi.String(\"L2_PROFILE\"),\n\t\t\t\t\t\tUuid: *pulumi.String(serviceProfileId),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(metro),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"connectionId\", colo2Aws.ID())\n\t\tctx.Export(\"connectionStatus\", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) {\n\t\t\treturn \u0026operation.EquinixStatus, nil\n\t\t}).(pulumi.StringPtrOutput))\n\t\tctx.Export(\"connectionProviderStatus\", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) {\n\t\t\treturn \u0026operation.ProviderStatus, nil\n\t\t}).(pulumi.StringPtrOutput))\n\t\tctx.Export(\"awsDirectConnectId\", colo2Aws.ZSide.ApplyT(func(zSide fabric.ConnectionZSide) (*string, error) {\n\t\t\treturn \u0026zSide.AccessPoint.ProviderConnectionId, nil\n\t\t}).(pulumi.StringPtrOutput))\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var metro = config.Get(\"metro\") ?? \"FR\";\n var speedInMbps = config.GetNumber(\"speedInMbps\") ?? 50;\n var fabricPortName = config.Require(\"fabricPortName\");\n var awsRegion = config.Get(\"awsRegion\") ?? \"eu-central-1\";\n var awsAccountId = config.Require(\"awsAccountId\");\n var serviceProfileId = Equinix.Fabric.GetServiceProfiles.Invoke(new()\n {\n Filter = new Equinix.Fabric.Inputs.GetServiceProfilesFilterInputArgs\n {\n Property = \"/name\",\n Operator = \"=\",\n Values = new[]\n {\n \"AWS Direct Connect\",\n },\n },\n }).Apply(invoke =\u003e invoke.Data[0]?.Uuid);\n\n var portId = Equinix.Fabric.GetPorts.Invoke(new()\n {\n Filter = new Equinix.Fabric.Inputs.GetPortsFilterInputArgs\n {\n Name = fabricPortName,\n },\n }).Apply(invoke =\u003e invoke.Data[0]?.Uuid);\n\n var colo2Aws = new Equinix.Fabric.Connection(\"colo2Aws\", new()\n {\n Name = \"Pulumi-colo2Aws\",\n Type = \"EVPL_VC\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = \"ALL\",\n Emails = new[]\n {\n \"example@equinix.com\",\n },\n },\n },\n Bandwidth = speedInMbps,\n Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs\n {\n Priority = \"PRIMARY\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = \"COLO\",\n Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs\n {\n Uuid = portId,\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs\n {\n Type = \"DOT1Q\",\n VlanTag = 1234,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = \"SP\",\n AuthenticationKey = awsAccountId,\n SellerRegion = awsRegion,\n Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs\n {\n Type = \"L2_PROFILE\",\n Uuid = serviceProfileId,\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = metro,\n },\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"connectionId\"] = colo2Aws.Id,\n [\"connectionStatus\"] = colo2Aws.Operation.Apply(operation =\u003e operation.EquinixStatus),\n [\"connectionProviderStatus\"] = colo2Aws.Operation.Apply(operation =\u003e operation.ProviderStatus),\n [\"awsDirectConnectId\"] = colo2Aws.ZSide.Apply(zSide =\u003e zSide.AccessPoint?.ProviderConnectionId),\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.fabric.Connection;\nimport com.equinix.pulumi.fabric.ConnectionArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionNotificationArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionRedundancyArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionASideArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointPortArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionZSideArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointProfileArgs;\nimport com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport com.equinix.pulumi.fabric.inputs.GetServiceProfilesArgs;\nimport com.equinix.pulumi.fabric.inputs.GetServiceProfilesFilterArgs;\nimport com.equinix.pulumi.fabric.inputs.GetPortsArgs;\nimport com.equinix.pulumi.fabric.inputs.GetPortsFilterArgs;\nimport com.equinix.pulumi.fabric.FabricFunctions;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var metro = config.get(\"metro\").orElse(\"FR\");\n final var speedInMbps = Integer.parseInt(config.get(\"speedInMbps\").orElse(\"50\"));\n final var fabricPortName = config.get(\"fabricPortName\").get().toString();\n final var awsRegion = config.get(\"awsRegion\").orElse(\"eu-central-1\");\n final var awsAccountId = config.get(\"awsAccountId\").get().toString();\n System.out.println(System.getProperty(\"java.classpath\"));\n final var serviceProfileId = FabricFunctions.getServiceProfiles(GetServiceProfilesArgs.builder()\n .filter(GetServiceProfilesFilterArgs.builder()\n .property(\"/name\")\n .operator(\"=\")\n .values(\"AWS Direct Connect\")\n .build())\n .build()).applyValue(data -\u003e data.data().get(0).uuid().get());\n\n final var portId = FabricFunctions.getPorts(GetPortsArgs.builder()\n .filter(GetPortsFilterArgs.builder()\n .name(fabricPortName)\n .build())\n .build()).applyValue(data -\u003e data.data().get(0).uuid().get());\n\n var colo2Aws = new Connection(\"colo2Aws\", ConnectionArgs.builder() \n .name(\"Pulumi-colo2Aws\")\n .type(\"EVPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails(\"example@equinix.com\")\n .build())\n .bandwidth(speedInMbps)\n .redundancy(ConnectionRedundancyArgs.builder()\n .priority(\"PRIMARY\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionASideAccessPointPortArgs.builder()\n .uuid(portId)\n .build())\n .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()\n .type(\"DOT1Q\")\n .vlanTag(1234)\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"SP\")\n .authenticationKey(awsAccountId)\n .sellerRegion(awsRegion)\n .profile(ConnectionZSideAccessPointProfileArgs.builder()\n .type(\"L2_PROFILE\")\n .uuid(serviceProfileId)\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(metro)\n .build())\n .build())\n .build())\n .build());\n\n ctx.export(\"connectionId\", colo2Aws.id());\n ctx.export(\"connectionStatus\", colo2Aws.operation().applyValue(operation -\u003e operation.equinixStatus()));\n ctx.export(\"connectionProviderStatus\", colo2Aws.operation().applyValue(operation -\u003e operation.providerStatus()));\n ctx.export(\"awsDirectConnectId\", colo2Aws.zSide().applyValue(zSide -\u003e zSide.accessPoint().get().providerConnectionId()));\n }\n}\n```\n```yaml\nconfig:\n metro:\n type: string\n default: FR\n speedInMbps:\n type: integer\n default: 50\n fabricPortName:\n type: string\n awsRegion:\n type: string\n default: eu-central-1\n awsAccountId:\n type: string\nvariables:\n serviceProfileId:\n fn::invoke:\n function: equinix:fabric:getServiceProfiles\n arguments:\n filter:\n property: /name\n operator: \"=\"\n values:\n - AWS Direct Connect\n return: data[0].uuid\n portId:\n fn::invoke:\n function: equinix:fabric:getPorts\n arguments:\n filter:\n name: ${fabricPortName}\n return: data[0].uuid\nresources:\n colo2Aws:\n type: equinix:fabric:Connection\n properties:\n name: Pulumi-colo2Aws\n type: EVPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n bandwidth: ${speedInMbps}\n redundancy:\n priority: PRIMARY\n aSide:\n accessPoint:\n type: COLO\n port:\n uuid: ${portId}\n linkProtocol:\n type: DOT1Q\n vlanTag: 1234\n zSide:\n accessPoint:\n type: SP\n authenticationKey: ${awsAccountId}\n sellerRegion: ${awsRegion}\n profile:\n type: L2_PROFILE\n uuid: ${serviceProfileId}\n location:\n metroCode: ${metro}\noutputs:\n connectionId: ${colo2Aws.id}\n connectionStatus: ${colo2Aws.operation.equinixStatus}\n connectionProviderStatus: ${colo2Aws.operation.providerStatus}\n awsDirectConnectId: ${colo2Aws.zSide.accessPoint.providerConnectionId}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 9\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst fcr2Azure = new equinix.fabric.Connection(\"fcr2azure\", {\n name: \"ConnectionName\",\n type: \"IP_VC\",\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: \"CLOUD_ROUTER\",\n router: {\n uuid: \"\u003ccloud_router_uuid\u003e\",\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.SP,\n authenticationKey: \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peeringType: equinix.fabric.AccessPointPeeringType.Private,\n profile: {\n type: equinix.fabric.ProfileType.L2Profile,\n uuid: \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nfcr2_azure = equinix.fabric.Connection(\"fcr2azure\",\n name=\"ConnectionName\",\n type=\"IP_VC\",\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=\"CLOUD_ROUTER\",\n router=equinix.fabric.ConnectionASideAccessPointRouterArgs(\n uuid=\"\u003ccloud_router_uuid\u003e\",\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.SP,\n authentication_key=\"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,\n profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(\n type=equinix.fabric.ProfileType.L2_PROFILE,\n uuid=\"\u003cAzure_Service_Profile_UUID\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"fcr2azure\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(\"IP_VC\"),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(\"CLOUD_ROUTER\"),\n\t\t\t\t\tRouter: \u0026fabric.ConnectionASideAccessPointRouterArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003ccloud_router_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeSP),\n\t\t\t\t\tAuthenticationKey: pulumi.String(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\"),\n\t\t\t\t\tPeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate),\n\t\t\t\t\tProfile: \u0026fabric.ConnectionZSideAccessPointProfileArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.ProfileTypeL2Profile),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cAzure_Service_Profile_UUID\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var fcr2Azure = new Equinix.Fabric.Connection(\"fcr2azure\", new()\n {\n Name = \"ConnectionName\",\n Type = \"IP_VC\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = \"CLOUD_ROUTER\",\n Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs\n {\n Uuid = \"\u003ccloud_router_uuid\u003e\",\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.SP,\n AuthenticationKey = \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n PeeringType = Equinix.Fabric.AccessPointPeeringType.Private,\n Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs\n {\n Type = Equinix.Fabric.ProfileType.L2Profile,\n Uuid = \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var fcr2Azure = new Connection(\"fcr2Azure\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"IP_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"CLOUD_ROUTER\")\n .router(ConnectionASideAccessPointRouterArgs.builder()\n .uuid(\"\u003ccloud_router_uuid\u003e\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"SP\")\n .authenticationKey(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\")\n .peeringType(\"PRIVATE\")\n .profile(ConnectionZSideAccessPointProfileArgs.builder()\n .type(\"L2_PROFILE\")\n .uuid(\"\u003cAzure_Service_Profile_UUID\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n fcr2azure:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: IP_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: CLOUD_ROUTER\n router:\n uuid: \u003ccloud_router_uuid\u003e\n zSide:\n accessPoint:\n type: SP\n authenticationKey: \u003cAzure_ExpressRouter_Auth_Key\u003e\n peeringType: PRIVATE\n profile:\n type: L2_PROFILE\n uuid: \u003cAzure_Service_Profile_UUID\u003e\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 5\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst vd2Port = new equinix.fabric.Connection(\"vd2port\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.VD,\n virtualDevice: {\n type: \"EDGE\",\n uuid: \"\u003cdevice_uuid\u003e\",\n },\n \"interface\": {\n type: \"NETWORK\",\n id: 7,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003czside_port_uuid\u003e\",\n },\n linkProtocol: {\n type: equinix.fabric.AccessPointLinkProtocolType.Dot1q,\n vlanSTag: 3711,\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nvd2_port = equinix.fabric.Connection(\"vd2port\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.VD,\n virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(\n type=\"EDGE\",\n uuid=\"\u003cdevice_uuid\u003e\",\n ),\n interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(\n type=\"NETWORK\",\n id=7,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionZSideAccessPointPortArgs(\n uuid=\"\u003czside_port_uuid\u003e\",\n ),\n link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(\n type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,\n vlan_s_tag=3711,\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"vd2port\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeVD),\n\t\t\t\t\tVirtualDevice: \u0026fabric.ConnectionASideAccessPointVirtualDeviceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"EDGE\"),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cdevice_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tInterface: \u0026fabric.ConnectionASideAccessPointInterfaceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"NETWORK\"),\n\t\t\t\t\t\tId: pulumi.Int(7),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionZSideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003czside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionZSideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q),\n\t\t\t\t\t\tVlanSTag: pulumi.Int(3711),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vd2Port = new Equinix.Fabric.Connection(\"vd2port\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.VD,\n VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs\n {\n Type = \"EDGE\",\n Uuid = \"\u003cdevice_uuid\u003e\",\n },\n Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs\n {\n Type = \"NETWORK\",\n Id = 7,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs\n {\n Uuid = \"\u003czside_port_uuid\u003e\",\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs\n {\n Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q,\n VlanSTag = 3711,\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vd2Port = new Connection(\"vd2Port\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"VD\")\n .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()\n .type(\"EDGE\")\n .uuid(\"\u003cdevice_uuid\u003e\")\n .build())\n .interface_(ConnectionASideAccessPointInterfaceArgs.builder()\n .type(\"NETWORK\")\n .id(7)\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionZSideAccessPointPortArgs.builder()\n .uuid(\"\u003czside_port_uuid\u003e\")\n .build())\n .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder()\n .type(\"DOT1Q\")\n .vlanSTag(\"3711\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n vd2port:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: VD\n virtualDevice:\n type: EDGE\n uuid: \u003cdevice_uuid\u003e\n interface:\n type: NETWORK\n id: 7\n zSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003czside_port_uuid\u003e\n linkProtocol:\n type: DOT1Q\n vlanSTag: '3711'\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 12\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst fcr2Network = new equinix.fabric.Connection(\"fcr2network\", {\n name: \"ConnectionName\",\n type: \"IPWAN_VC\",\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: \"CLOUD_ROUTER\",\n router: {\n uuid: \"\u003ccloud_router_uuid\u003e\",\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Network,\n network: {\n uuid: \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nfcr2_network = equinix.fabric.Connection(\"fcr2network\",\n name=\"ConnectionName\",\n type=\"IPWAN_VC\",\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=\"CLOUD_ROUTER\",\n router=equinix.fabric.ConnectionASideAccessPointRouterArgs(\n uuid=\"\u003ccloud_router_uuid\u003e\",\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.NETWORK,\n network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(\n uuid=\"\u003cnetwork_uuid\u003e\",\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"fcr2network\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(\"IPWAN_VC\"),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(\"CLOUD_ROUTER\"),\n\t\t\t\t\tRouter: \u0026fabric.ConnectionASideAccessPointRouterArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003ccloud_router_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeNetwork),\n\t\t\t\t\tNetwork: \u0026fabric.ConnectionZSideAccessPointNetworkArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cnetwork_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var fcr2Network = new Equinix.Fabric.Connection(\"fcr2network\", new()\n {\n Name = \"ConnectionName\",\n Type = \"IPWAN_VC\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = \"CLOUD_ROUTER\",\n Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs\n {\n Uuid = \"\u003ccloud_router_uuid\u003e\",\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Network,\n Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs\n {\n Uuid = \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var fcr2Network = new Connection(\"fcr2Network\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"IPWAN_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"CLOUD_ROUTER\")\n .router(ConnectionASideAccessPointRouterArgs.builder()\n .uuid(\"\u003ccloud_router_uuid\u003e\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"NETWORK\")\n .network(ConnectionZSideAccessPointNetworkArgs.builder()\n .uuid(\"\u003cnetwork_uuid\u003e\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n fcr2network:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: IPWAN_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: CLOUD_ROUTER\n router:\n uuid: \u003ccloud_router_uuid\u003e\n zSide:\n accessPoint:\n type: NETWORK\n network:\n uuid: \u003cnetwork_uuid\u003e\n```\n{{% /example %}}\n\n{{% example %}}\n### example 11\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst vd2AzurePrimary = new equinix.fabric.Connection(\"vd2azurePrimary\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n redundancy: {\n priority: \"PRIMARY\",\n },\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.VD,\n virtualDevice: {\n type: \"EDGE\",\n uuid: \"\u003cdevice_uuid\u003e\",\n },\n \"interface\": {\n type: \"CLOUD\",\n id: 7,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.SP,\n authenticationKey: \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peeringType: equinix.fabric.AccessPointPeeringType.Private,\n profile: {\n type: equinix.fabric.ProfileType.L2Profile,\n uuid: \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\nconst vd2AzureSecondary = new equinix.fabric.Connection(\"vd2azureSecondary\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n redundancy: {\n priority: \"SECONDARY\",\n group: vd2AzurePrimary.redundancy.apply(redundancy =\u003e redundancy?.group),\n },\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.VD,\n virtualDevice: {\n type: \"EDGE\",\n uuid: \"\u003cdevice_uuid\u003e\",\n },\n \"interface\": {\n type: \"CLOUD\",\n id: 5,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.SP,\n authenticationKey: \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peeringType: equinix.fabric.AccessPointPeeringType.Private,\n profile: {\n type: equinix.fabric.ProfileType.L2Profile,\n uuid: \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nvd2_azure_primary = equinix.fabric.Connection(\"vd2azurePrimary\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n redundancy=equinix.fabric.ConnectionRedundancyArgs(\n priority=\"PRIMARY\",\n ),\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.VD,\n virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(\n type=\"EDGE\",\n uuid=\"\u003cdevice_uuid\u003e\",\n ),\n interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(\n type=\"CLOUD\",\n id=7,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.SP,\n authentication_key=\"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,\n profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(\n type=equinix.fabric.ProfileType.L2_PROFILE,\n uuid=\"\u003cAzure_Service_Profile_UUID\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\nvd2_azure_secondary = equinix.fabric.Connection(\"vd2azureSecondary\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n redundancy=equinix.fabric.ConnectionRedundancyArgs(\n priority=\"SECONDARY\",\n group=vd2_azure_primary.redundancy.group,\n ),\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.VD,\n virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(\n type=\"EDGE\",\n uuid=\"\u003cdevice_uuid\u003e\",\n ),\n interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(\n type=\"CLOUD\",\n id=5,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.SP,\n authentication_key=\"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,\n profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(\n type=equinix.fabric.ProfileType.L2_PROFILE,\n uuid=\"\u003cAzure_Service_Profile_UUID\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tvd2AzurePrimary, err := fabric.NewConnection(ctx, \"vd2azurePrimary\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tRedundancy: \u0026fabric.ConnectionRedundancyArgs{\n\t\t\t\tPriority: pulumi.String(\"PRIMARY\"),\n\t\t\t},\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeVD),\n\t\t\t\t\tVirtualDevice: \u0026fabric.ConnectionASideAccessPointVirtualDeviceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"EDGE\"),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cdevice_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tInterface: \u0026fabric.ConnectionASideAccessPointInterfaceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"CLOUD\"),\n\t\t\t\t\t\tId: pulumi.Int(7),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeSP),\n\t\t\t\t\tAuthenticationKey: pulumi.String(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\"),\n\t\t\t\t\tPeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate),\n\t\t\t\t\tProfile: \u0026fabric.ConnectionZSideAccessPointProfileArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.ProfileTypeL2Profile),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cAzure_Service_Profile_UUID\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fabric.NewConnection(ctx, \"vd2azureSecondary\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tRedundancy: \u0026fabric.ConnectionRedundancyArgs{\n\t\t\t\tPriority: pulumi.String(\"SECONDARY\"),\n\t\t\t\tGroup: vd2AzurePrimary.Redundancy.ApplyT(func(redundancy fabric.ConnectionRedundancy) (*string, error) {\n\t\t\t\t\treturn \u0026redundancy.Group, nil\n\t\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\t},\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeVD),\n\t\t\t\t\tVirtualDevice: \u0026fabric.ConnectionASideAccessPointVirtualDeviceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"EDGE\"),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cdevice_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tInterface: \u0026fabric.ConnectionASideAccessPointInterfaceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"CLOUD\"),\n\t\t\t\t\t\tId: pulumi.Int(5),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeSP),\n\t\t\t\t\tAuthenticationKey: pulumi.String(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\"),\n\t\t\t\t\tPeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate),\n\t\t\t\t\tProfile: \u0026fabric.ConnectionZSideAccessPointProfileArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.ProfileTypeL2Profile),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cAzure_Service_Profile_UUID\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vd2AzurePrimary = new Equinix.Fabric.Connection(\"vd2azurePrimary\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs\n {\n Priority = \"PRIMARY\",\n },\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.VD,\n VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs\n {\n Type = \"EDGE\",\n Uuid = \"\u003cdevice_uuid\u003e\",\n },\n Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs\n {\n Type = \"CLOUD\",\n Id = 7,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.SP,\n AuthenticationKey = \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n PeeringType = Equinix.Fabric.AccessPointPeeringType.Private,\n Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs\n {\n Type = Equinix.Fabric.ProfileType.L2Profile,\n Uuid = \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n var vd2AzureSecondary = new Equinix.Fabric.Connection(\"vd2azureSecondary\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs\n {\n Priority = \"SECONDARY\",\n Group = vd2AzurePrimary.Redundancy.Apply(redundancy =\u003e redundancy?.Group),\n },\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.VD,\n VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs\n {\n Type = \"EDGE\",\n Uuid = \"\u003cdevice_uuid\u003e\",\n },\n Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs\n {\n Type = \"CLOUD\",\n Id = 5,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.SP,\n AuthenticationKey = \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n PeeringType = Equinix.Fabric.AccessPointPeeringType.Private,\n Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs\n {\n Type = Equinix.Fabric.ProfileType.L2Profile,\n Uuid = \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vd2AzurePrimary = new Connection(\"vd2AzurePrimary\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .redundancy(ConnectionRedundancyArgs.builder()\n .priority(\"PRIMARY\")\n .build())\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"VD\")\n .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()\n .type(\"EDGE\")\n .uuid(\"\u003cdevice_uuid\u003e\")\n .build())\n .interface_(ConnectionASideAccessPointInterfaceArgs.builder()\n .type(\"CLOUD\")\n .id(7)\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"SP\")\n .authenticationKey(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\")\n .peeringType(\"PRIVATE\")\n .profile(ConnectionZSideAccessPointProfileArgs.builder()\n .type(\"L2_PROFILE\")\n .uuid(\"\u003cAzure_Service_Profile_UUID\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n var vd2AzureSecondary = new Connection(\"vd2AzureSecondary\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .redundancy(ConnectionRedundancyArgs.builder()\n .priority(\"SECONDARY\")\n .group(vd2AzurePrimary.redundancy().applyValue(redundancy -\u003e redundancy.group()))\n .build())\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"VD\")\n .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()\n .type(\"EDGE\")\n .uuid(\"\u003cdevice_uuid\u003e\")\n .build())\n .interface_(ConnectionASideAccessPointInterfaceArgs.builder()\n .type(\"CLOUD\")\n .id(5)\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"SP\")\n .authenticationKey(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\")\n .peeringType(\"PRIVATE\")\n .profile(ConnectionZSideAccessPointProfileArgs.builder()\n .type(\"L2_PROFILE\")\n .uuid(\"\u003cAzure_Service_Profile_UUID\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n vd2azurePrimary:\n type: equinix:fabric:Connection\n name: vd2azure_primary\n properties:\n name: ConnectionName\n type: EVPL_VC\n redundancy:\n priority: PRIMARY\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: VD\n virtualDevice:\n type: EDGE\n uuid: \u003cdevice_uuid\u003e\n interface:\n type: CLOUD\n id: 7\n zSide:\n accessPoint:\n type: SP\n authenticationKey: \u003cAzure_ExpressRouter_Auth_Key\u003e\n peeringType: PRIVATE\n profile:\n type: L2_PROFILE\n uuid: \u003cAzure_Service_Profile_UUID\u003e\n location:\n metroCode: SV\n vd2azureSecondary:\n type: equinix:fabric:Connection\n name: vd2azure_secondary\n properties:\n name: ConnectionName\n type: EVPL_VC\n redundancy:\n priority: SECONDARY\n group: ${vd2azurePrimary.redundancy.group}\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: VD\n virtualDevice:\n type: EDGE\n uuid: \u003cdevice_uuid\u003e\n interface:\n type: CLOUD\n id: 5\n zSide:\n accessPoint:\n type: SP\n authenticationKey: \u003cAzure_ExpressRouter_Auth_Key\u003e\n peeringType: PRIVATE\n profile:\n type: L2_PROFILE\n uuid: \u003cAzure_Service_Profile_UUID\u003e\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 6\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst vd2Token = new equinix.fabric.Connection(\"vd2token\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.VD,\n virtualDevice: {\n type: \"EDGE\",\n uuid: \"\u003cdevice_uuid\u003e\",\n },\n \"interface\": {\n type: \"NETWORK\",\n id: 7,\n },\n },\n },\n zSide: {\n serviceToken: {\n uuid: \"\u003cservice_token_uuid\u003e\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nvd2_token = equinix.fabric.Connection(\"vd2token\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.VD,\n virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(\n type=\"EDGE\",\n uuid=\"\u003cdevice_uuid\u003e\",\n ),\n interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(\n type=\"NETWORK\",\n id=7,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n service_token=equinix.fabric.ConnectionZSideServiceTokenArgs(\n uuid=\"\u003cservice_token_uuid\u003e\",\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"vd2token\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeVD),\n\t\t\t\t\tVirtualDevice: \u0026fabric.ConnectionASideAccessPointVirtualDeviceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"EDGE\"),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cdevice_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tInterface: \u0026fabric.ConnectionASideAccessPointInterfaceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"NETWORK\"),\n\t\t\t\t\t\tId: pulumi.Int(7),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tServiceToken: \u0026fabric.ConnectionZSideServiceTokenArgs{\n\t\t\t\t\tUuid: pulumi.String(\"\u003cservice_token_uuid\u003e\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vd2Token = new Equinix.Fabric.Connection(\"vd2token\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.VD,\n VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs\n {\n Type = \"EDGE\",\n Uuid = \"\u003cdevice_uuid\u003e\",\n },\n Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs\n {\n Type = \"NETWORK\",\n Id = 7,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n ServiceToken = new Equinix.Fabric.Inputs.ConnectionZSideServiceTokenArgs\n {\n Uuid = \"\u003cservice_token_uuid\u003e\",\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideServiceTokenArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vd2Token = new Connection(\"vd2Token\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"VD\")\n .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()\n .type(\"EDGE\")\n .uuid(\"\u003cdevice_uuid\u003e\")\n .build())\n .interface_(ConnectionASideAccessPointInterfaceArgs.builder()\n .type(\"NETWORK\")\n .id(7)\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .serviceToken(ConnectionZSideServiceTokenArgs.builder()\n .uuid(\"\u003cservice_token_uuid\u003e\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n vd2token:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: VD\n virtualDevice:\n type: EDGE\n uuid: \u003cdevice_uuid\u003e\n interface:\n type: NETWORK\n id: 7\n zSide:\n serviceToken:\n uuid: \u003cservice_token_uuid\u003e\n```\n{{% /example %}}\n\n{{% example %}}\n### example 3\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst epl = new equinix.fabric.Connection(\"epl\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003caside_port_uuid\u003e\",\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003czside_port_uuid\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nepl = equinix.fabric.Connection(\"epl\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionASideAccessPointPortArgs(\n uuid=\"\u003caside_port_uuid\u003e\",\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionZSideAccessPointPortArgs(\n uuid=\"\u003czside_port_uuid\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"epl\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionASideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003caside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionZSideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003czside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var epl = new Equinix.Fabric.Connection(\"epl\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs\n {\n Uuid = \"\u003caside_port_uuid\u003e\",\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs\n {\n Uuid = \"\u003czside_port_uuid\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var epl = new Connection(\"epl\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionASideAccessPointPortArgs.builder()\n .uuid(\"\u003caside_port_uuid\u003e\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionZSideAccessPointPortArgs.builder()\n .uuid(\"\u003czside_port_uuid\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n epl:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003caside_port_uuid\u003e\n zSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003czside_port_uuid\u003e\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 14\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst epl = new equinix.fabric.Connection(\"epl\", {\n name: \"ConnectionName\",\n type: \"EPLAN_VC\",\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003caside_port_uuid\u003e\",\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Network,\n network: {\n uuid: \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nepl = equinix.fabric.Connection(\"epl\",\n name=\"ConnectionName\",\n type=\"EPLAN_VC\",\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionASideAccessPointPortArgs(\n uuid=\"\u003caside_port_uuid\u003e\",\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.NETWORK,\n network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(\n uuid=\"\u003cnetwork_uuid\u003e\",\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"epl\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(\"EPLAN_VC\"),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionASideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003caside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeNetwork),\n\t\t\t\t\tNetwork: \u0026fabric.ConnectionZSideAccessPointNetworkArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cnetwork_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var epl = new Equinix.Fabric.Connection(\"epl\", new()\n {\n Name = \"ConnectionName\",\n Type = \"EPLAN_VC\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs\n {\n Uuid = \"\u003caside_port_uuid\u003e\",\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Network,\n Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs\n {\n Uuid = \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var epl = new Connection(\"epl\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EPLAN_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionASideAccessPointPortArgs.builder()\n .uuid(\"\u003caside_port_uuid\u003e\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"NETWORK\")\n .network(ConnectionZSideAccessPointNetworkArgs.builder()\n .uuid(\"\u003cnetwork_uuid\u003e\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n epl:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EPLAN_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003caside_port_uuid\u003e\n zSide:\n accessPoint:\n type: NETWORK\n network:\n uuid: \u003cnetwork_uuid\u003e\n```\n{{% /example %}}\n\n{{% example %}}\n### example 4\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst accessEplVc = new equinix.fabric.Connection(\"accessEplVc\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.AccessEPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003caside_port_uuid\u003e\",\n },\n linkProtocol: {\n type: equinix.fabric.AccessPointLinkProtocolType.QinQ,\n vlanSTag: 1976,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003czside_port_uuid\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\naccess_epl_vc = equinix.fabric.Connection(\"accessEplVc\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.ACCESS_EPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionASideAccessPointPortArgs(\n uuid=\"\u003caside_port_uuid\u003e\",\n ),\n link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(\n type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,\n vlan_s_tag=1976,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionZSideAccessPointPortArgs(\n uuid=\"\u003czside_port_uuid\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"accessEplVc\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeAccessEPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionASideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003caside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionASideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ),\n\t\t\t\t\t\tVlanSTag: pulumi.Int(1976),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionZSideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003czside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var accessEplVc = new Equinix.Fabric.Connection(\"accessEplVc\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.AccessEPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs\n {\n Uuid = \"\u003caside_port_uuid\u003e\",\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs\n {\n Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ,\n VlanSTag = 1976,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs\n {\n Uuid = \"\u003czside_port_uuid\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var accessEplVc = new Connection(\"accessEplVc\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"ACCESS_EPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionASideAccessPointPortArgs.builder()\n .uuid(\"\u003caside_port_uuid\u003e\")\n .build())\n .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()\n .type(\"QINQ\")\n .vlanSTag(\"1976\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionZSideAccessPointPortArgs.builder()\n .uuid(\"\u003czside_port_uuid\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n accessEplVc:\n type: equinix:fabric:Connection\n name: access_epl_vc\n properties:\n name: ConnectionName\n type: ACCESS_EPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003caside_port_uuid\u003e\n linkProtocol:\n type: QINQ\n vlanSTag: '1976'\n zSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003czside_port_uuid\u003e\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 13\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst vd2Token = new equinix.fabric.Connection(\"vd2token\", {\n name: \"ConnectionName\",\n type: \"EVPLAN_VC\",\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.VD,\n virtualDevice: {\n type: \"EDGE\",\n uuid: \"\u003cdevice_uuid\u003e\",\n },\n \"interface\": {\n type: \"CLOUD\",\n id: 7,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Network,\n network: {\n uuid: \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nvd2_token = equinix.fabric.Connection(\"vd2token\",\n name=\"ConnectionName\",\n type=\"EVPLAN_VC\",\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.VD,\n virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(\n type=\"EDGE\",\n uuid=\"\u003cdevice_uuid\u003e\",\n ),\n interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(\n type=\"CLOUD\",\n id=7,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.NETWORK,\n network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(\n uuid=\"\u003cnetwork_uuid\u003e\",\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"vd2token\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(\"EVPLAN_VC\"),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeVD),\n\t\t\t\t\tVirtualDevice: \u0026fabric.ConnectionASideAccessPointVirtualDeviceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"EDGE\"),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cdevice_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tInterface: \u0026fabric.ConnectionASideAccessPointInterfaceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"CLOUD\"),\n\t\t\t\t\t\tId: pulumi.Int(7),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeNetwork),\n\t\t\t\t\tNetwork: \u0026fabric.ConnectionZSideAccessPointNetworkArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cnetwork_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vd2Token = new Equinix.Fabric.Connection(\"vd2token\", new()\n {\n Name = \"ConnectionName\",\n Type = \"EVPLAN_VC\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.VD,\n VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs\n {\n Type = \"EDGE\",\n Uuid = \"\u003cdevice_uuid\u003e\",\n },\n Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs\n {\n Type = \"CLOUD\",\n Id = 7,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Network,\n Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs\n {\n Uuid = \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vd2Token = new Connection(\"vd2Token\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPLAN_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"VD\")\n .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()\n .type(\"EDGE\")\n .uuid(\"\u003cdevice_uuid\u003e\")\n .build())\n .interface_(ConnectionASideAccessPointInterfaceArgs.builder()\n .type(\"CLOUD\")\n .id(7)\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"NETWORK\")\n .network(ConnectionZSideAccessPointNetworkArgs.builder()\n .uuid(\"\u003cnetwork_uuid\u003e\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n vd2token:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPLAN_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: VD\n virtualDevice:\n type: EDGE\n uuid: \u003cdevice_uuid\u003e\n interface:\n type: CLOUD\n id: 7\n zSide:\n accessPoint:\n type: NETWORK\n network:\n uuid: \u003cnetwork_uuid\u003e\n```\n{{% /example %}}\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst port2Port = new equinix.fabric.Connection(\"port2port\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003caside_port_uuid\u003e\",\n },\n linkProtocol: {\n type: equinix.fabric.AccessPointLinkProtocolType.QinQ,\n vlanSTag: 1976,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003czside_port_uuid\u003e\",\n },\n linkProtocol: {\n type: equinix.fabric.AccessPointLinkProtocolType.QinQ,\n vlanSTag: 3711,\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nport2_port = equinix.fabric.Connection(\"port2port\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionASideAccessPointPortArgs(\n uuid=\"\u003caside_port_uuid\u003e\",\n ),\n link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(\n type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,\n vlan_s_tag=1976,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionZSideAccessPointPortArgs(\n uuid=\"\u003czside_port_uuid\u003e\",\n ),\n link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(\n type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,\n vlan_s_tag=3711,\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"port2port\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionASideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003caside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionASideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ),\n\t\t\t\t\t\tVlanSTag: pulumi.Int(1976),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionZSideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003czside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionZSideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ),\n\t\t\t\t\t\tVlanSTag: pulumi.Int(3711),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var port2Port = new Equinix.Fabric.Connection(\"port2port\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs\n {\n Uuid = \"\u003caside_port_uuid\u003e\",\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs\n {\n Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ,\n VlanSTag = 1976,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs\n {\n Uuid = \"\u003czside_port_uuid\u003e\",\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs\n {\n Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ,\n VlanSTag = 3711,\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var port2Port = new Connection(\"port2Port\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionASideAccessPointPortArgs.builder()\n .uuid(\"\u003caside_port_uuid\u003e\")\n .build())\n .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()\n .type(\"QINQ\")\n .vlanSTag(\"1976\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionZSideAccessPointPortArgs.builder()\n .uuid(\"\u003czside_port_uuid\u003e\")\n .build())\n .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder()\n .type(\"QINQ\")\n .vlanSTag(\"3711\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n port2port:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003caside_port_uuid\u003e\n linkProtocol:\n type: QINQ\n vlanSTag: '1976'\n zSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003czside_port_uuid\u003e\n linkProtocol:\n type: QINQ\n vlanSTag: '3711'\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 8\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst fcr2Port = new equinix.fabric.Connection(\"fcr2port\", {\n name: \"ConnectionName\",\n type: \"IP_VC\",\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: \"CLOUD_ROUTER\",\n router: {\n uuid: \"\u003ccloud_router_uuid\u003e\",\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003cport_uuid\u003e\",\n },\n linkProtocol: {\n type: equinix.fabric.AccessPointLinkProtocolType.Dot1q,\n vlanTag: 2711,\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nfcr2_port = equinix.fabric.Connection(\"fcr2port\",\n name=\"ConnectionName\",\n type=\"IP_VC\",\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=\"CLOUD_ROUTER\",\n router=equinix.fabric.ConnectionASideAccessPointRouterArgs(\n uuid=\"\u003ccloud_router_uuid\u003e\",\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionZSideAccessPointPortArgs(\n uuid=\"\u003cport_uuid\u003e\",\n ),\n link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(\n type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,\n vlan_tag=2711,\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"fcr2port\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(\"IP_VC\"),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(\"CLOUD_ROUTER\"),\n\t\t\t\t\tRouter: \u0026fabric.ConnectionASideAccessPointRouterArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003ccloud_router_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionZSideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cport_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionZSideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q),\n\t\t\t\t\t\tVlanTag: pulumi.Int(2711),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var fcr2Port = new Equinix.Fabric.Connection(\"fcr2port\", new()\n {\n Name = \"ConnectionName\",\n Type = \"IP_VC\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = \"CLOUD_ROUTER\",\n Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs\n {\n Uuid = \"\u003ccloud_router_uuid\u003e\",\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs\n {\n Uuid = \"\u003cport_uuid\u003e\",\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs\n {\n Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q,\n VlanTag = 2711,\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var fcr2Port = new Connection(\"fcr2Port\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"IP_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"CLOUD_ROUTER\")\n .router(ConnectionASideAccessPointRouterArgs.builder()\n .uuid(\"\u003ccloud_router_uuid\u003e\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionZSideAccessPointPortArgs.builder()\n .uuid(\"\u003cport_uuid\u003e\")\n .build())\n .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder()\n .type(\"DOT1Q\")\n .vlanTag(\"2711\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n fcr2port:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: IP_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: CLOUD_ROUTER\n router:\n uuid: \u003ccloud_router_uuid\u003e\n zSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003cport_uuid\u003e\n linkProtocol:\n type: DOT1Q\n vlanTag: '2711'\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst port2Aws = new equinix.fabric.Connection(\"port2aws\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n redundancy: {\n priority: \"PRIMARY\",\n },\n order: {\n purchaseOrderNumber: \"1-323929\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003caside_port_uuid\u003e\",\n },\n linkProtocol: {\n type: equinix.fabric.AccessPointLinkProtocolType.QinQ,\n vlanSTag: 2019,\n vlanCTag: 2112,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.SP,\n authenticationKey: \"\u003caws_account_id\u003e\",\n sellerRegion: \"us-west-1\",\n profile: {\n type: equinix.fabric.ProfileType.L2Profile,\n uuid: \"\u003cservice_profile_uuid\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n additionalInfo: [\n {\n key: \"accessKey\",\n value: \"\u003caws_access_key\u003e\",\n },\n {\n key: \"secretKey\",\n value: \"\u003caws_secret_key\u003e\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nport2_aws = equinix.fabric.Connection(\"port2aws\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n redundancy=equinix.fabric.ConnectionRedundancyArgs(\n priority=\"PRIMARY\",\n ),\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323929\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionASideAccessPointPortArgs(\n uuid=\"\u003caside_port_uuid\u003e\",\n ),\n link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(\n type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,\n vlan_s_tag=2019,\n vlan_c_tag=2112,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.SP,\n authentication_key=\"\u003caws_account_id\u003e\",\n seller_region=\"us-west-1\",\n profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(\n type=equinix.fabric.ProfileType.L2_PROFILE,\n uuid=\"\u003cservice_profile_uuid\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ),\n additional_info=[\n {\n \"key\": \"accessKey\",\n \"value\": \"\u003caws_access_key\u003e\",\n },\n {\n \"key\": \"secretKey\",\n \"value\": \"\u003caws_secret_key\u003e\",\n },\n ])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"port2aws\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tRedundancy: \u0026fabric.ConnectionRedundancyArgs{\n\t\t\t\tPriority: pulumi.String(\"PRIMARY\"),\n\t\t\t},\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323929\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionASideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003caside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionASideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ),\n\t\t\t\t\t\tVlanSTag: pulumi.Int(2019),\n\t\t\t\t\t\tVlanCTag: pulumi.Int(2112),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeSP),\n\t\t\t\t\tAuthenticationKey: pulumi.String(\"\u003caws_account_id\u003e\"),\n\t\t\t\t\tSellerRegion: pulumi.String(\"us-west-1\"),\n\t\t\t\t\tProfile: \u0026fabric.ConnectionZSideAccessPointProfileArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.ProfileTypeL2Profile),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cservice_profile_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tAdditionalInfo: pulumi.MapArray{\n\t\t\t\tpulumi.Map{\n\t\t\t\t\t\"key\": pulumi.Any(\"accessKey\"),\n\t\t\t\t\t\"value\": pulumi.Any(\"\u003caws_access_key\u003e\"),\n\t\t\t\t},\n\t\t\t\tpulumi.Map{\n\t\t\t\t\t\"key\": pulumi.Any(\"secretKey\"),\n\t\t\t\t\t\"value\": pulumi.Any(\"\u003caws_secret_key\u003e\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var port2Aws = new Equinix.Fabric.Connection(\"port2aws\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs\n {\n Priority = \"PRIMARY\",\n },\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323929\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs\n {\n Uuid = \"\u003caside_port_uuid\u003e\",\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs\n {\n Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ,\n VlanSTag = 2019,\n VlanCTag = 2112,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.SP,\n AuthenticationKey = \"\u003caws_account_id\u003e\",\n SellerRegion = \"us-west-1\",\n Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs\n {\n Type = Equinix.Fabric.ProfileType.L2Profile,\n Uuid = \"\u003cservice_profile_uuid\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n AdditionalInfo = new[]\n {\n \n {\n { \"key\", \"accessKey\" },\n { \"value\", \"\u003caws_access_key\u003e\" },\n },\n \n {\n { \"key\", \"secretKey\" },\n { \"value\", \"\u003caws_secret_key\u003e\" },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var port2Aws = new Connection(\"port2Aws\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .redundancy(ConnectionRedundancyArgs.builder()\n .priority(\"PRIMARY\")\n .build())\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323929\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionASideAccessPointPortArgs.builder()\n .uuid(\"\u003caside_port_uuid\u003e\")\n .build())\n .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()\n .type(\"QINQ\")\n .vlanSTag(\"2019\")\n .vlanCTag(\"2112\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"SP\")\n .authenticationKey(\"\u003caws_account_id\u003e\")\n .sellerRegion(\"us-west-1\")\n .profile(ConnectionZSideAccessPointProfileArgs.builder()\n .type(\"L2_PROFILE\")\n .uuid(\"\u003cservice_profile_uuid\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .additionalInfo( \n Map.ofEntries(\n Map.entry(\"key\", \"accessKey\"),\n Map.entry(\"value\", \"\u003caws_access_key\u003e\")\n ),\n Map.ofEntries(\n Map.entry(\"key\", \"secretKey\"),\n Map.entry(\"value\", \"\u003caws_secret_key\u003e\")\n ))\n .build());\n\n }\n}\n```\n```yaml\n port2aws:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n redundancy:\n priority: PRIMARY\n order:\n purchaseOrderNumber: 1-323929\n aSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003caside_port_uuid\u003e\n linkProtocol:\n type: QINQ\n vlanSTag: '2019'\n vlanCTag: '2112'\n zSide:\n accessPoint:\n type: SP\n authenticationKey: \u003caws_account_id\u003e\n sellerRegion: us-west-1\n profile:\n type: L2_PROFILE\n uuid: \u003cservice_profile_uuid\u003e\n location:\n metroCode: SV\n additionalInfo:\n - key: accessKey\n value: \u003caws_access_key\u003e\n - key: secretKey\n value: \u003caws_secret_key\u003e\n```\n{{% /example %}}\n\n{{% example %}}\n### example 15\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst epl = new equinix.fabric.Connection(\"epl\", {\n name: \"ConnectionName\",\n type: \"EVPLAN_VC\",\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Colo,\n port: {\n uuid: \"\u003caside_port_uuid\u003e\",\n },\n linkProtocol: {\n type: equinix.fabric.AccessPointLinkProtocolType.Dot1q,\n vlanSTag: 1976,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.Network,\n network: {\n uuid: \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nepl = equinix.fabric.Connection(\"epl\",\n name=\"ConnectionName\",\n type=\"EVPLAN_VC\",\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.COLO,\n port=equinix.fabric.ConnectionASideAccessPointPortArgs(\n uuid=\"\u003caside_port_uuid\u003e\",\n ),\n link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(\n type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,\n vlan_s_tag=1976,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.NETWORK,\n network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(\n uuid=\"\u003cnetwork_uuid\u003e\",\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"epl\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(\"EVPLAN_VC\"),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeColo),\n\t\t\t\t\tPort: \u0026fabric.ConnectionASideAccessPointPortArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003caside_port_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLinkProtocol: \u0026fabric.ConnectionASideAccessPointLinkProtocolArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q),\n\t\t\t\t\t\tVlanSTag: pulumi.Int(1976),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeNetwork),\n\t\t\t\t\tNetwork: \u0026fabric.ConnectionZSideAccessPointNetworkArgs{\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cnetwork_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var epl = new Equinix.Fabric.Connection(\"epl\", new()\n {\n Name = \"ConnectionName\",\n Type = \"EVPLAN_VC\",\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Colo,\n Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs\n {\n Uuid = \"\u003caside_port_uuid\u003e\",\n },\n LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs\n {\n Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q,\n VlanSTag = 1976,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.Network,\n Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs\n {\n Uuid = \"\u003cnetwork_uuid\u003e\",\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var epl = new Connection(\"epl\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPLAN_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"COLO\")\n .port(ConnectionASideAccessPointPortArgs.builder()\n .uuid(\"\u003caside_port_uuid\u003e\")\n .build())\n .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()\n .type(\"DOT1Q\")\n .vlanSTag(\"1976\")\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"NETWORK\")\n .network(ConnectionZSideAccessPointNetworkArgs.builder()\n .uuid(\"\u003cnetwork_uuid\u003e\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n epl:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPLAN_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: COLO\n port:\n uuid: \u003caside_port_uuid\u003e\n linkProtocol:\n type: DOT1Q\n vlanSTag: '1976'\n zSide:\n accessPoint:\n type: NETWORK\n network:\n uuid: \u003cnetwork_uuid\u003e\n```\n{{% /example %}}\n\n{{% example %}}\n### example 10\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst vd2Azure = new equinix.fabric.Connection(\"vd2azure\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.VD,\n virtualDevice: {\n type: \"EDGE\",\n uuid: \"\u003cdevice_uuid\u003e\",\n },\n \"interface\": {\n type: \"CLOUD\",\n id: 7,\n },\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.SP,\n authenticationKey: \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peeringType: equinix.fabric.AccessPointPeeringType.Private,\n profile: {\n type: equinix.fabric.ProfileType.L2Profile,\n uuid: \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nvd2_azure = equinix.fabric.Connection(\"vd2azure\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n access_point=equinix.fabric.ConnectionASideAccessPointArgs(\n type=equinix.fabric.AccessPointType.VD,\n virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(\n type=\"EDGE\",\n uuid=\"\u003cdevice_uuid\u003e\",\n ),\n interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(\n type=\"CLOUD\",\n id=7,\n ),\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.SP,\n authentication_key=\"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,\n profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(\n type=equinix.fabric.ProfileType.L2_PROFILE,\n uuid=\"\u003cAzure_Service_Profile_UUID\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"vd2azure\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionASideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeVD),\n\t\t\t\t\tVirtualDevice: \u0026fabric.ConnectionASideAccessPointVirtualDeviceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"EDGE\"),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cdevice_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tInterface: \u0026fabric.ConnectionASideAccessPointInterfaceArgs{\n\t\t\t\t\t\tType: pulumi.String(\"CLOUD\"),\n\t\t\t\t\t\tId: pulumi.Int(7),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeSP),\n\t\t\t\t\tAuthenticationKey: pulumi.String(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\"),\n\t\t\t\t\tPeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate),\n\t\t\t\t\tProfile: \u0026fabric.ConnectionZSideAccessPointProfileArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.ProfileTypeL2Profile),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cAzure_Service_Profile_UUID\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vd2Azure = new Equinix.Fabric.Connection(\"vd2azure\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.VD,\n VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs\n {\n Type = \"EDGE\",\n Uuid = \"\u003cdevice_uuid\u003e\",\n },\n Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs\n {\n Type = \"CLOUD\",\n Id = 7,\n },\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.SP,\n AuthenticationKey = \"\u003cAzure_ExpressRouter_Auth_Key\u003e\",\n PeeringType = Equinix.Fabric.AccessPointPeeringType.Private,\n Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs\n {\n Type = Equinix.Fabric.ProfileType.L2Profile,\n Uuid = \"\u003cAzure_Service_Profile_UUID\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vd2Azure = new Connection(\"vd2Azure\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .accessPoint(ConnectionASideAccessPointArgs.builder()\n .type(\"VD\")\n .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()\n .type(\"EDGE\")\n .uuid(\"\u003cdevice_uuid\u003e\")\n .build())\n .interface_(ConnectionASideAccessPointInterfaceArgs.builder()\n .type(\"CLOUD\")\n .id(7)\n .build())\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"SP\")\n .authenticationKey(\"\u003cAzure_ExpressRouter_Auth_Key\u003e\")\n .peeringType(\"PRIVATE\")\n .profile(ConnectionZSideAccessPointProfileArgs.builder()\n .type(\"L2_PROFILE\")\n .uuid(\"\u003cAzure_Service_Profile_UUID\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n vd2azure:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n accessPoint:\n type: VD\n virtualDevice:\n type: EDGE\n uuid: \u003cdevice_uuid\u003e\n interface:\n type: CLOUD\n id: 7\n zSide:\n accessPoint:\n type: SP\n authenticationKey: \u003cAzure_ExpressRouter_Auth_Key\u003e\n peeringType: PRIVATE\n profile:\n type: L2_PROFILE\n uuid: \u003cAzure_Service_Profile_UUID\u003e\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 7\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst token2Aws = new equinix.fabric.Connection(\"token2aws\", {\n name: \"ConnectionName\",\n type: equinix.fabric.ConnectionType.EVPL,\n notifications: [{\n type: equinix.fabric.NotificationsType.All,\n emails: [\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n }],\n bandwidth: 50,\n order: {\n purchaseOrderNumber: \"1-323292\",\n },\n aSide: {\n serviceToken: {\n uuid: \"\u003cservice_token_uuid\u003e\",\n },\n },\n zSide: {\n accessPoint: {\n type: equinix.fabric.AccessPointType.SP,\n authenticationKey: \"\u003caws_account_id\u003e\",\n sellerRegion: \"us-west-1\",\n profile: {\n type: equinix.fabric.ProfileType.L2Profile,\n uuid: \"\u003cservice_profile_uuid\u003e\",\n },\n location: {\n metroCode: equinix.index.Metro.SiliconValley,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntoken2_aws = equinix.fabric.Connection(\"token2aws\",\n name=\"ConnectionName\",\n type=equinix.fabric.ConnectionType.EVPL,\n notifications=[equinix.fabric.ConnectionNotificationArgs(\n type=equinix.fabric.NotificationsType.ALL,\n emails=[\n \"example@equinix.com\",\n \"test1@equinix.com\",\n ],\n )],\n bandwidth=50,\n order=equinix.fabric.ConnectionOrderArgs(\n purchase_order_number=\"1-323292\",\n ),\n a_side=equinix.fabric.ConnectionASideArgs(\n service_token=equinix.fabric.ConnectionASideServiceTokenArgs(\n uuid=\"\u003cservice_token_uuid\u003e\",\n ),\n ),\n z_side=equinix.fabric.ConnectionZSideArgs(\n access_point=equinix.fabric.ConnectionZSideAccessPointArgs(\n type=equinix.fabric.AccessPointType.SP,\n authentication_key=\"\u003caws_account_id\u003e\",\n seller_region=\"us-west-1\",\n profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(\n type=equinix.fabric.ProfileType.L2_PROFILE,\n uuid=\"\u003cservice_profile_uuid\u003e\",\n ),\n location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(\n metro_code=equinix.Metro.SILICON_VALLEY,\n ),\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewConnection(ctx, \"token2aws\", \u0026fabric.ConnectionArgs{\n\t\t\tName: pulumi.String(\"ConnectionName\"),\n\t\t\tType: pulumi.String(fabric.ConnectionTypeEVPL),\n\t\t\tNotifications: fabric.ConnectionNotificationArray{\n\t\t\t\t\u0026fabric.ConnectionNotificationArgs{\n\t\t\t\t\tType: pulumi.String(fabric.NotificationsTypeAll),\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t\t\t\tpulumi.String(\"test1@equinix.com\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBandwidth: pulumi.Int(50),\n\t\t\tOrder: \u0026fabric.ConnectionOrderArgs{\n\t\t\t\tPurchaseOrderNumber: pulumi.String(\"1-323292\"),\n\t\t\t},\n\t\t\tASide: \u0026fabric.ConnectionASideArgs{\n\t\t\t\tServiceToken: \u0026fabric.ConnectionASideServiceTokenArgs{\n\t\t\t\t\tUuid: pulumi.String(\"\u003cservice_token_uuid\u003e\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tZSide: \u0026fabric.ConnectionZSideArgs{\n\t\t\t\tAccessPoint: \u0026fabric.ConnectionZSideAccessPointArgs{\n\t\t\t\t\tType: pulumi.String(fabric.AccessPointTypeSP),\n\t\t\t\t\tAuthenticationKey: pulumi.String(\"\u003caws_account_id\u003e\"),\n\t\t\t\t\tSellerRegion: pulumi.String(\"us-west-1\"),\n\t\t\t\t\tProfile: \u0026fabric.ConnectionZSideAccessPointProfileArgs{\n\t\t\t\t\t\tType: pulumi.String(fabric.ProfileTypeL2Profile),\n\t\t\t\t\t\tUuid: pulumi.String(\"\u003cservice_profile_uuid\u003e\"),\n\t\t\t\t\t},\n\t\t\t\t\tLocation: \u0026fabric.ConnectionZSideAccessPointLocationArgs{\n\t\t\t\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var token2Aws = new Equinix.Fabric.Connection(\"token2aws\", new()\n {\n Name = \"ConnectionName\",\n Type = Equinix.Fabric.ConnectionType.EVPL,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ConnectionNotificationArgs\n {\n Type = Equinix.Fabric.NotificationsType.All,\n Emails = new[]\n {\n \"example@equinix.com\",\n \"test1@equinix.com\",\n },\n },\n },\n Bandwidth = 50,\n Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs\n {\n PurchaseOrderNumber = \"1-323292\",\n },\n ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs\n {\n ServiceToken = new Equinix.Fabric.Inputs.ConnectionASideServiceTokenArgs\n {\n Uuid = \"\u003cservice_token_uuid\u003e\",\n },\n },\n ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs\n {\n AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs\n {\n Type = Equinix.Fabric.AccessPointType.SP,\n AuthenticationKey = \"\u003caws_account_id\u003e\",\n SellerRegion = \"us-west-1\",\n Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs\n {\n Type = Equinix.Fabric.ProfileType.L2Profile,\n Uuid = \"\u003cservice_profile_uuid\u003e\",\n },\n Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs\n {\n MetroCode = Equinix.Metro.SiliconValley,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.Connection;\nimport com.pulumi.equinix.fabric.ConnectionArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionASideServiceTokenArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;\nimport com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var token2Aws = new Connection(\"token2Aws\", ConnectionArgs.builder()\n .name(\"ConnectionName\")\n .type(\"EVPL_VC\")\n .notifications(ConnectionNotificationArgs.builder()\n .type(\"ALL\")\n .emails( \n \"example@equinix.com\",\n \"test1@equinix.com\")\n .build())\n .bandwidth(50)\n .order(ConnectionOrderArgs.builder()\n .purchaseOrderNumber(\"1-323292\")\n .build())\n .aSide(ConnectionASideArgs.builder()\n .serviceToken(ConnectionASideServiceTokenArgs.builder()\n .uuid(\"\u003cservice_token_uuid\u003e\")\n .build())\n .build())\n .zSide(ConnectionZSideArgs.builder()\n .accessPoint(ConnectionZSideAccessPointArgs.builder()\n .type(\"SP\")\n .authenticationKey(\"\u003caws_account_id\u003e\")\n .sellerRegion(\"us-west-1\")\n .profile(ConnectionZSideAccessPointProfileArgs.builder()\n .type(\"L2_PROFILE\")\n .uuid(\"\u003cservice_profile_uuid\u003e\")\n .build())\n .location(ConnectionZSideAccessPointLocationArgs.builder()\n .metroCode(\"SV\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n token2aws:\n type: equinix:fabric:Connection\n properties:\n name: ConnectionName\n type: EVPL_VC\n notifications:\n - type: ALL\n emails:\n - example@equinix.com\n - test1@equinix.com\n bandwidth: 50\n order:\n purchaseOrderNumber: 1-323292\n aSide:\n serviceToken:\n uuid: \u003cservice_token_uuid\u003e\n zSide:\n accessPoint:\n type: SP\n authenticationKey: \u003caws_account_id\u003e\n sellerRegion: us-west-1\n profile:\n type: L2_PROFILE\n uuid: \u003cservice_profile_uuid\u003e\n location:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "aSide": { "$ref": "#/types/equinix:fabric/ConnectionASide:ConnectionASide", @@ -13468,7 +13468,7 @@ } }, "equinix:fabric/routingProtocol:RoutingProtocol": { - "description": "Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection\n\nAdditional documentation:\n* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/connections/FCR-connect-azureQC.htm#ConfigureRoutingDetailsintheFabricPortal\n* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst connectionId = config.require(\"connectionId\");\nconst routingProtocol = new equinix.fabric.RoutingProtocol(\"RoutingProtocol\", {\n connectionUuid: connectionId,\n name: \"My-Direct-route-1\",\n type: \"DIRECT\",\n directIpv4: {\n equinixIfaceIp: \"192.168.100.1/30\",\n },\n});\nexport const routingProtocolId = routingProtocol.id;\nexport const routingProtocolState = routingProtocol.state;\nexport const routingProtocolEquinixAsn = routingProtocol.equinixAsn;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nconnection_id = config.require(\"connectionId\")\nrouting_protocol = equinix.fabric.RoutingProtocol(\"RoutingProtocol\",\n connection_uuid=connection_id,\n name=\"My-Direct-route-1\",\n type=\"DIRECT\",\n direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args(\n equinix_iface_ip=\"192.168.100.1/30\",\n ))\npulumi.export(\"routingProtocolId\", routing_protocol.id)\npulumi.export(\"routingProtocolState\", routing_protocol.state)\npulumi.export(\"routingProtocolEquinixAsn\", routing_protocol.equinix_asn)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tconnectionId := cfg.Require(\"connectionId\")\n\t\troutingProtocol, err := fabric.NewRoutingProtocol(ctx, \"RoutingProtocol\", \u0026fabric.RoutingProtocolArgs{\n\t\t\tConnectionUuid: pulumi.String(connectionId),\n\t\t\tName: pulumi.String(\"My-Direct-route-1\"),\n\t\t\tType: pulumi.String(\"DIRECT\"),\n\t\t\tDirectIpv4: \u0026fabric.RoutingProtocolDirectIpv4Args{\n\t\t\t\tEquinixIfaceIp: pulumi.String(\"192.168.100.1/30\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"routingProtocolId\", routingProtocol.ID())\n\t\tctx.Export(\"routingProtocolState\", routingProtocol.State)\n\t\tctx.Export(\"routingProtocolEquinixAsn\", routingProtocol.EquinixAsn)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var connectionId = config.Require(\"connectionId\");\n var routingProtocol = new Equinix.Fabric.RoutingProtocol(\"RoutingProtocol\", new()\n {\n ConnectionUuid = connectionId,\n Name = \"My-Direct-route-1\",\n Type = \"DIRECT\",\n DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args\n {\n EquinixIfaceIp = \"192.168.100.1/30\",\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"routingProtocolId\"] = routingProtocol.Id,\n [\"routingProtocolState\"] = routingProtocol.State,\n [\"routingProtocolEquinixAsn\"] = routingProtocol.EquinixAsn,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.RoutingProtocol;\nimport com.pulumi.equinix.fabric.RoutingProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var connectionId = config.get(\"connectionId\");\n var routingProtocol = new RoutingProtocol(\"routingProtocol\", RoutingProtocolArgs.builder() \n .connectionUuid(connectionId)\n .name(\"My-Direct-route-1\")\n .type(\"DIRECT\")\n .directIpv4(RoutingProtocolDirectIpv4Args.builder()\n .equinixIfaceIp(\"192.168.100.1/30\")\n .build())\n .build());\n\n ctx.export(\"routingProtocolId\", routingProtocol.id());\n ctx.export(\"routingProtocolState\", routingProtocol.state());\n ctx.export(\"routingProtocolEquinixAsn\", routingProtocol.equinixAsn());\n }\n}\n```\n```yaml\nconfig:\n connectionId:\n type: string\nresources:\n RoutingProtocol:\n type: equinix:fabric:RoutingProtocol\n properties:\n connectionUuid: ${connectionId}\n name: My-Direct-route-1\n type: DIRECT\n directIpv4:\n equinixIfaceIp: 192.168.100.1/30\noutputs:\n routingProtocolId: ${RoutingProtocol.id}\n routingProtocolState: ${RoutingProtocol.state}\n routingProtocolEquinixAsn: ${RoutingProtocol.equinixAsn}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection\n\nAdditional documentation:\n* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/connections/FCR-connect-azureQC.htm#ConfigureRoutingDetailsintheFabricPortal\n* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 3\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst direct = new equinix.fabric.RoutingProtocol(\"direct\", {\n connectionUuid: \"\u003csome_id\u003e\",\n type: \"DIRECT\",\n name: \"direct_rp\",\n directIpv4: {\n equinixIfaceIp: \"190.1.1.1/30\",\n },\n directIpv6: {\n equinixIfaceIp: \"190::1:1/126\",\n },\n});\nconst bgp = new equinix.fabric.RoutingProtocol(\"bgp\", {\n connectionUuid: \"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\",\n type: \"BGP\",\n name: \"bgp_rp\",\n bgpIpv4: {\n customerPeerIp: \"190.1.1.2\",\n enabled: true,\n },\n bgpIpv6: {\n customerPeerIp: \"190::1:2\",\n enabled: true,\n },\n customerAsn: 4532,\n}, {\n dependsOn: [direct],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ndirect = equinix.fabric.RoutingProtocol(\"direct\",\n connection_uuid=\"\u003csome_id\u003e\",\n type=\"DIRECT\",\n name=\"direct_rp\",\n direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args(\n equinix_iface_ip=\"190.1.1.1/30\",\n ),\n direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args(\n equinix_iface_ip=\"190::1:1/126\",\n ))\nbgp = equinix.fabric.RoutingProtocol(\"bgp\",\n connection_uuid=\"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\",\n type=\"BGP\",\n name=\"bgp_rp\",\n bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args(\n customer_peer_ip=\"190.1.1.2\",\n enabled=True,\n ),\n bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args(\n customer_peer_ip=\"190::1:2\",\n enabled=True,\n ),\n customer_asn=4532,\n opts = pulumi.ResourceOptions(depends_on=[direct]))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdirect, err := fabric.NewRoutingProtocol(ctx, \"direct\", \u0026fabric.RoutingProtocolArgs{\n\t\t\tConnectionUuid: pulumi.String(\"\u003csome_id\u003e\"),\n\t\t\tType: pulumi.String(\"DIRECT\"),\n\t\t\tName: pulumi.String(\"direct_rp\"),\n\t\t\tDirectIpv4: \u0026fabric.RoutingProtocolDirectIpv4Args{\n\t\t\t\tEquinixIfaceIp: pulumi.String(\"190.1.1.1/30\"),\n\t\t\t},\n\t\t\tDirectIpv6: \u0026fabric.RoutingProtocolDirectIpv6Args{\n\t\t\t\tEquinixIfaceIp: pulumi.String(\"190::1:1/126\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fabric.NewRoutingProtocol(ctx, \"bgp\", \u0026fabric.RoutingProtocolArgs{\n\t\t\tConnectionUuid: pulumi.String(\"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\"),\n\t\t\tType: pulumi.String(\"BGP\"),\n\t\t\tName: pulumi.String(\"bgp_rp\"),\n\t\t\tBgpIpv4: \u0026fabric.RoutingProtocolBgpIpv4Args{\n\t\t\t\tCustomerPeerIp: pulumi.String(\"190.1.1.2\"),\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tBgpIpv6: \u0026fabric.RoutingProtocolBgpIpv6Args{\n\t\t\t\tCustomerPeerIp: pulumi.String(\"190::1:2\"),\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tCustomerAsn: pulumi.Int(4532),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tdirect,\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var direct = new Equinix.Fabric.RoutingProtocol(\"direct\", new()\n {\n ConnectionUuid = \"\u003csome_id\u003e\",\n Type = \"DIRECT\",\n Name = \"direct_rp\",\n DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args\n {\n EquinixIfaceIp = \"190.1.1.1/30\",\n },\n DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args\n {\n EquinixIfaceIp = \"190::1:1/126\",\n },\n });\n\n var bgp = new Equinix.Fabric.RoutingProtocol(\"bgp\", new()\n {\n ConnectionUuid = \"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\",\n Type = \"BGP\",\n Name = \"bgp_rp\",\n BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args\n {\n CustomerPeerIp = \"190.1.1.2\",\n Enabled = true,\n },\n BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args\n {\n CustomerPeerIp = \"190::1:2\",\n Enabled = true,\n },\n CustomerAsn = 4532,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n direct,\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.RoutingProtocol;\nimport com.pulumi.equinix.fabric.RoutingProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var direct = new RoutingProtocol(\"direct\", RoutingProtocolArgs.builder()\n .connectionUuid(\"\u003csome_id\u003e\")\n .type(\"DIRECT\")\n .name(\"direct_rp\")\n .directIpv4(RoutingProtocolDirectIpv4Args.builder()\n .equinixIfaceIp(\"190.1.1.1/30\")\n .build())\n .directIpv6(RoutingProtocolDirectIpv6Args.builder()\n .equinixIfaceIp(\"190::1:1/126\")\n .build())\n .build());\n\n var bgp = new RoutingProtocol(\"bgp\", RoutingProtocolArgs.builder()\n .connectionUuid(\"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\")\n .type(\"BGP\")\n .name(\"bgp_rp\")\n .bgpIpv4(RoutingProtocolBgpIpv4Args.builder()\n .customerPeerIp(\"190.1.1.2\")\n .enabled(true)\n .build())\n .bgpIpv6(RoutingProtocolBgpIpv6Args.builder()\n .customerPeerIp(\"190::1:2\")\n .enabled(true)\n .build())\n .customerAsn(4532)\n .build(), CustomResourceOptions.builder()\n .dependsOn(direct)\n .build());\n\n }\n}\n```\n```yaml\n direct:\n type: equinix:fabric:RoutingProtocol\n properties:\n connectionUuid: \u003csome_id\u003e\n type: DIRECT\n name: direct_rp\n directIpv4:\n equinixIfaceIp: 190.1.1.1/30\n directIpv6:\n equinixIfaceIp: 190::1:1/126\n bgp:\n type: equinix:fabric:RoutingProtocol\n properties:\n connectionUuid: \u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\n type: BGP\n name: bgp_rp\n bgpIpv4:\n customerPeerIp: 190.1.1.2\n enabled: true\n bgpIpv6:\n customerPeerIp: 190::1:2\n enabled: true\n customerAsn: 4532\n options:\n dependson:\n - ${direct}\n```\n{{% /example %}}\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst direct = new equinix.fabric.RoutingProtocol(\"direct\", {\n connectionUuid: \"\u003csome_id\u003e\",\n type: \"DIRECT\",\n name: \"direct_rp\",\n directIpv4: {\n equinixIfaceIp: \"190.1.1.1/30\",\n },\n directIpv6: {\n equinixIfaceIp: \"190::1:1/126\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ndirect = equinix.fabric.RoutingProtocol(\"direct\",\n connection_uuid=\"\u003csome_id\u003e\",\n type=\"DIRECT\",\n name=\"direct_rp\",\n direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args(\n equinix_iface_ip=\"190.1.1.1/30\",\n ),\n direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args(\n equinix_iface_ip=\"190::1:1/126\",\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewRoutingProtocol(ctx, \"direct\", \u0026fabric.RoutingProtocolArgs{\n\t\t\tConnectionUuid: pulumi.String(\"\u003csome_id\u003e\"),\n\t\t\tType: pulumi.String(\"DIRECT\"),\n\t\t\tName: pulumi.String(\"direct_rp\"),\n\t\t\tDirectIpv4: \u0026fabric.RoutingProtocolDirectIpv4Args{\n\t\t\t\tEquinixIfaceIp: pulumi.String(\"190.1.1.1/30\"),\n\t\t\t},\n\t\t\tDirectIpv6: \u0026fabric.RoutingProtocolDirectIpv6Args{\n\t\t\t\tEquinixIfaceIp: pulumi.String(\"190::1:1/126\"),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var direct = new Equinix.Fabric.RoutingProtocol(\"direct\", new()\n {\n ConnectionUuid = \"\u003csome_id\u003e\",\n Type = \"DIRECT\",\n Name = \"direct_rp\",\n DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args\n {\n EquinixIfaceIp = \"190.1.1.1/30\",\n },\n DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args\n {\n EquinixIfaceIp = \"190::1:1/126\",\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.RoutingProtocol;\nimport com.pulumi.equinix.fabric.RoutingProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var direct = new RoutingProtocol(\"direct\", RoutingProtocolArgs.builder()\n .connectionUuid(\"\u003csome_id\u003e\")\n .type(\"DIRECT\")\n .name(\"direct_rp\")\n .directIpv4(RoutingProtocolDirectIpv4Args.builder()\n .equinixIfaceIp(\"190.1.1.1/30\")\n .build())\n .directIpv6(RoutingProtocolDirectIpv6Args.builder()\n .equinixIfaceIp(\"190::1:1/126\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n direct:\n type: equinix:fabric:RoutingProtocol\n properties:\n connectionUuid: \u003csome_id\u003e\n type: DIRECT\n name: direct_rp\n directIpv4:\n equinixIfaceIp: 190.1.1.1/30\n directIpv6:\n equinixIfaceIp: 190::1:1/126\n```\n{{% /example %}}\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst bgp = new equinix.fabric.RoutingProtocol(\"bgp\", {\n connectionUuid: \"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\",\n type: \"BGP\",\n name: \"bgp_rp\",\n bgpIpv4: {\n customerPeerIp: \"190.1.1.2\",\n enabled: true,\n },\n bgpIpv6: {\n customerPeerIp: \"190::1:2\",\n enabled: true,\n },\n customerAsn: 4532,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nbgp = equinix.fabric.RoutingProtocol(\"bgp\",\n connection_uuid=\"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\",\n type=\"BGP\",\n name=\"bgp_rp\",\n bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args(\n customer_peer_ip=\"190.1.1.2\",\n enabled=True,\n ),\n bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args(\n customer_peer_ip=\"190::1:2\",\n enabled=True,\n ),\n customer_asn=4532)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewRoutingProtocol(ctx, \"bgp\", \u0026fabric.RoutingProtocolArgs{\n\t\t\tConnectionUuid: pulumi.String(\"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\"),\n\t\t\tType: pulumi.String(\"BGP\"),\n\t\t\tName: pulumi.String(\"bgp_rp\"),\n\t\t\tBgpIpv4: \u0026fabric.RoutingProtocolBgpIpv4Args{\n\t\t\t\tCustomerPeerIp: pulumi.String(\"190.1.1.2\"),\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tBgpIpv6: \u0026fabric.RoutingProtocolBgpIpv6Args{\n\t\t\t\tCustomerPeerIp: pulumi.String(\"190::1:2\"),\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tCustomerAsn: pulumi.Int(4532),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bgp = new Equinix.Fabric.RoutingProtocol(\"bgp\", new()\n {\n ConnectionUuid = \"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\",\n Type = \"BGP\",\n Name = \"bgp_rp\",\n BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args\n {\n CustomerPeerIp = \"190.1.1.2\",\n Enabled = true,\n },\n BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args\n {\n CustomerPeerIp = \"190::1:2\",\n Enabled = true,\n },\n CustomerAsn = 4532,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.RoutingProtocol;\nimport com.pulumi.equinix.fabric.RoutingProtocolArgs;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args;\nimport com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bgp = new RoutingProtocol(\"bgp\", RoutingProtocolArgs.builder()\n .connectionUuid(\"\u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\")\n .type(\"BGP\")\n .name(\"bgp_rp\")\n .bgpIpv4(RoutingProtocolBgpIpv4Args.builder()\n .customerPeerIp(\"190.1.1.2\")\n .enabled(true)\n .build())\n .bgpIpv6(RoutingProtocolBgpIpv6Args.builder()\n .customerPeerIp(\"190::1:2\")\n .enabled(true)\n .build())\n .customerAsn(4532)\n .build());\n\n }\n}\n```\n```yaml\n bgp:\n type: equinix:fabric:RoutingProtocol\n properties:\n connectionUuid: \u003csame_connection_id_as_first_equinix_fabric_routing_protocol\u003e\n type: BGP\n name: bgp_rp\n bgpIpv4:\n customerPeerIp: 190.1.1.2\n enabled: true\n bgpIpv6:\n customerPeerIp: 190::1:2\n enabled: true\n customerAsn: 4532\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "bfd": { "$ref": "#/types/equinix:fabric/RoutingProtocolBfd:RoutingProtocolBfd", @@ -13714,7 +13714,7 @@ } }, "equinix:fabric/serviceProfile:ServiceProfile": { - "description": "Fabric V4 API compatible resource allows creation and management of Equinix Fabric Service Profile\n\nAdditional documentation:\n* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm\n* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst profile = new equinix.fabric.ServiceProfile(\"profile\", {\n name: \"Example Cloud Provider\",\n description: \"50 to 500 Mbps Hosted Connection to Example Cloud\",\n type: \"L2_PROFILE\",\n accessPointTypeConfigs: [{\n type: \"COLO\",\n supportedBandwidths: [\n 50,\n 100,\n 200,\n 500,\n ],\n allowRemoteConnections: true,\n allowCustomBandwidth: false,\n allowBandwidthAutoApproval: false,\n linkProtocolConfig: {\n encapsulationStrategy: \"CTAGED\",\n reuseVlanSTag: false,\n encapsulation: \"DOT1Q\",\n },\n enableAutoGenerateServiceKey: \"false,\",\n connectionRedundancyRequired: \"false,\",\n apiConfig: {\n apiAvailable: true,\n integrationId: \"Example-Connect-01\",\n bandwidthFromApi: false,\n },\n connectionLabel: \"Virtual Circuit Name\",\n authenticationKey: {\n required: true,\n label: \"Example ACCOUNT ID\",\n },\n }],\n account: {\n organizationName: \"Example Cloud\",\n globalOrganizationName: \"Example Global\",\n },\n metros: undefined,\n visibility: \"PUBLIC\",\n marketingInfo: {\n promotion: true,\n },\n});\nexport const profileId = profile.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nprofile = equinix.fabric.ServiceProfile(\"profile\",\n name=\"Example Cloud Provider\",\n description=\"50 to 500 Mbps Hosted Connection to Example Cloud\",\n type=\"L2_PROFILE\",\n access_point_type_configs=[equinix.fabric.ServiceProfileAccessPointTypeConfigArgs(\n type=\"COLO\",\n supported_bandwidths=[\n 50,\n 100,\n 200,\n 500,\n ],\n allow_remote_connections=True,\n allow_custom_bandwidth=False,\n allow_bandwidth_auto_approval=False,\n link_protocol_config=equinix.fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs(\n encapsulation_strategy=\"CTAGED\",\n reuse_vlan_s_tag=False,\n encapsulation=\"DOT1Q\",\n ),\n enable_auto_generate_service_key=\"false,\",\n connection_redundancy_required=\"false,\",\n api_config=equinix.fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs(\n api_available=True,\n integration_id=\"Example-Connect-01\",\n bandwidth_from_api=False,\n ),\n connection_label=\"Virtual Circuit Name\",\n authentication_key=equinix.fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs(\n required=True,\n label=\"Example ACCOUNT ID\",\n ),\n )],\n account=equinix.fabric.ServiceProfileAccountArgs(\n organization_name=\"Example Cloud\",\n global_organization_name=\"Example Global\",\n ),\n metros=None,\n visibility=\"PUBLIC\",\n marketing_info=equinix.fabric.ServiceProfileMarketingInfoArgs(\n promotion=True,\n ))\npulumi.export(\"profileId\", profile.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tprofile, err := fabric.NewServiceProfile(ctx, \"profile\", \u0026fabric.ServiceProfileArgs{\n\t\t\tName: pulumi.String(\"Example Cloud Provider\"),\n\t\t\tDescription: pulumi.String(\"50 to 500 Mbps Hosted Connection to Example Cloud\"),\n\t\t\tType: pulumi.String(\"L2_PROFILE\"),\n\t\t\tAccessPointTypeConfigs: fabric.ServiceProfileAccessPointTypeConfigArray{\n\t\t\t\t\u0026fabric.ServiceProfileAccessPointTypeConfigArgs{\n\t\t\t\t\tType: pulumi.String(\"COLO\"),\n\t\t\t\t\tSupportedBandwidths: pulumi.IntArray{\n\t\t\t\t\t\tpulumi.Int(50),\n\t\t\t\t\t\tpulumi.Int(100),\n\t\t\t\t\t\tpulumi.Int(200),\n\t\t\t\t\t\tpulumi.Int(500),\n\t\t\t\t\t},\n\t\t\t\t\tAllowRemoteConnections: pulumi.Bool(true),\n\t\t\t\t\tAllowCustomBandwidth: pulumi.Bool(false),\n\t\t\t\t\tAllowBandwidthAutoApproval: pulumi.Bool(false),\n\t\t\t\t\tLinkProtocolConfig: \u0026fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs{\n\t\t\t\t\t\tEncapsulationStrategy: pulumi.String(\"CTAGED\"),\n\t\t\t\t\t\tReuseVlanSTag: pulumi.Bool(false),\n\t\t\t\t\t\tEncapsulation: pulumi.String(\"DOT1Q\"),\n\t\t\t\t\t},\n\t\t\t\t\tEnableAutoGenerateServiceKey: pulumi.Bool(\"false,\"),\n\t\t\t\t\tConnectionRedundancyRequired: pulumi.Bool(\"false,\"),\n\t\t\t\t\tApiConfig: \u0026fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs{\n\t\t\t\t\t\tApiAvailable: pulumi.Bool(true),\n\t\t\t\t\t\tIntegrationId: pulumi.String(\"Example-Connect-01\"),\n\t\t\t\t\t\tBandwidthFromApi: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tConnectionLabel: pulumi.String(\"Virtual Circuit Name\"),\n\t\t\t\t\tAuthenticationKey: \u0026fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs{\n\t\t\t\t\t\tRequired: pulumi.Bool(true),\n\t\t\t\t\t\tLabel: pulumi.String(\"Example ACCOUNT ID\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tAccount: \u0026fabric.ServiceProfileAccountArgs{\n\t\t\t\tOrganizationName: pulumi.String(\"Example Cloud\"),\n\t\t\t\tGlobalOrganizationName: pulumi.String(\"Example Global\"),\n\t\t\t},\n\t\t\tMetros: nil,\n\t\t\tVisibility: pulumi.String(\"PUBLIC\"),\n\t\t\tMarketingInfo: \u0026fabric.ServiceProfileMarketingInfoArgs{\n\t\t\t\tPromotion: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"profileId\", profile.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var profile = new Equinix.Fabric.ServiceProfile(\"profile\", new()\n {\n Name = \"Example Cloud Provider\",\n Description = \"50 to 500 Mbps Hosted Connection to Example Cloud\",\n Type = \"L2_PROFILE\",\n AccessPointTypeConfigs = new[]\n {\n new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigArgs\n {\n Type = \"COLO\",\n SupportedBandwidths = new[]\n {\n 50,\n 100,\n 200,\n 500,\n },\n AllowRemoteConnections = true,\n AllowCustomBandwidth = false,\n AllowBandwidthAutoApproval = false,\n LinkProtocolConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs\n {\n EncapsulationStrategy = \"CTAGED\",\n ReuseVlanSTag = false,\n Encapsulation = \"DOT1Q\",\n },\n EnableAutoGenerateServiceKey = \"false,\",\n ConnectionRedundancyRequired = \"false,\",\n ApiConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs\n {\n ApiAvailable = true,\n IntegrationId = \"Example-Connect-01\",\n BandwidthFromApi = false,\n },\n ConnectionLabel = \"Virtual Circuit Name\",\n AuthenticationKey = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs\n {\n Required = true,\n Label = \"Example ACCOUNT ID\",\n },\n },\n },\n Account = new Equinix.Fabric.Inputs.ServiceProfileAccountArgs\n {\n OrganizationName = \"Example Cloud\",\n GlobalOrganizationName = \"Example Global\",\n },\n Metros = null,\n Visibility = \"PUBLIC\",\n MarketingInfo = new Equinix.Fabric.Inputs.ServiceProfileMarketingInfoArgs\n {\n Promotion = true,\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"profileId\"] = profile.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.fabric.ServiceProfile;\nimport com.equinix.pulumi.fabric.ServiceProfileArgs;\nimport com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs;\nimport com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs;\nimport com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs;\nimport com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs;\nimport com.equinix.pulumi.fabric.inputs.ServiceProfileAccountArgs;\nimport com.equinix.pulumi.fabric.inputs.ServiceProfileMarketingInfoArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var profile = new ServiceProfile(\"profile\", ServiceProfileArgs.builder() \n .name(\"Example Cloud Provider\")\n .description(\"50 to 500 Mbps Hosted Connection to Example Cloud\")\n .type(\"L2_PROFILE\")\n .accessPointTypeConfigs(ServiceProfileAccessPointTypeConfigArgs.builder()\n .type(\"COLO\")\n .supportedBandwidths( \n 50,\n 100,\n 200,\n 500)\n .allowRemoteConnections(true)\n .allowCustomBandwidth(false)\n .allowBandwidthAutoApproval(false)\n .linkProtocolConfig(ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs.builder()\n .encapsulationStrategy(\"CTAGED\")\n .reuseVlanSTag(false)\n .encapsulation(\"DOT1Q\")\n .build())\n .enableAutoGenerateServiceKey(false)\n .connectionRedundancyRequired(false)\n .apiConfig(ServiceProfileAccessPointTypeConfigApiConfigArgs.builder()\n .apiAvailable(true)\n .integrationId(\"Example-Connect-01\")\n .bandwidthFromApi(false)\n .build())\n .connectionLabel(\"Virtual Circuit Name\")\n .authenticationKey(ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs.builder()\n .required(true)\n .label(\"Example ACCOUNT ID\")\n .build())\n .build())\n .account(ServiceProfileAccountArgs.builder()\n .organizationName(\"Example Cloud\")\n .globalOrganizationName(\"Example Global\")\n .build())\n .visibility(\"PUBLIC\")\n .marketingInfo(ServiceProfileMarketingInfoArgs.builder()\n .promotion(true)\n .build())\n .build());\n\n ctx.export(\"profileId\", profile.id());\n }\n}\n```\n```yaml\nresources:\n profile:\n type: equinix:fabric:ServiceProfile\n properties:\n name: Example Cloud Provider\n description: 50 to 500 Mbps Hosted Connection to Example Cloud\n type: L2_PROFILE\n accessPointTypeConfigs:\n - type: COLO\n supportedBandwidths: [ 50, 100, 200, 500]\n allowRemoteConnections: true\n allowCustomBandwidth: false\n allowBandwidthAutoApproval: false\n linkProtocolConfig:\n encapsulationStrategy: CTAGED\n reuseVlanSTag: false\n encapsulation: DOT1Q\n enableAutoGenerateServiceKey: false,\n connectionRedundancyRequired: false,\n apiConfig:\n apiAvailable: true\n integrationId: Example-Connect-01\n bandwidthFromApi: false\n connectionLabel: Virtual Circuit Name\n authenticationKey:\n required: true\n label: Example ACCOUNT ID\n account:\n organizationName: Example Cloud\n globalOrganizationName: Example Global\n metros:\n visibility: PUBLIC\n marketingInfo:\n promotion: true\noutputs:\n profileId: ${profile.id}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Fabric V4 API compatible resource allows creation and management of Equinix Fabric Service Profile\n\nAdditional documentation:\n* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm\n* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst newServiceProfile = new equinix.fabric.ServiceProfile(\"newServiceProfile\", {\n description: \"Service Profile for Receiving Connections\",\n name: \"Name Of Business + Use Case Tag\",\n type: equinix.fabric.ProfileType.L2Profile,\n visibility: equinix.fabric.ProfileVisibility.Public,\n notifications: [{\n emails: [\"someone@sample.com\"],\n type: \"BANDWIDTH_ALERT\",\n }],\n allowedEmails: [\n \"test@equinix.com\",\n \"testagain@equinix.com\",\n ],\n ports: [{\n uuid: \"c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee\",\n type: \"XF_PORT\",\n }],\n accessPointTypeConfigs: [{\n type: equinix.fabric.ProfileAccessPointType.Colo,\n allowRemoteConnections: true,\n allowCustomBandwidth: true,\n allowBandwidthAutoApproval: false,\n connectionRedundancyRequired: false,\n connectionLabel: \"Service Profile Tag1\",\n bandwidthAlertThreshold: 10,\n supportedBandwidths: [\n 100,\n 500,\n ],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nnew_service_profile = equinix.fabric.ServiceProfile(\"newServiceProfile\",\n description=\"Service Profile for Receiving Connections\",\n name=\"Name Of Business + Use Case Tag\",\n type=equinix.fabric.ProfileType.L2_PROFILE,\n visibility=equinix.fabric.ProfileVisibility.PUBLIC,\n notifications=[equinix.fabric.ServiceProfileNotificationArgs(\n emails=[\"someone@sample.com\"],\n type=\"BANDWIDTH_ALERT\",\n )],\n allowed_emails=[\n \"test@equinix.com\",\n \"testagain@equinix.com\",\n ],\n ports=[equinix.fabric.ServiceProfilePortArgs(\n uuid=\"c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee\",\n type=\"XF_PORT\",\n )],\n access_point_type_configs=[equinix.fabric.ServiceProfileAccessPointTypeConfigArgs(\n type=equinix.fabric.ProfileAccessPointType.COLO,\n allow_remote_connections=True,\n allow_custom_bandwidth=True,\n allow_bandwidth_auto_approval=False,\n connection_redundancy_required=False,\n connection_label=\"Service Profile Tag1\",\n bandwidth_alert_threshold=10,\n supported_bandwidths=[\n 100,\n 500,\n ],\n )])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric\"\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 := fabric.NewServiceProfile(ctx, \"newServiceProfile\", \u0026fabric.ServiceProfileArgs{\n\t\t\tDescription: pulumi.String(\"Service Profile for Receiving Connections\"),\n\t\t\tName: pulumi.String(\"Name Of Business + Use Case Tag\"),\n\t\t\tType: pulumi.String(fabric.ProfileTypeL2Profile),\n\t\t\tVisibility: pulumi.String(fabric.ProfileVisibilityPublic),\n\t\t\tNotifications: fabric.ServiceProfileNotificationArray{\n\t\t\t\t\u0026fabric.ServiceProfileNotificationArgs{\n\t\t\t\t\tEmails: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"someone@sample.com\"),\n\t\t\t\t\t},\n\t\t\t\t\tType: pulumi.String(\"BANDWIDTH_ALERT\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tAllowedEmails: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"test@equinix.com\"),\n\t\t\t\tpulumi.String(\"testagain@equinix.com\"),\n\t\t\t},\n\t\t\tPorts: fabric.ServiceProfilePortArray{\n\t\t\t\t\u0026fabric.ServiceProfilePortArgs{\n\t\t\t\t\tUuid: pulumi.String(\"c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee\"),\n\t\t\t\t\tType: pulumi.String(\"XF_PORT\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tAccessPointTypeConfigs: fabric.ServiceProfileAccessPointTypeConfigArray{\n\t\t\t\t\u0026fabric.ServiceProfileAccessPointTypeConfigArgs{\n\t\t\t\t\tType: pulumi.String(fabric.ProfileAccessPointTypeColo),\n\t\t\t\t\tAllowRemoteConnections: pulumi.Bool(true),\n\t\t\t\t\tAllowCustomBandwidth: pulumi.Bool(true),\n\t\t\t\t\tAllowBandwidthAutoApproval: pulumi.Bool(false),\n\t\t\t\t\tConnectionRedundancyRequired: pulumi.Bool(false),\n\t\t\t\t\tConnectionLabel: pulumi.String(\"Service Profile Tag1\"),\n\t\t\t\t\tBandwidthAlertThreshold: pulumi.Float64(10),\n\t\t\t\t\tSupportedBandwidths: pulumi.IntArray{\n\t\t\t\t\t\tpulumi.Int(100),\n\t\t\t\t\t\tpulumi.Int(500),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var newServiceProfile = new Equinix.Fabric.ServiceProfile(\"newServiceProfile\", new()\n {\n Description = \"Service Profile for Receiving Connections\",\n Name = \"Name Of Business + Use Case Tag\",\n Type = Equinix.Fabric.ProfileType.L2Profile,\n Visibility = Equinix.Fabric.ProfileVisibility.Public,\n Notifications = new[]\n {\n new Equinix.Fabric.Inputs.ServiceProfileNotificationArgs\n {\n Emails = new[]\n {\n \"someone@sample.com\",\n },\n Type = \"BANDWIDTH_ALERT\",\n },\n },\n AllowedEmails = new[]\n {\n \"test@equinix.com\",\n \"testagain@equinix.com\",\n },\n Ports = new[]\n {\n new Equinix.Fabric.Inputs.ServiceProfilePortArgs\n {\n Uuid = \"c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee\",\n Type = \"XF_PORT\",\n },\n },\n AccessPointTypeConfigs = new[]\n {\n new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigArgs\n {\n Type = Equinix.Fabric.ProfileAccessPointType.Colo,\n AllowRemoteConnections = true,\n AllowCustomBandwidth = true,\n AllowBandwidthAutoApproval = false,\n ConnectionRedundancyRequired = false,\n ConnectionLabel = \"Service Profile Tag1\",\n BandwidthAlertThreshold = 10,\n SupportedBandwidths = new[]\n {\n 100,\n 500,\n },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.fabric.ServiceProfile;\nimport com.pulumi.equinix.fabric.ServiceProfileArgs;\nimport com.pulumi.equinix.fabric.inputs.ServiceProfileNotificationArgs;\nimport com.pulumi.equinix.fabric.inputs.ServiceProfilePortArgs;\nimport com.pulumi.equinix.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var newServiceProfile = new ServiceProfile(\"newServiceProfile\", ServiceProfileArgs.builder()\n .description(\"Service Profile for Receiving Connections\")\n .name(\"Name Of Business + Use Case Tag\")\n .type(\"L2_PROFILE\")\n .visibility(\"PUBLIC\")\n .notifications(ServiceProfileNotificationArgs.builder()\n .emails(\"someone@sample.com\")\n .type(\"BANDWIDTH_ALERT\")\n .build())\n .allowedEmails( \n \"test@equinix.com\",\n \"testagain@equinix.com\")\n .ports(ServiceProfilePortArgs.builder()\n .uuid(\"c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee\")\n .type(\"XF_PORT\")\n .build())\n .accessPointTypeConfigs(ServiceProfileAccessPointTypeConfigArgs.builder()\n .type(\"COLO\")\n .allowRemoteConnections(true)\n .allowCustomBandwidth(true)\n .allowBandwidthAutoApproval(false)\n .connectionRedundancyRequired(false)\n .connectionLabel(\"Service Profile Tag1\")\n .bandwidthAlertThreshold(10)\n .supportedBandwidths( \n 100,\n 500)\n .build())\n .build());\n\n }\n}\n```\n```yaml\n newServiceProfile:\n type: equinix:fabric:ServiceProfile\n name: new_service_profile\n properties:\n description: Service Profile for Receiving Connections\n name: Name Of Business + Use Case Tag\n type: L2_PROFILE\n visibility: PUBLIC\n notifications:\n - emails:\n - someone@sample.com\n type: BANDWIDTH_ALERT\n allowedEmails:\n - test@equinix.com\n - testagain@equinix.com\n ports:\n - uuid: c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee\n type: XF_PORT\n accessPointTypeConfigs:\n - type: COLO\n allowRemoteConnections: true\n allowCustomBandwidth: true\n allowBandwidthAutoApproval: false\n connectionRedundancyRequired: false\n connectionLabel: Service Profile Tag1\n bandwidthAlertThreshold: 10\n supportedBandwidths:\n - 100\n - 500\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "accessPointTypeConfigs": { "type": "array", @@ -14102,7 +14102,7 @@ } }, "equinix:metal/bgpSession:BgpSession": { - "description": "Provides a resource to manage BGP sessions in Equinix Metal Host. Refer to [Equinix Metal BGP documentation](https://metal.equinix.com/developers/docs/networking/local-global-bgp/) for more details.\n\nYou need to have BGP config enabled in your project.\n\nBGP session must be linked to a device running [BIRD](https://bird.network.cz) or other BGP routing daemon which will control route advertisements via the session to Equinix Metal's upstream routers.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst deviceId = config.require(\"deviceId\");\nconst bgp = new equinix.metal.BgpSession(\"bgp\", {\n deviceId: deviceId,\n addressFamily: \"ipv4\",\n});\nexport const bgpSessionStatus = bgp.status;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\ndevice_id = config.require(\"deviceId\")\nbgp = equinix.metal.BgpSession(\"bgp\",\n device_id=device_id,\n address_family=\"ipv4\")\npulumi.export(\"bgpSessionStatus\", bgp.status)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdeviceId := cfg.Require(\"deviceId\")\n\t\tbgp, err := metal.NewBgpSession(ctx, \"bgp\", \u0026metal.BgpSessionArgs{\n\t\t\tDeviceId: pulumi.String(deviceId),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"bgpSessionStatus\", bgp.Status)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var deviceId = config.Require(\"deviceId\");\n var bgp = new Equinix.Metal.BgpSession(\"bgp\", new()\n {\n DeviceId = deviceId,\n AddressFamily = \"ipv4\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"bgpSessionStatus\"] = bgp.Status,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.BgpSession;\nimport com.equinix.pulumi.metal.BgpSessionArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var deviceId = config.get(\"deviceId\").get();\n var bgp = new BgpSession(\"bgp\", BgpSessionArgs.builder() \n .deviceId(deviceId)\n .addressFamily(\"ipv4\")\n .build());\n\n ctx.export(\"bgpSessionStatus\", bgp.status());\n }\n}\n```\n```yaml\nconfig:\n deviceId:\n type: string\nresources:\n bgp:\n type: equinix:metal:BgpSession\n properties:\n deviceId: ${deviceId}\n addressFamily: ipv4\noutputs:\n bgpSessionStatus: ${bgp.status}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Provides a resource to manage BGP sessions in Equinix Metal Host. Refer to [Equinix Metal BGP documentation](https://metal.equinix.com/developers/docs/networking/local-global-bgp/) for more details.\n\nYou need to have BGP config enabled in your project.\n\nBGP session must be linked to a device running [BIRD](https://bird.network.cz) or other BGP routing daemon which will control route advertisements via the session to Equinix Metal's upstream routers.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as _null from \"@pulumi/null\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst bgpPassword = \"955dB0b81Ef\";\nconst projectId = \"\u003cUUID_of_your_project\u003e\";\nconst addr = new equinix.metal.ReservedIpBlock(\"addr\", {\n projectId: projectId,\n metro: \"ny\",\n quantity: 1,\n});\nconst interfaceLo0 = pulumi.interpolate`auto lo:0\niface lo:0 inet static\n address ${addr.address}\n netmask ${addr.netmask}\n`;\nconst test = new equinix.metal.Device(\"test\", {\n hostname: \"terraform-test-bgp-sesh\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"ny\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n});\nconst birdConf = pulumi.all([addr.address, addr.cidr, test.network, test.network]).apply(([address, cidr, testNetwork, testNetwork1]) =\u003e `filter equinix_metal_bgp {\n if net = ${address}/${cidr} then accept;\n}\nrouter id ${testNetwork[2].address};\nprotocol direct {\n interface \"lo\";\n}\nprotocol kernel {\n scan time 10;\n persist;\n import all;\n export all;\n}\nprotocol device {\n scan time 10;\n}\nprotocol bgp {\n export filter equinix_metal_bgp;\n local as 65000;\n neighbor ${testNetwork1[2].gateway} as 65530;\n password \"${bgpPassword}\";\n}\n`);\nconst testBgpSession = new equinix.metal.BgpSession(\"testBgpSession\", {\n deviceId: test.id,\n addressFamily: \"ipv4\",\n});\nconst configureBird = new _null.Resource(\"configureBird\", {triggers: {\n bird_conf: birdConf,\n \"interface\": interfaceLo0,\n}});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\nimport pulumi_null as null\n\nbgp_password = \"955dB0b81Ef\"\nproject_id = \"\u003cUUID_of_your_project\u003e\"\naddr = equinix.metal.ReservedIpBlock(\"addr\",\n project_id=project_id,\n metro=\"ny\",\n quantity=1)\ninterface_lo0 = pulumi.Output.all(addr.address, addr.netmask).apply(lambda address, netmask: f\"\"\"auto lo:0\niface lo:0 inet static\n address {address}\n netmask {netmask}\n\"\"\")\ntest = equinix.metal.Device(\"test\",\n hostname=\"terraform-test-bgp-sesh\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"ny\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id)\nbird_conf = pulumi.Output.all(addr.address, addr.cidr, test.network, test.network).apply(lambda address, cidr, testNetwork, testNetwork1: f\"\"\"filter equinix_metal_bgp {{\n if net = {address}/{cidr} then accept;\n}}\nrouter id {test_network[2].address};\nprotocol direct {{\n interface \"lo\";\n}}\nprotocol kernel {{\n scan time 10;\n persist;\n import all;\n export all;\n}}\nprotocol device {{\n scan time 10;\n}}\nprotocol bgp {{\n export filter equinix_metal_bgp;\n local as 65000;\n neighbor {test_network1[2].gateway} as 65530;\n password \"{bgp_password}\";\n}}\n\"\"\")\ntest_bgp_session = equinix.metal.BgpSession(\"testBgpSession\",\n device_id=test.id,\n address_family=\"ipv4\")\nconfigure_bird = null.Resource(\"configureBird\", triggers={\n \"bird_conf\": bird_conf,\n \"interface\": interface_lo0,\n})\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi-null/sdk/go/null\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tbgpPassword := \"955dB0b81Ef\"\n\t\tprojectId := \"\u003cUUID_of_your_project\u003e\"\n\t\taddr, err := metal.NewReservedIpBlock(ctx, \"addr\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tQuantity: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinterfaceLo0 := pulumi.All(addr.Address, addr.Netmask).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\taddress := _args[0].(string)\n\t\t\tnetmask := _args[1].(string)\n\t\t\treturn fmt.Sprintf(\"auto lo:0\\niface lo:0 inet static\\n address %v\\n netmask %v\\n\", address, netmask), nil\n\t\t}).(pulumi.StringOutput)\n\t\ttest, err := metal.NewDevice(ctx, \"test\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"terraform-test-bgp-sesh\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbirdConf := pulumi.All(addr.Address, addr.Cidr, test.Network, test.Network).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\taddress := _args[0].(string)\n\t\t\tcidr := _args[1].(int)\n\t\t\ttestNetwork := _args[2].([]metal.DeviceNetwork)\n\t\t\ttestNetwork1 := _args[3].([]metal.DeviceNetwork)\n\t\t\treturn fmt.Sprintf(`filter equinix_metal_bgp {\n if net = %v/%v then accept;\n}\nrouter id %v;\nprotocol direct {\n interface \"lo\";\n}\nprotocol kernel {\n scan time 10;\n persist;\n import all;\n export all;\n}\nprotocol device {\n scan time 10;\n}\nprotocol bgp {\n export filter equinix_metal_bgp;\n local as 65000;\n neighbor %v as 65530;\n password \"%v\";\n}\n`, address, cidr, testNetwork[2].Address, testNetwork1[2].Gateway, bgpPassword), nil\n\t\t}).(pulumi.StringOutput)\n\t\t_, err = metal.NewBgpSession(ctx, \"testBgpSession\", \u0026metal.BgpSessionArgs{\n\t\t\tDeviceId: test.ID(),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = null.NewResource(ctx, \"configureBird\", \u0026null.ResourceArgs{\n\t\t\tTriggers: pulumi.StringMap{\n\t\t\t\t\"bird_conf\": pulumi.String(birdConf),\n\t\t\t\t\"interface\": pulumi.String(interfaceLo0),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\nusing Null = Pulumi.Null;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bgpPassword = \"955dB0b81Ef\";\n\n var projectId = \"\u003cUUID_of_your_project\u003e\";\n\n var addr = new Equinix.Metal.ReservedIpBlock(\"addr\", new()\n {\n ProjectId = projectId,\n Metro = \"ny\",\n Quantity = 1,\n });\n\n var interfaceLo0 = Output.Tuple(addr.Address, addr.Netmask).Apply(values =\u003e\n {\n var address = values.Item1;\n var netmask = values.Item2;\n return @$\"auto lo:0\niface lo:0 inet static\n address {address}\n netmask {netmask}\n\";\n });\n\n var test = new Equinix.Metal.Device(\"test\", new()\n {\n Hostname = \"terraform-test-bgp-sesh\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"ny\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n });\n\n var birdConf = Output.Tuple(addr.Address, addr.Cidr, test.Network, test.Network).Apply(values =\u003e\n {\n var address = values.Item1;\n var cidr = values.Item2;\n var testNetwork = values.Item3;\n var testNetwork1 = values.Item4;\n return @$\"filter equinix_metal_bgp {{\n if net = {address}/{cidr} then accept;\n}}\nrouter id {testNetwork[2].Address};\nprotocol direct {{\n interface \"\"lo\"\";\n}}\nprotocol kernel {{\n scan time 10;\n persist;\n import all;\n export all;\n}}\nprotocol device {{\n scan time 10;\n}}\nprotocol bgp {{\n export filter equinix_metal_bgp;\n local as 65000;\n neighbor {testNetwork1[2].Gateway} as 65530;\n password \"\"{bgpPassword}\"\";\n}}\n\";\n });\n\n var testBgpSession = new Equinix.Metal.BgpSession(\"testBgpSession\", new()\n {\n DeviceId = test.Id,\n AddressFamily = \"ipv4\",\n });\n\n var configureBird = new Null.Resource(\"configureBird\", new()\n {\n Triggers = \n {\n { \"bird_conf\", birdConf },\n { \"interface\", interfaceLo0 },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.ReservedIpBlock;\nimport com.pulumi.equinix.metal.ReservedIpBlockArgs;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport com.pulumi.equinix.metal.BgpSession;\nimport com.pulumi.equinix.metal.BgpSessionArgs;\nimport com.pulumi.null.Resource;\nimport com.pulumi.null.ResourceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var bgpPassword = \"955dB0b81Ef\";\n\n final var projectId = \"\u003cUUID_of_your_project\u003e\";\n\n var addr = new ReservedIpBlock(\"addr\", ReservedIpBlockArgs.builder()\n .projectId(projectId)\n .metro(\"ny\")\n .quantity(1)\n .build());\n\n final var interfaceLo0 = Output.tuple(addr.address(), addr.netmask()).applyValue(values -\u003e {\n var address = values.t1;\n var netmask = values.t2;\n return \"\"\"\nauto lo:0\niface lo:0 inet static\n address %s\n netmask %s\n\", address,netmask);\n });\n\n var test = new Device(\"test\", DeviceArgs.builder()\n .hostname(\"terraform-test-bgp-sesh\")\n .plan(\"c3.small.x86\")\n .metro(\"ny\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .build());\n\n final var birdConf = Output.tuple(addr.address(), addr.cidr(), test.network(), test.network()).applyValue(values -\u003e {\n var address = values.t1;\n var cidr = values.t2;\n var testNetwork = values.t3;\n var testNetwork1 = values.t4;\n return \"\"\"\nfilter equinix_metal_bgp {\n if net = %s/%s then accept;\n}\nrouter id %s;\nprotocol direct {\n interface \"lo\";\n}\nprotocol kernel {\n scan time 10;\n persist;\n import all;\n export all;\n}\nprotocol device {\n scan time 10;\n}\nprotocol bgp {\n export filter equinix_metal_bgp;\n local as 65000;\n neighbor %s as 65530;\n password \"%s\";\n}\n\", address,cidr,testNetwork[2].address(),testNetwork1[2].gateway(),bgpPassword);\n });\n\n var testBgpSession = new BgpSession(\"testBgpSession\", BgpSessionArgs.builder()\n .deviceId(test.id())\n .addressFamily(\"ipv4\")\n .build());\n\n var configureBird = new Resource(\"configureBird\", ResourceArgs.builder()\n .triggers(Map.ofEntries(\n Map.entry(\"bird_conf\", birdConf),\n Map.entry(\"interface\", interfaceLo0)\n ))\n .build());\n\n }\n}\n```\n```yaml\n # you need to enable BGP config for the project. If you decide to create new\n # project, you can use the bgp_config section to enable BGP.\n # resource \"equinix_metal_project\" \"test\" {\n # name = \"testpro\"\n # bgp_config {\n # deployment_type = \"local\"\n # md5 = local.bgp_password\n # asn = 65000\n # }\n # }\n addr:\n type: equinix:metal:ReservedIpBlock\n properties:\n projectId: ${projectId}\n metro: ny\n quantity: 1\n test:\n type: equinix:metal:Device\n properties:\n hostname: terraform-test-bgp-sesh\n plan: c3.small.x86\n metro: ny\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectId: ${projectId}\n testBgpSession:\n type: equinix:metal:BgpSession\n name: test\n properties:\n deviceId: ${test.id}\n addressFamily: ipv4\n configureBird:\n type: null:Resource\n name: configure_bird\n properties:\n triggers:\n bird_conf: ${birdConf}\n interface: ${interfaceLo0}\nvariables:\n bgpPassword: 955dB0b81Ef\n projectId: \u003cUUID_of_your_project\u003e\n interfaceLo0: |\n auto lo:0\n iface lo:0 inet static\n address ${addr.address}\n netmask ${addr.netmask}\n birdConf: |\n filter equinix_metal_bgp {\n if net = ${addr.address}/${addr.cidr} then accept;\n }\n router id ${test.network[2].address};\n protocol direct {\n interface \"lo\";\n }\n protocol kernel {\n scan time 10;\n persist;\n import all;\n export all;\n }\n protocol device {\n scan time 10;\n }\n protocol bgp {\n export filter equinix_metal_bgp;\n local as 65000;\n neighbor ${test.network[2].gateway} as 65530;\n password \"${bgpPassword}\";\n }\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "addressFamily": { "type": "string", @@ -14174,7 +14174,7 @@ } }, "equinix:metal/device:Device": { - "description": "Provides an Equinix Metal device resource. This can be used to create, modify, and delete devices.\n\n\u003e **NOTE:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. Read more about sensitive data in state.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst web = new equinix.metal.Device(\"web\", {\n hostname: \"webserver1\",\n plan: \"c3.small.x86\",\n operatingSystem: \"ubuntu_20_04\",\n metro: \"sv\",\n billingCycle: \"hourly\",\n projectId: projectId,\n});\nexport const webPublicIp = pulumi.interpolate`http://${web.accessPublicIpv4}`;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nweb = equinix.metal.Device(\"web\",\n hostname=\"webserver1\",\n plan=\"c3.small.x86\",\n operating_system=\"ubuntu_20_04\",\n metro=\"sv\",\n billing_cycle=\"hourly\",\n project_id=project_id)\npulumi.export(\"webPublicIp\", web.access_public_ipv4.apply(lambda access_public_ipv4: f\"http://{access_public_ipv4}\"))\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tweb, err := metal.NewDevice(ctx, \"web\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"webserver1\"),\n\t\t\tPlan: pulumi.String(\"c3.small.x86\"),\n\t\t\tOperatingSystem: pulumi.String(\"ubuntu_20_04\"),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tBillingCycle: pulumi.String(\"hourly\"),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"webPublicIp\", web.AccessPublicIpv4.ApplyT(func(accessPublicIpv4 string) (string, error) {\n\t\t\treturn fmt.Sprintf(\"http://%v\", accessPublicIpv4), nil\n\t\t}).(pulumi.StringOutput))\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var web = new Equinix.Metal.Device(\"web\", new()\n {\n Hostname = \"webserver1\",\n Plan = \"c3.small.x86\",\n OperatingSystem = \"ubuntu_20_04\",\n Metro = \"sv\",\n BillingCycle = \"hourly\",\n ProjectId = projectId,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"webPublicIp\"] = web.AccessPublicIpv4.Apply(accessPublicIpv4 =\u003e $\"http://{accessPublicIpv4}\"),\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.Device;\nimport com.equinix.pulumi.metal.DeviceArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n var web = new Device(\"web\", DeviceArgs.builder() \n .hostname(\"webserver1\")\n .plan(\"c3.small.x86\")\n .operatingSystem(\"ubuntu_20_04\")\n .metro(\"sv\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .build());\n\n ctx.export(\"webPublicIp\", web.accessPublicIpv4().applyValue(accessPublicIpv4 -\u003e String.format(\"http://%s\", accessPublicIpv4)));\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\nresources:\n web:\n type: equinix:metal:Device\n properties:\n hostname: webserver1\n plan: c3.small.x86\n operatingSystem: ubuntu_20_04\n metro: sv\n billingCycle: hourly\n projectId: ${projectId}\noutputs:\n webPublicIp: http://${web.accessPublicIpv4}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Provides an Equinix Metal device resource. This can be used to create, modify, and delete devices.\n\n\u003e **NOTE:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. Read more about sensitive data in state.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst web1 = new equinix.metal.Device(\"web1\", {\n hostname: \"tf.coreos2\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"sv\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nweb1 = equinix.metal.Device(\"web1\",\n hostname=\"tf.coreos2\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"sv\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewDevice(ctx, \"web1\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"tf.coreos2\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var web1 = new Equinix.Metal.Device(\"web1\", new()\n {\n Hostname = \"tf.coreos2\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"sv\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var web1 = new Device(\"web1\", DeviceArgs.builder()\n .hostname(\"tf.coreos2\")\n .plan(\"c3.small.x86\")\n .metro(\"sv\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .build());\n\n }\n}\n```\n```yaml\n web1:\n type: equinix:metal:Device\n properties:\n hostname: tf.coreos2\n plan: c3.small.x86\n metro: sv\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectId: ${projectId}\n```\n{{% /example %}}\n\n{{% example %}}\n### example 4\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst web1 = new equinix.metal.Device(\"web1\", {\n hostname: \"tftest\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"ny\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n hardwareReservationId: \"next-available\",\n storage: `{\n \"disks\": [\n {\n \"device\": \"/dev/sda\",\n \"wipeTable\": true,\n \"partitions\": [\n {\n \"label\": \"BIOS\",\n \"number\": 1,\n \"size\": \"4096\"\n },\n {\n \"label\": \"SWAP\",\n \"number\": 2,\n \"size\": \"3993600\"\n },\n {\n \"label\": \"ROOT\",\n \"number\": 3,\n \"size\": \"0\"\n }\n ]\n }\n ],\n \"filesystems\": [\n {\n \"mount\": {\n \"device\": \"/dev/sda3\",\n \"format\": \"ext4\",\n \"point\": \"/\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"ROOT\"\n ]\n }\n }\n },\n {\n \"mount\": {\n \"device\": \"/dev/sda2\",\n \"format\": \"swap\",\n \"point\": \"none\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"SWAP\"\n ]\n }\n }\n }\n ]\n}\n`,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nweb1 = equinix.metal.Device(\"web1\",\n hostname=\"tftest\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"ny\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id,\n hardware_reservation_id=\"next-available\",\n storage=\"\"\"{\n \"disks\": [\n {\n \"device\": \"/dev/sda\",\n \"wipeTable\": true,\n \"partitions\": [\n {\n \"label\": \"BIOS\",\n \"number\": 1,\n \"size\": \"4096\"\n },\n {\n \"label\": \"SWAP\",\n \"number\": 2,\n \"size\": \"3993600\"\n },\n {\n \"label\": \"ROOT\",\n \"number\": 3,\n \"size\": \"0\"\n }\n ]\n }\n ],\n \"filesystems\": [\n {\n \"mount\": {\n \"device\": \"/dev/sda3\",\n \"format\": \"ext4\",\n \"point\": \"/\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"ROOT\"\n ]\n }\n }\n },\n {\n \"mount\": {\n \"device\": \"/dev/sda2\",\n \"format\": \"swap\",\n \"point\": \"none\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"SWAP\"\n ]\n }\n }\n }\n ]\n}\n\"\"\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewDevice(ctx, \"web1\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"tftest\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tHardwareReservationId: pulumi.String(\"next-available\"),\n\t\t\tStorage: pulumi.String(`{\n \"disks\": [\n {\n \"device\": \"/dev/sda\",\n \"wipeTable\": true,\n \"partitions\": [\n {\n \"label\": \"BIOS\",\n \"number\": 1,\n \"size\": \"4096\"\n },\n {\n \"label\": \"SWAP\",\n \"number\": 2,\n \"size\": \"3993600\"\n },\n {\n \"label\": \"ROOT\",\n \"number\": 3,\n \"size\": \"0\"\n }\n ]\n }\n ],\n \"filesystems\": [\n {\n \"mount\": {\n \"device\": \"/dev/sda3\",\n \"format\": \"ext4\",\n \"point\": \"/\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"ROOT\"\n ]\n }\n }\n },\n {\n \"mount\": {\n \"device\": \"/dev/sda2\",\n \"format\": \"swap\",\n \"point\": \"none\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"SWAP\"\n ]\n }\n }\n }\n ]\n}\n`),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var web1 = new Equinix.Metal.Device(\"web1\", new()\n {\n Hostname = \"tftest\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"ny\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n HardwareReservationId = \"next-available\",\n Storage = @\"{\n \"\"disks\"\": [\n {\n \"\"device\"\": \"\"/dev/sda\"\",\n \"\"wipeTable\"\": true,\n \"\"partitions\"\": [\n {\n \"\"label\"\": \"\"BIOS\"\",\n \"\"number\"\": 1,\n \"\"size\"\": \"\"4096\"\"\n },\n {\n \"\"label\"\": \"\"SWAP\"\",\n \"\"number\"\": 2,\n \"\"size\"\": \"\"3993600\"\"\n },\n {\n \"\"label\"\": \"\"ROOT\"\",\n \"\"number\"\": 3,\n \"\"size\"\": \"\"0\"\"\n }\n ]\n }\n ],\n \"\"filesystems\"\": [\n {\n \"\"mount\"\": {\n \"\"device\"\": \"\"/dev/sda3\"\",\n \"\"format\"\": \"\"ext4\"\",\n \"\"point\"\": \"\"/\"\",\n \"\"create\"\": {\n \"\"options\"\": [\n \"\"-L\"\",\n \"\"ROOT\"\"\n ]\n }\n }\n },\n {\n \"\"mount\"\": {\n \"\"device\"\": \"\"/dev/sda2\"\",\n \"\"format\"\": \"\"swap\"\",\n \"\"point\"\": \"\"none\"\",\n \"\"create\"\": {\n \"\"options\"\": [\n \"\"-L\"\",\n \"\"SWAP\"\"\n ]\n }\n }\n }\n ]\n}\n\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var web1 = new Device(\"web1\", DeviceArgs.builder()\n .hostname(\"tftest\")\n .plan(\"c3.small.x86\")\n .metro(\"ny\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .hardwareReservationId(\"next-available\")\n .storage(\"\"\"\n{\n \"disks\": [\n {\n \"device\": \"/dev/sda\",\n \"wipeTable\": true,\n \"partitions\": [\n {\n \"label\": \"BIOS\",\n \"number\": 1,\n \"size\": \"4096\"\n },\n {\n \"label\": \"SWAP\",\n \"number\": 2,\n \"size\": \"3993600\"\n },\n {\n \"label\": \"ROOT\",\n \"number\": 3,\n \"size\": \"0\"\n }\n ]\n }\n ],\n \"filesystems\": [\n {\n \"mount\": {\n \"device\": \"/dev/sda3\",\n \"format\": \"ext4\",\n \"point\": \"/\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"ROOT\"\n ]\n }\n }\n },\n {\n \"mount\": {\n \"device\": \"/dev/sda2\",\n \"format\": \"swap\",\n \"point\": \"none\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"SWAP\"\n ]\n }\n }\n }\n ]\n}\n \"\"\")\n .build());\n\n }\n}\n```\n```yaml\n web1:\n type: equinix:metal:Device\n properties:\n hostname: tftest\n plan: c3.small.x86\n metro: ny\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectId: ${projectId}\n hardwareReservationId: next-available\n storage: |\n {\n \"disks\": [\n {\n \"device\": \"/dev/sda\",\n \"wipeTable\": true,\n \"partitions\": [\n {\n \"label\": \"BIOS\",\n \"number\": 1,\n \"size\": \"4096\"\n },\n {\n \"label\": \"SWAP\",\n \"number\": 2,\n \"size\": \"3993600\"\n },\n {\n \"label\": \"ROOT\",\n \"number\": 3,\n \"size\": \"0\"\n }\n ]\n }\n ],\n \"filesystems\": [\n {\n \"mount\": {\n \"device\": \"/dev/sda3\",\n \"format\": \"ext4\",\n \"point\": \"/\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"ROOT\"\n ]\n }\n }\n },\n {\n \"mount\": {\n \"device\": \"/dev/sda2\",\n \"format\": \"swap\",\n \"point\": \"none\",\n \"create\": {\n \"options\": [\n \"-L\",\n \"SWAP\"\n ]\n }\n }\n }\n ]\n }\n```\n{{% /example %}}\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst pxe1 = new equinix.metal.Device(\"pxe1\", {\n hostname: \"tf.coreos2-pxe\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"sv\",\n operatingSystem: equinix.metal.OperatingSystem.CustomIPXE,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n ipxeScriptUrl: \"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\",\n alwaysPxe: false,\n userData: example.rendered,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\npxe1 = equinix.metal.Device(\"pxe1\",\n hostname=\"tf.coreos2-pxe\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"sv\",\n operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id,\n ipxe_script_url=\"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\",\n always_pxe=False,\n user_data=example[\"rendered\"])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewDevice(ctx, \"pxe1\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"tf.coreos2-pxe\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tIpxeScriptUrl: pulumi.String(\"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\"),\n\t\t\tAlwaysPxe: pulumi.Bool(false),\n\t\t\tUserData: pulumi.Any(example.Rendered),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pxe1 = new Equinix.Metal.Device(\"pxe1\", new()\n {\n Hostname = \"tf.coreos2-pxe\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"sv\",\n OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n IpxeScriptUrl = \"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\",\n AlwaysPxe = false,\n UserData = example.Rendered,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pxe1 = new Device(\"pxe1\", DeviceArgs.builder()\n .hostname(\"tf.coreos2-pxe\")\n .plan(\"c3.small.x86\")\n .metro(\"sv\")\n .operatingSystem(\"custom_ipxe\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .ipxeScriptUrl(\"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\")\n .alwaysPxe(\"false\")\n .userData(example.rendered())\n .build());\n\n }\n}\n```\n```yaml\n pxe1:\n type: equinix:metal:Device\n properties:\n hostname: tf.coreos2-pxe\n plan: c3.small.x86\n metro: sv\n operatingSystem: custom_ipxe\n billingCycle: hourly\n projectId: ${projectId}\n ipxeScriptUrl: https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\n alwaysPxe: 'false'\n userData: ${example.rendered}\n```\n{{% /example %}}\n\n{{% example %}}\n### example 5\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst pxe1 = new equinix.metal.Device(\"pxe1\", {\n hostname: \"tf.coreos2-pxe\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"sv\",\n operatingSystem: equinix.metal.OperatingSystem.CustomIPXE,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n ipxeScriptUrl: \"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\",\n alwaysPxe: false,\n userData: userData,\n customData: customData,\n behavior: {\n allowChanges: [\n \"custom_data\",\n \"user_data\",\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\npxe1 = equinix.metal.Device(\"pxe1\",\n hostname=\"tf.coreos2-pxe\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"sv\",\n operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id,\n ipxe_script_url=\"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\",\n always_pxe=False,\n user_data=user_data,\n custom_data=custom_data,\n behavior=equinix.metal.DeviceBehaviorArgs(\n allow_changes=[\n \"custom_data\",\n \"user_data\",\n ],\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewDevice(ctx, \"pxe1\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"tf.coreos2-pxe\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tIpxeScriptUrl: pulumi.String(\"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\"),\n\t\t\tAlwaysPxe: pulumi.Bool(false),\n\t\t\tUserData: pulumi.Any(userData),\n\t\t\tCustomData: pulumi.Any(customData),\n\t\t\tBehavior: \u0026metal.DeviceBehaviorArgs{\n\t\t\t\tAllowChanges: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"custom_data\"),\n\t\t\t\t\tpulumi.String(\"user_data\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pxe1 = new Equinix.Metal.Device(\"pxe1\", new()\n {\n Hostname = \"tf.coreos2-pxe\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"sv\",\n OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n IpxeScriptUrl = \"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\",\n AlwaysPxe = false,\n UserData = userData,\n CustomData = customData,\n Behavior = new Equinix.Metal.Inputs.DeviceBehaviorArgs\n {\n AllowChanges = new[]\n {\n \"custom_data\",\n \"user_data\",\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport com.pulumi.equinix.metal.inputs.DeviceBehaviorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pxe1 = new Device(\"pxe1\", DeviceArgs.builder()\n .hostname(\"tf.coreos2-pxe\")\n .plan(\"c3.small.x86\")\n .metro(\"sv\")\n .operatingSystem(\"custom_ipxe\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .ipxeScriptUrl(\"https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\")\n .alwaysPxe(\"false\")\n .userData(userData)\n .customData(customData)\n .behavior(DeviceBehaviorArgs.builder()\n .allowChanges( \n \"custom_data\",\n \"user_data\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n pxe1:\n type: equinix:metal:Device\n properties:\n hostname: tf.coreos2-pxe\n plan: c3.small.x86\n metro: sv\n operatingSystem: custom_ipxe\n billingCycle: hourly\n projectId: ${projectId}\n ipxeScriptUrl: https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe\n alwaysPxe: 'false'\n userData: ${userData}\n customData: ${customData}\n behavior:\n allowChanges:\n - custom_data\n - user_data\n```\n{{% /example %}}\n\n{{% example %}}\n### example 3\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst web1 = new equinix.metal.Device(\"web1\", {\n hostname: \"tf.coreos2\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"ny\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n ipAddresses: [{\n type: \"private_ipv4\",\n cidr: 30,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nweb1 = equinix.metal.Device(\"web1\",\n hostname=\"tf.coreos2\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"ny\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id,\n ip_addresses=[equinix.metal.DeviceIpAddressArgs(\n type=\"private_ipv4\",\n cidr=30,\n )])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewDevice(ctx, \"web1\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"tf.coreos2\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tIpAddresses: metal.DeviceIpAddressArray{\n\t\t\t\t\u0026metal.DeviceIpAddressArgs{\n\t\t\t\t\tType: pulumi.String(\"private_ipv4\"),\n\t\t\t\t\tCidr: pulumi.Int(30),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var web1 = new Equinix.Metal.Device(\"web1\", new()\n {\n Hostname = \"tf.coreos2\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"ny\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n IpAddresses = new[]\n {\n new Equinix.Metal.Inputs.DeviceIpAddressArgs\n {\n Type = \"private_ipv4\",\n Cidr = 30,\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var web1 = new Device(\"web1\", DeviceArgs.builder()\n .hostname(\"tf.coreos2\")\n .plan(\"c3.small.x86\")\n .metro(\"ny\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .ipAddresses(DeviceIpAddressArgs.builder()\n .type(\"private_ipv4\")\n .cidr(30)\n .build())\n .build());\n\n }\n}\n```\n```yaml\n web1:\n type: equinix:metal:Device\n properties:\n hostname: tf.coreos2\n plan: c3.small.x86\n metro: ny\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectId: ${projectId}\n ipAddresses:\n - type: private_ipv4\n cidr: 30\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "accessPrivateIpv4": { "type": "string", @@ -14785,7 +14785,7 @@ } }, "equinix:metal/deviceNetworkType:DeviceNetworkType": { - "description": "\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst deviceId = config.require(\"deviceId\");\nconst networkType = config.get(\"networkType\") || \"hybrid\";\nconst deviceNetwork = new equinix.metal.DeviceNetworkType(\"deviceNetwork\", {\n deviceId: deviceId,\n type: networkType,\n});\nexport const deviceNetworkId = deviceNetwork.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\ndevice_id = config.require(\"deviceId\")\nnetwork_type = config.get(\"networkType\")\nif network_type is None:\n network_type = \"hybrid\"\ndevice_network = equinix.metal.DeviceNetworkType(\"deviceNetwork\",\n device_id=device_id,\n type=network_type)\npulumi.export(\"deviceNetworkId\", device_network.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdeviceId := cfg.Require(\"deviceId\")\n\t\tnetworkType := \"hybrid\"\n\t\tif param := cfg.Get(\"networkType\"); param != \"\" {\n\t\t\tnetworkType = param\n\t\t}\n\t\tdeviceNetwork, err := metal.NewDeviceNetworkType(ctx, \"deviceNetwork\", \u0026metal.DeviceNetworkTypeArgs{\n\t\t\tDeviceId: pulumi.String(deviceId),\n\t\t\tType: pulumi.String(networkType),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"deviceNetworkId\", deviceNetwork.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var deviceId = config.Require(\"deviceId\");\n var networkType = config.Get(\"networkType\") ?? \"hybrid\";\n var deviceNetwork = new Equinix.Metal.DeviceNetworkType(\"deviceNetwork\", new()\n {\n DeviceId = deviceId,\n Type = networkType,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"deviceNetworkId\"] = deviceNetwork.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.DeviceNetworkType;\nimport com.equinix.pulumi.metal.DeviceNetworkTypeArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var deviceId = config.get(\"deviceId\").get();\n final var networkType = config.get(\"networkType\").orElse(\"hybrid\");\n var deviceNetwork = new DeviceNetworkType(\"deviceNetwork\", DeviceNetworkTypeArgs.builder() \n .deviceId(deviceId)\n .type(networkType)\n .build());\n\n ctx.export(\"deviceNetworkId\", deviceNetwork.id());\n }\n}\n```\n```yaml\nconfig:\n deviceId:\n type: string\n networkType:\n type: string\n default: hybrid\nresources:\n deviceNetwork:\n type: equinix:metal:DeviceNetworkType\n properties:\n deviceId: ${deviceId}\n type: ${networkType}\noutputs:\n deviceNetworkId: ${deviceNetwork.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can also be imported using existing device ID:\n\n```sh\n$ pulumi import equinix:metal/deviceNetworkType:DeviceNetworkType equinix_metal_device_network_type {existing device_id}\n```\n\n\n{{% /examples %}}", + "description": "\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst deviceId = config.require(\"deviceId\");\nconst networkType = config.get(\"networkType\") || \"hybrid\";\nconst deviceNetwork = new equinix.metal.DeviceNetworkType(\"deviceNetwork\", {\n deviceId: deviceId,\n type: networkType,\n});\nexport const deviceNetworkId = deviceNetwork.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\ndevice_id = config.require(\"deviceId\")\nnetwork_type = config.get(\"networkType\")\nif network_type is None:\n network_type = \"hybrid\"\ndevice_network = equinix.metal.DeviceNetworkType(\"deviceNetwork\",\n device_id=device_id,\n type=network_type)\npulumi.export(\"deviceNetworkId\", device_network.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdeviceId := cfg.Require(\"deviceId\")\n\t\tnetworkType := \"hybrid\"\n\t\tif param := cfg.Get(\"networkType\"); param != \"\" {\n\t\t\tnetworkType = param\n\t\t}\n\t\tdeviceNetwork, err := metal.NewDeviceNetworkType(ctx, \"deviceNetwork\", \u0026metal.DeviceNetworkTypeArgs{\n\t\t\tDeviceId: pulumi.String(deviceId),\n\t\t\tType: pulumi.String(networkType),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"deviceNetworkId\", deviceNetwork.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var deviceId = config.Require(\"deviceId\");\n var networkType = config.Get(\"networkType\") ?? \"hybrid\";\n var deviceNetwork = new Equinix.Metal.DeviceNetworkType(\"deviceNetwork\", new()\n {\n DeviceId = deviceId,\n Type = networkType,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"deviceNetworkId\"] = deviceNetwork.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.DeviceNetworkType;\nimport com.pulumi.equinix.metal.DeviceNetworkTypeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var deviceId = config.get(\"deviceId\");\n final var networkType = config.get(\"networkType\").orElse(\"hybrid\");\n var deviceNetwork = new DeviceNetworkType(\"deviceNetwork\", DeviceNetworkTypeArgs.builder()\n .deviceId(deviceId)\n .type(networkType)\n .build());\n\n ctx.export(\"deviceNetworkId\", deviceNetwork.id());\n }\n}\n```\n```yaml\nconfig:\n deviceId:\n type: string\n networkType:\n type: string\n default: hybrid\nresources:\n deviceNetwork:\n type: equinix:metal:DeviceNetworkType\n properties:\n deviceId: ${deviceId}\n type: ${networkType}\noutputs:\n deviceNetworkId: ${deviceNetwork.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can also be imported using existing device ID:\n\n```sh\n$ pulumi import equinix:metal/deviceNetworkType:DeviceNetworkType equinix_metal_device_network_type {existing device_id}\n```\n\n\n{{% /examples %}}", "properties": { "deviceId": { "type": "string", @@ -14832,7 +14832,7 @@ } }, "equinix:metal/gateway:Gateway": { - "description": "Use this resource to create Metal Gateway resources in Equinix Metal.\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst vlanId = config.require(\"vlanId\");\nconst gateway = new equinix.metal.Gateway(\"gateway\", {\n projectId: projectId,\n vlanId: vlanId,\n privateIpv4SubnetSize: 8,\n});\nexport const gatewayState = gateway.state;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nvlan_id = config.require(\"vlanId\")\ngateway = equinix.metal.Gateway(\"gateway\",\n project_id=project_id,\n vlan_id=vlan_id,\n private_ipv4_subnet_size=8)\npulumi.export(\"gatewayState\", gateway.state)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tvlanId := cfg.Require(\"vlanId\")\n\t\tgateway, err := metal.NewGateway(ctx, \"gateway\", \u0026metal.GatewayArgs{\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tVlanId: pulumi.String(vlanId),\n\t\t\tPrivateIpv4SubnetSize: pulumi.Int(8),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"gatewayState\", gateway.State)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var vlanId = config.Require(\"vlanId\");\n var gateway = new Equinix.Metal.Gateway(\"gateway\", new()\n {\n ProjectId = projectId,\n VlanId = vlanId,\n PrivateIpv4SubnetSize = 8,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"gatewayState\"] = gateway.State,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.Gateway;\nimport com.equinix.pulumi.metal.GatewayArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var vlanId = config.get(\"vlanId\").get();\n var gateway = new Gateway(\"gateway\", GatewayArgs.builder() \n .projectId(projectId)\n .vlanId(vlanId)\n .privateIpv4SubnetSize(8)\n .build());\n\n ctx.export(\"gatewayState\", gateway.state());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n vlanId:\n type: string\nresources:\n gateway:\n type: equinix:metal:Gateway\n properties:\n projectId: ${projectId}\n vlanId: ${vlanId}\n privateIpv4SubnetSize: 8\noutputs:\n gatewayState: ${gateway.state}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Use this resource to create Metal Gateway resources in Equinix Metal.\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.metal.Vlan(\"test\", {\n description: \"test VLAN in SV\",\n metro: \"sv\",\n projectId: projectId,\n});\nconst testGateway = new equinix.metal.Gateway(\"testGateway\", {\n projectId: projectId,\n vlanId: test.id,\n privateIpv4SubnetSize: 8,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.metal.Vlan(\"test\",\n description=\"test VLAN in SV\",\n metro=\"sv\",\n project_id=project_id)\ntest_gateway = equinix.metal.Gateway(\"testGateway\",\n project_id=project_id,\n vlan_id=test.id,\n private_ipv4_subnet_size=8)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := metal.NewVlan(ctx, \"test\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"test VLAN in SV\"),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewGateway(ctx, \"testGateway\", \u0026metal.GatewayArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tVlanId: test.ID(),\n\t\t\tPrivateIpv4SubnetSize: pulumi.Int(8),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.Metal.Vlan(\"test\", new()\n {\n Description = \"test VLAN in SV\",\n Metro = \"sv\",\n ProjectId = projectId,\n });\n\n var testGateway = new Equinix.Metal.Gateway(\"testGateway\", new()\n {\n ProjectId = projectId,\n VlanId = test.Id,\n PrivateIpv4SubnetSize = 8,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Vlan;\nimport com.pulumi.equinix.metal.VlanArgs;\nimport com.pulumi.equinix.metal.Gateway;\nimport com.pulumi.equinix.metal.GatewayArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Vlan(\"test\", VlanArgs.builder()\n .description(\"test VLAN in SV\")\n .metro(\"sv\")\n .projectId(projectId)\n .build());\n\n var testGateway = new Gateway(\"testGateway\", GatewayArgs.builder()\n .projectId(projectId)\n .vlanId(test.id())\n .privateIpv4SubnetSize(8)\n .build());\n\n }\n}\n```\n```yaml\n # Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses\n test:\n type: equinix:metal:Vlan\n properties:\n description: test VLAN in SV\n metro: sv\n projectId: ${projectId}\n testGateway:\n type: equinix:metal:Gateway\n name: test\n properties:\n projectId: ${projectId}\n vlanId: ${test.id}\n privateIpv4SubnetSize: 8\n```\n{{% /example %}}\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.metal.Vlan(\"test\", {\n description: \"test VLAN in SV\",\n metro: \"sv\",\n projectId: projectId,\n});\nconst test1 = new equinix.metal.ReservedIpBlock(\"test1\", {\n projectId: projectId,\n metro: \"sv\",\n quantity: 8,\n});\nconst testGateway = new equinix.metal.Gateway(\"testGateway\", {\n projectId: projectId,\n vlanId: test.id,\n ipReservationId: testEquinixMetalReservedIpBlock.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.metal.Vlan(\"test\",\n description=\"test VLAN in SV\",\n metro=\"sv\",\n project_id=project_id)\ntest1 = equinix.metal.ReservedIpBlock(\"test1\",\n project_id=project_id,\n metro=\"sv\",\n quantity=8)\ntest_gateway = equinix.metal.Gateway(\"testGateway\",\n project_id=project_id,\n vlan_id=test.id,\n ip_reservation_id=test_equinix_metal_reserved_ip_block[\"id\"])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := metal.NewVlan(ctx, \"test\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"test VLAN in SV\"),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewReservedIpBlock(ctx, \"test1\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tQuantity: pulumi.Int(8),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewGateway(ctx, \"testGateway\", \u0026metal.GatewayArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tVlanId: test.ID(),\n\t\t\tIpReservationId: pulumi.Any(testEquinixMetalReservedIpBlock.Id),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.Metal.Vlan(\"test\", new()\n {\n Description = \"test VLAN in SV\",\n Metro = \"sv\",\n ProjectId = projectId,\n });\n\n var test1 = new Equinix.Metal.ReservedIpBlock(\"test1\", new()\n {\n ProjectId = projectId,\n Metro = \"sv\",\n Quantity = 8,\n });\n\n var testGateway = new Equinix.Metal.Gateway(\"testGateway\", new()\n {\n ProjectId = projectId,\n VlanId = test.Id,\n IpReservationId = testEquinixMetalReservedIpBlock.Id,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Vlan;\nimport com.pulumi.equinix.metal.VlanArgs;\nimport com.pulumi.equinix.metal.ReservedIpBlock;\nimport com.pulumi.equinix.metal.ReservedIpBlockArgs;\nimport com.pulumi.equinix.metal.Gateway;\nimport com.pulumi.equinix.metal.GatewayArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Vlan(\"test\", VlanArgs.builder()\n .description(\"test VLAN in SV\")\n .metro(\"sv\")\n .projectId(projectId)\n .build());\n\n var test1 = new ReservedIpBlock(\"test1\", ReservedIpBlockArgs.builder()\n .projectId(projectId)\n .metro(\"sv\")\n .quantity(8)\n .build());\n\n var testGateway = new Gateway(\"testGateway\", GatewayArgs.builder()\n .projectId(projectId)\n .vlanId(test.id())\n .ipReservationId(testEquinixMetalReservedIpBlock.id())\n .build());\n\n }\n}\n```\n```yaml\n # Create Metal Gateway for a VLAN and reserved IP address block\n test:\n type: equinix:metal:Vlan\n properties:\n description: test VLAN in SV\n metro: sv\n projectId: ${projectId}\n test1:\n type: equinix:metal:ReservedIpBlock\n properties:\n projectId: ${projectId}\n metro: sv\n quantity: 8\n testGateway:\n type: equinix:metal:Gateway\n name: test\n properties:\n projectId: ${projectId}\n vlanId: ${test.id}\n ipReservationId: ${testEquinixMetalReservedIpBlock.id}\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "ipReservationId": { "type": "string", @@ -14930,7 +14930,7 @@ } }, "equinix:metal/interconnection:Interconnection": { - "description": "Use this resource to request the creation an Interconnection asset to connect with other parties using [Equinix Fabric - software-defined interconnections](https://metal.equinix.com/developers/docs/networking/fabric/).\n\n\u003e Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst metro = config.get(\"metro\") || \"SV\";\nconst speedInMbps = config.getNumber(\"speedInMbps\") || 200;\nconst connection = new equinix.metal.Interconnection(\"connection\", {\n name: \"fabric-port-to-metal\",\n projectId: projectId,\n type: \"shared\",\n redundancy: \"primary\",\n metro: metro,\n speed: `${speedInMbps}Mbps`,\n serviceTokenType: \"z_side\",\n});\nexport const connectionStatus = connection.status;\nexport const connectionTokens = connection.serviceTokens;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"SV\"\nspeed_in_mbps = config.get_int(\"speedInMbps\")\nif speed_in_mbps is None:\n speed_in_mbps = 200\nconnection = equinix.metal.Interconnection(\"connection\",\n name=\"fabric-port-to-metal\",\n project_id=project_id,\n type=\"shared\",\n redundancy=\"primary\",\n metro=metro,\n speed=f\"{speed_in_mbps}Mbps\",\n service_token_type=\"z_side\")\npulumi.export(\"connectionStatus\", connection.status)\npulumi.export(\"connectionTokens\", connection.service_tokens)\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tmetro := \"SV\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tspeedInMbps := 200\n\t\tif param := cfg.GetInt(\"speedInMbps\"); param != 0 {\n\t\t\tspeedInMbps = param\n\t\t}\n\t\tconnection, err := metal.NewInterconnection(ctx, \"connection\", \u0026metal.InterconnectionArgs{\n\t\t\tName: pulumi.String(\"fabric-port-to-metal\"),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tType: pulumi.String(\"shared\"),\n\t\t\tRedundancy: pulumi.String(\"primary\"),\n\t\t\tMetro: pulumi.String(metro),\n\t\t\tSpeed: pulumi.String(fmt.Sprintf(\"%vMbps\", speedInMbps)),\n\t\t\tServiceTokenType: pulumi.String(\"z_side\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"connectionStatus\", connection.Status)\n\t\tctx.Export(\"connectionTokens\", connection.ServiceTokens)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var metro = config.Get(\"metro\") ?? \"SV\";\n var speedInMbps = config.GetNumber(\"speedInMbps\") ?? 200;\n var connection = new Equinix.Metal.Interconnection(\"connection\", new()\n {\n Name = \"fabric-port-to-metal\",\n ProjectId = projectId,\n Type = \"shared\",\n Redundancy = \"primary\",\n Metro = metro,\n Speed = $\"{speedInMbps}Mbps\",\n ServiceTokenType = \"z_side\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"connectionStatus\"] = connection.Status,\n [\"connectionTokens\"] = connection.ServiceTokens,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.metal.Interconnection;\nimport com.equinix.pulumi.metal.InterconnectionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var metro = config.get(\"metro\").orElse(\"SV\");\n final var speedInMbps = Integer.parseInt(config.get(\"speedInMbps\").orElse(\"200\"));\n var connection = new Interconnection(\"connection\", InterconnectionArgs.builder() \n .name(\"fabric-port-to-metal\")\n .projectId(projectId)\n .type(\"shared\")\n .redundancy(\"primary\")\n .metro(metro)\n .speed(String.format(\"%sMbps\", speedInMbps))\n .serviceTokenType(\"z_side\")\n .build());\n\n ctx.export(\"connectionStatus\", connection.status());\n ctx.export(\"connectionTokens\", connection.serviceTokens());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n metro:\n type: string\n default: SV\n speedInMbps:\n type: integer\n default: 200\nresources:\n connection:\n type: equinix:metal:Interconnection\n properties:\n name: fabric-port-to-metal\n projectId: ${projectId}\n type: shared\n redundancy: primary\n metro: ${metro}\n speed: ${speedInMbps}Mbps\n serviceTokenType: z_side\noutputs:\n connectionStatus: ${connection.status}\n connectionTokens: ${connection.serviceTokens}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Use this resource to request the creation an Interconnection asset to connect with other parties using [Equinix Fabric - software-defined interconnections](https://metal.equinix.com/developers/docs/networking/fabric/).\n\n\u003e Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example metal billed token\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst metro = config.get(\"metro\") || \"SV\";\nconst speedInMbps = config.getNumber(\"speedInMbps\") || 1000;\nconst connection = new equinix.metal.Interconnection(\"connection\", {\n name: \"metal-to-cloudprovider\",\n projectId: projectId,\n type: \"shared\",\n redundancy: \"primary\",\n metro: metro,\n speed: `${speedInMbps}Mbps`,\n serviceTokenType: \"a_side\",\n});\nexport const connectionStatus = connection.status;\nexport const connectionTokens = connection.serviceTokens;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"SV\"\nspeed_in_mbps = config.get_int(\"speedInMbps\")\nif speed_in_mbps is None:\n speed_in_mbps = 1000\nconnection = equinix.metal.Interconnection(\"connection\",\n name=\"metal-to-cloudprovider\",\n project_id=project_id,\n type=\"shared\",\n redundancy=\"primary\",\n metro=metro,\n speed=f\"{speed_in_mbps}Mbps\",\n service_token_type=\"a_side\")\npulumi.export(\"connectionStatus\", connection.status)\npulumi.export(\"connectionTokens\", connection.service_tokens)\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tmetro := \"SV\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tspeedInMbps := 1000\n\t\tif param := cfg.GetInt(\"speedInMbps\"); param != 0 {\n\t\t\tspeedInMbps = param\n\t\t}\n\t\tconnection, err := metal.NewInterconnection(ctx, \"connection\", \u0026metal.InterconnectionArgs{\n\t\t\tName: pulumi.String(\"metal-to-cloudprovider\"),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tType: pulumi.String(\"shared\"),\n\t\t\tRedundancy: pulumi.String(\"primary\"),\n\t\t\tMetro: pulumi.String(metro),\n\t\t\tSpeed: pulumi.String(fmt.Sprintf(\"%vMbps\", speedInMbps)),\n\t\t\tServiceTokenType: pulumi.String(\"a_side\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"connectionStatus\", connection.Status)\n\t\tctx.Export(\"connectionTokens\", connection.ServiceTokens)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var metro = config.Get(\"metro\") ?? \"SV\";\n var speedInMbps = config.GetInt32(\"speedInMbps\") ?? 1000;\n var connection = new Equinix.Metal.Interconnection(\"connection\", new()\n {\n Name = \"metal-to-cloudprovider\",\n ProjectId = projectId,\n Type = \"shared\",\n Redundancy = \"primary\",\n Metro = metro,\n Speed = $\"{speedInMbps}Mbps\",\n ServiceTokenType = \"a_side\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"connectionStatus\"] = connection.Status,\n [\"connectionTokens\"] = connection.ServiceTokens,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Interconnection;\nimport com.pulumi.equinix.metal.InterconnectionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\");\n final var metro = config.get(\"metro\").orElse(\"SV\");\n final var speedInMbps = config.get(\"speedInMbps\").orElse(1000);\n var connection = new Interconnection(\"connection\", InterconnectionArgs.builder()\n .name(\"metal-to-cloudprovider\")\n .projectId(projectId)\n .type(\"shared\")\n .redundancy(\"primary\")\n .metro(metro)\n .speed(String.format(\"%sMbps\", speedInMbps))\n .serviceTokenType(\"a_side\")\n .build());\n\n ctx.export(\"connectionStatus\", connection.status());\n ctx.export(\"connectionTokens\", connection.serviceTokens());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n metro:\n type: string\n default: SV\n speedInMbps:\n type: integer\n default: 1000\nresources:\n connection:\n type: equinix:metal:Interconnection\n properties:\n name: metal-to-cloudprovider\n projectId: ${projectId}\n type: shared\n redundancy: primary\n metro: ${metro}\n speed: ${speedInMbps}Mbps\n serviceTokenType: a_side\noutputs:\n connectionStatus: ${connection.status}\n connectionTokens: ${connection.serviceTokens}\n```\n{{% /example %}}\n\n{{% example %}}\n### example fabric billed token\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst metro = config.get(\"metro\") || \"SV\";\nconst speedInMbps = config.getNumber(\"speedInMbps\") || 200;\nconst connection = new equinix.metal.Interconnection(\"connection\", {\n name: \"fabric-port-to-metal\",\n projectId: projectId,\n type: \"shared\",\n redundancy: \"primary\",\n metro: metro,\n speed: `${speedInMbps}Mbps`,\n serviceTokenType: \"z_side\",\n});\nexport const connectionStatus = connection.status;\nexport const connectionTokens = connection.serviceTokens;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"SV\"\nspeed_in_mbps = config.get_int(\"speedInMbps\")\nif speed_in_mbps is None:\n speed_in_mbps = 200\nconnection = equinix.metal.Interconnection(\"connection\",\n name=\"fabric-port-to-metal\",\n project_id=project_id,\n type=\"shared\",\n redundancy=\"primary\",\n metro=metro,\n speed=f\"{speed_in_mbps}Mbps\",\n service_token_type=\"z_side\")\npulumi.export(\"connectionStatus\", connection.status)\npulumi.export(\"connectionTokens\", connection.service_tokens)\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tmetro := \"SV\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tspeedInMbps := 200\n\t\tif param := cfg.GetInt(\"speedInMbps\"); param != 0 {\n\t\t\tspeedInMbps = param\n\t\t}\n\t\tconnection, err := metal.NewInterconnection(ctx, \"connection\", \u0026metal.InterconnectionArgs{\n\t\t\tName: pulumi.String(\"fabric-port-to-metal\"),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tType: pulumi.String(\"shared\"),\n\t\t\tRedundancy: pulumi.String(\"primary\"),\n\t\t\tMetro: pulumi.String(metro),\n\t\t\tSpeed: pulumi.String(fmt.Sprintf(\"%vMbps\", speedInMbps)),\n\t\t\tServiceTokenType: pulumi.String(\"z_side\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"connectionStatus\", connection.Status)\n\t\tctx.Export(\"connectionTokens\", connection.ServiceTokens)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var metro = config.Get(\"metro\") ?? \"SV\";\n var speedInMbps = config.GetInt32(\"speedInMbps\") ?? 200;\n var connection = new Equinix.Metal.Interconnection(\"connection\", new()\n {\n Name = \"fabric-port-to-metal\",\n ProjectId = projectId,\n Type = \"shared\",\n Redundancy = \"primary\",\n Metro = metro,\n Speed = $\"{speedInMbps}Mbps\",\n ServiceTokenType = \"z_side\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"connectionStatus\"] = connection.Status,\n [\"connectionTokens\"] = connection.ServiceTokens,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Interconnection;\nimport com.pulumi.equinix.metal.InterconnectionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\");\n final var metro = config.get(\"metro\").orElse(\"SV\");\n final var speedInMbps = config.get(\"speedInMbps\").orElse(200);\n var connection = new Interconnection(\"connection\", InterconnectionArgs.builder()\n .name(\"fabric-port-to-metal\")\n .projectId(projectId)\n .type(\"shared\")\n .redundancy(\"primary\")\n .metro(metro)\n .speed(String.format(\"%sMbps\", speedInMbps))\n .serviceTokenType(\"z_side\")\n .build());\n\n ctx.export(\"connectionStatus\", connection.status());\n ctx.export(\"connectionTokens\", connection.serviceTokens());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n metro:\n type: string\n default: SV\n speedInMbps:\n type: integer\n default: 200\nresources:\n connection:\n type: equinix:metal:Interconnection\n properties:\n name: fabric-port-to-metal\n projectId: ${projectId}\n type: shared\n redundancy: primary\n metro: ${metro}\n speed: ${speedInMbps}Mbps\n serviceTokenType: z_side\noutputs:\n connectionStatus: ${connection.status}\n connectionTokens: ${connection.serviceTokens}\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "authorizationCode": { "type": "string", @@ -15228,7 +15228,7 @@ } }, "equinix:metal/ipAttachment:IpAttachment": { - "description": "Provides a resource to attach elastic IP subnets to devices.\n\nTo attach an IP subnet from a reserved block to a provisioned device, you must derive a subnet CIDR belonging to one of your reserved blocks in the same project and metro as the target device.\n\nFor example, you have reserved IPv4 address block `147.229.10.152/30`, you can choose to assign either the whole block as one subnet to a device; or 2 subnets with CIDRs `147.229.10.152/31` and `147.229.10.154/31`; or 4 subnets with mask prefix length `32`. More about the elastic IP subnets is [here](https://metal.equinix.com/developers/docs/networking/elastic-ips/).\n\nDevice and reserved block must be in the same metro.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst deviceId = config.require(\"deviceId\");\nconst subnetCidr = config.get(\"subnetCidr\") || \"147.229.10.152/31\";\nconst ipAttachResource = new equinix.metal.IpAttachment(\"ipAttach\", {\n deviceId: deviceId,\n cidrNotation: subnetCidr,\n});\nexport const ipAttach = ipAttachResource.id;\nexport const ipNetmask = ipAttachResource.netmask;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\ndevice_id = config.require(\"deviceId\")\nsubnet_cidr = config.get(\"subnetCidr\")\nif subnet_cidr is None:\n subnet_cidr = \"147.229.10.152/31\"\nip_attach_resource = equinix.metal.IpAttachment(\"ipAttach\",\n device_id=device_id,\n cidr_notation=subnet_cidr)\npulumi.export(\"ipAttach\", ip_attach_resource.id)\npulumi.export(\"ipNetmask\", ip_attach_resource.netmask)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdeviceId := cfg.Require(\"deviceId\")\n\t\tsubnetCidr := \"147.229.10.152/31\"\n\t\tif param := cfg.Get(\"subnetCidr\"); param != \"\" {\n\t\t\tsubnetCidr = param\n\t\t}\n\t\tipAttachResource, err := metal.NewIpAttachment(ctx, \"ipAttach\", \u0026metal.IpAttachmentArgs{\n\t\t\tDeviceId: pulumi.String(deviceId),\n\t\t\tCidrNotation: pulumi.String(subnetCidr),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ipAttach\", ipAttachResource.ID())\n\t\tctx.Export(\"ipNetmask\", ipAttachResource.Netmask)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var deviceId = config.Require(\"deviceId\");\n var subnetCidr = config.Get(\"subnetCidr\") ?? \"147.229.10.152/31\";\n var ipAttachResource = new Equinix.Metal.IpAttachment(\"ipAttach\", new()\n {\n DeviceId = deviceId,\n CidrNotation = subnetCidr,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ipAttach\"] = ipAttachResource.Id,\n [\"ipNetmask\"] = ipAttachResource.Netmask,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.IpAttachment;\nimport com.equinix.pulumi.metal.IpAttachmentArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var deviceId = config.get(\"deviceId\").get();\n final var subnetCidr = config.get(\"subnetCidr\").orElse(\"147.229.10.152/31\");\n var ipAttachResource = new IpAttachment(\"ipAttachResource\", IpAttachmentArgs.builder() \n .deviceId(deviceId)\n .cidrNotation(subnetCidr)\n .build());\n\n ctx.export(\"ipAttach\", ipAttachResource.id());\n ctx.export(\"ipNetmask\", ipAttachResource.netmask());\n }\n}\n```\n```yaml\nconfig:\n deviceId:\n type: string\n subnetCidr:\n type: string\n default: 147.229.10.152/31\nresources:\n ipAttach:\n type: equinix:metal:IpAttachment\n properties:\n deviceId: ${deviceId}\n cidrNotation: ${subnetCidr}\noutputs:\n ipAttach: ${ipAttach.id}\n ipNetmask: ${ipAttach.netmask}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Provides a resource to attach elastic IP subnets to devices.\n\nTo attach an IP subnet from a reserved block to a provisioned device, you must derive a subnet CIDR belonging to one of your reserved blocks in the same project and metro as the target device.\n\nFor example, you have reserved IPv4 address block `147.229.10.152/30`, you can choose to assign either the whole block as one subnet to a device; or 2 subnets with CIDRs `147.229.10.152/31` and `147.229.10.154/31`; or 4 subnets with mask prefix length `32`. More about the elastic IP subnets is [here](https://metal.equinix.com/developers/docs/networking/elastic-ips/).\n\nDevice and reserved block must be in the same metro.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as std from \"@pulumi/std\";\n\nconst myblock = new equinix.metal.ReservedIpBlock(\"myblock\", {\n projectId: projectId,\n metro: \"ny\",\n quantity: 2,\n});\nconst firstAddressAssignment = new equinix.metal.IpAttachment(\"firstAddressAssignment\", {\n deviceId: mydevice.id,\n cidrNotation: std.joinOutput({\n separator: \"/\",\n input: [\n std.cidrhostOutput({\n input: myblockMetalReservedIpBlock.cidrNotation,\n host: 0,\n }).apply(invoke =\u003e invoke.result),\n \"32\",\n ],\n }).apply(invoke =\u003e invoke.result),\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\nimport pulumi_std as std\n\nmyblock = equinix.metal.ReservedIpBlock(\"myblock\",\n project_id=project_id,\n metro=\"ny\",\n quantity=2)\nfirst_address_assignment = equinix.metal.IpAttachment(\"firstAddressAssignment\",\n device_id=mydevice[\"id\"],\n cidr_notation=std.join_output(separator=\"/\",\n input=[\n std.cidrhost_output(input=myblock_metal_reserved_ip_block[\"cidrNotation\"],\n host=0).apply(lambda invoke: invoke.result),\n \"32\",\n ]).apply(lambda invoke: invoke.result))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\n_, err := metal.NewReservedIpBlock(ctx, \"myblock\", \u0026metal.ReservedIpBlockArgs{\nProjectId: pulumi.Any(projectId),\nMetro: pulumi.String(\"ny\"),\nQuantity: pulumi.Int(2),\n})\nif err != nil {\nreturn err\n}\ninvokeJoin, err := std.Join(ctx, invokeCidrhost1, err := std.Cidrhost(ctx, \u0026std.CidrhostArgs{\nInput: myblockMetalReservedIpBlock.CidrNotation,\nHost: 0,\n}, nil)\nif err != nil {\nreturn err\n}\n\u0026std.JoinArgs{\nSeparator: \"/\",\nInput: []*string{\ninvokeCidrhost1.Result,\n\"32\",\n},\n}, nil)\nif err != nil {\nreturn err\n}\n_, err = metal.NewIpAttachment(ctx, \"firstAddressAssignment\", \u0026metal.IpAttachmentArgs{\nDeviceId: pulumi.Any(mydevice.Id),\nCidrNotation: invokeJoin.Result,\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var myblock = new Equinix.Metal.ReservedIpBlock(\"myblock\", new()\n {\n ProjectId = projectId,\n Metro = \"ny\",\n Quantity = 2,\n });\n\n var firstAddressAssignment = new Equinix.Metal.IpAttachment(\"firstAddressAssignment\", new()\n {\n DeviceId = mydevice.Id,\n CidrNotation = Std.Cidrhost.Invoke(new()\n {\n Input = myblockMetalReservedIpBlock.CidrNotation,\n Host = 0,\n }).Apply(invoke =\u003e Std.Join.Invoke(new()\n {\n Separator = \"/\",\n Input = new[]\n {\n invoke.Result,\n \"32\",\n },\n })).Apply(invoke =\u003e invoke.Result),\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.ReservedIpBlock;\nimport com.pulumi.equinix.metal.ReservedIpBlockArgs;\nimport com.pulumi.equinix.metal.IpAttachment;\nimport com.pulumi.equinix.metal.IpAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var myblock = new ReservedIpBlock(\"myblock\", ReservedIpBlockArgs.builder()\n .projectId(projectId)\n .metro(\"ny\")\n .quantity(2)\n .build());\n\n var firstAddressAssignment = new IpAttachment(\"firstAddressAssignment\", IpAttachmentArgs.builder()\n .deviceId(mydevice.id())\n .cidrNotation(StdFunctions.join(JoinArgs.builder()\n .separator(\"/\")\n .input( \n StdFunctions.cidrhost(CidrhostArgs.builder()\n .input(myblockMetalReservedIpBlock.cidrNotation())\n .host(0)\n .build()).result(),\n \"32\")\n .build()).result())\n .build());\n\n }\n}\n```\n```yaml\n # Reserve /30 block of max 2 public IPv4 addresses in metro ny for myproject\n myblock:\n type: equinix:metal:ReservedIpBlock\n properties:\n projectId: ${projectId}\n metro: ny\n quantity: 2\n # Assign /32 subnet (single address) from reserved block to a device\n firstAddressAssignment:\n type: equinix:metal:IpAttachment\n name: first_address_assignment\n properties:\n deviceId: ${mydevice.id}\n cidrNotation:\n fn::invoke:\n Function: std:join\n Arguments:\n separator: /\n input:\n - fn::invoke:\n Function: std:cidrhost\n Arguments:\n input: ${myblockMetalReservedIpBlock.cidrNotation}\n host: 0\n Return: result\n - '32'\n Return: result\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "address": { "type": "string" @@ -15368,7 +15368,7 @@ } }, "equinix:metal/organization:Organization": { - "description": "Provides a resource to manage organization resource in Equinix Metal.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst orgResource = new equinix.metal.Organization(\"org\", {\n name: \"Foo Organization\",\n address: {\n address: \"org street\",\n city: \"london\",\n country: \"GB\",\n zipCode: \"12345\",\n },\n description: \"An organization\",\n});\nexport const org = orgResource.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\norg_resource = equinix.metal.Organization(\"org\",\n name=\"Foo Organization\",\n address=equinix.metal.OrganizationAddressArgs(\n address=\"org street\",\n city=\"london\",\n country=\"GB\",\n zip_code=\"12345\",\n ),\n description=\"An organization\")\npulumi.export(\"org\", org_resource.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torgResource, err := metal.NewOrganization(ctx, \"org\", \u0026metal.OrganizationArgs{\n\t\t\tName: pulumi.String(\"Foo Organization\"),\n\t\t\tAddress: \u0026metal.OrganizationAddressArgs{\n\t\t\t\tAddress: pulumi.String(\"org street\"),\n\t\t\t\tCity: pulumi.String(\"london\"),\n\t\t\t\tCountry: pulumi.String(\"GB\"),\n\t\t\t\tZipCode: pulumi.String(\"12345\"),\n\t\t\t},\n\t\t\tDescription: pulumi.String(\"An organization\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"org\", orgResource.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var orgResource = new Equinix.Metal.Organization(\"org\", new()\n {\n Name = \"Foo Organization\",\n Address = new Equinix.Metal.Inputs.OrganizationAddressArgs\n {\n Address = \"org street\",\n City = \"london\",\n Country = \"GB\",\n ZipCode = \"12345\",\n },\n Description = \"An organization\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"org\"] = orgResource.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.metal.Organization;\nimport com.equinix.pulumi.metal.OrganizationArgs;\nimport com.equinix.pulumi.metal.inputs.OrganizationAddressArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var orgResource = new Organization(\"orgResource\", OrganizationArgs.builder() \n .name(\"Foo Organization\")\n .address(OrganizationAddressArgs.builder()\n .address(\"org street\")\n .city(\"london\")\n .country(\"GB\")\n .zipCode(\"12345\")\n .build())\n .description(\"An organization\")\n .build());\n\n ctx.export(\"org\", orgResource.id());\n }\n}\n```\n```yaml\nresources:\n org:\n type: equinix:metal:Organization\n properties:\n name: Foo Organization\n address:\n address: org street\n city: london\n country: GB\n zipCode: \"12345\"\n description: An organization\noutputs:\n org: ${org.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing organization ID:\n\n```sh\n$ pulumi import equinix:metal/organization:Organization equinix_metal_organization {existing_organization_id}\n```\n\n\n{{% /examples %}}", + "description": "Provides a resource to manage organization resource in Equinix Metal.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst tfOrganization1 = new equinix.metal.Organization(\"tfOrganization1\", {\n name: \"foobar\",\n description: \"quux\",\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntf_organization1 = equinix.metal.Organization(\"tfOrganization1\",\n name=\"foobar\",\n description=\"quux\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewOrganization(ctx, \"tfOrganization1\", \u0026metal.OrganizationArgs{\n\t\t\tName: pulumi.String(\"foobar\"),\n\t\t\tDescription: pulumi.String(\"quux\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var tfOrganization1 = new Equinix.Metal.Organization(\"tfOrganization1\", new()\n {\n Name = \"foobar\",\n Description = \"quux\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Organization;\nimport com.pulumi.equinix.metal.OrganizationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var tfOrganization1 = new Organization(\"tfOrganization1\", OrganizationArgs.builder()\n .name(\"foobar\")\n .description(\"quux\")\n .build());\n\n }\n}\n```\n```yaml\n # Create a new Organization\n tfOrganization1:\n type: equinix:metal:Organization\n name: tf_organization_1\n properties:\n name: foobar\n description: quux\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing organization ID:\n\n```sh\n$ pulumi import equinix:metal/organization:Organization equinix_metal_organization {existing_organization_id}\n```\n\n\n{{% /examples %}}", "properties": { "address": { "$ref": "#/types/equinix:metal/OrganizationAddress:OrganizationAddress", @@ -15478,7 +15478,7 @@ } }, "equinix:metal/organizationMember:OrganizationMember": { - "description": "Manage the membership of existing and new invitees within an Equinix Metal organization and its projects.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst organizationId = config.require(\"organizationId\");\nconst projectId = config.require(\"projectId\");\nconst userEmailAddress = config.require(\"userEmailAddress\");\nconst member = new equinix.metal.OrganizationMember(\"member\", {\n invitee: userEmailAddress,\n roles: [\"limited_collaborator\"],\n projectsIds: [projectId],\n organizationId: organizationId,\n});\nexport const memberId = member.id;\nexport const memberState = member.state;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\norganization_id = config.require(\"organizationId\")\nproject_id = config.require(\"projectId\")\nuser_email_address = config.require(\"userEmailAddress\")\nmember = equinix.metal.OrganizationMember(\"member\",\n invitee=user_email_address,\n roles=[\"limited_collaborator\"],\n projects_ids=[project_id],\n organization_id=organization_id)\npulumi.export(\"memberId\", member.id)\npulumi.export(\"memberState\", member.state)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\torganizationId := cfg.Require(\"organizationId\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tuserEmailAddress := cfg.Require(\"userEmailAddress\")\n\t\tmember, err := metal.NewOrganizationMember(ctx, \"member\", \u0026metal.OrganizationMemberArgs{\n\t\t\tInvitee: pulumi.String(userEmailAddress),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"limited_collaborator\"),\n\t\t\t},\n\t\t\tProjectsIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(projectId),\n\t\t\t},\n\t\t\tOrganizationId: pulumi.String(organizationId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"memberId\", member.ID())\n\t\tctx.Export(\"memberState\", member.State)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var organizationId = config.Require(\"organizationId\");\n var projectId = config.Require(\"projectId\");\n var userEmailAddress = config.Require(\"userEmailAddress\");\n var member = new Equinix.Metal.OrganizationMember(\"member\", new()\n {\n Invitee = userEmailAddress,\n Roles = new[]\n {\n \"limited_collaborator\",\n },\n ProjectsIds = new[]\n {\n projectId,\n },\n OrganizationId = organizationId,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"memberId\"] = member.Id,\n [\"memberState\"] = member.State,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.OrganizationMember;\nimport com.equinix.pulumi.metal.OrganizationMemberArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var organizationId = config.get(\"organizationId\").get();\n final var projectId = config.get(\"projectId\").get();\n final var userEmailAddress = config.get(\"userEmailAddress\").get();\n var member = new OrganizationMember(\"member\", OrganizationMemberArgs.builder() \n .invitee(userEmailAddress)\n .roles(\"limited_collaborator\")\n .projectsIds(projectId)\n .organizationId(organizationId)\n .build());\n\n ctx.export(\"memberId\", member.id());\n ctx.export(\"memberState\", member.state());\n }\n}\n```\n```yaml\nconfig:\n organizationId:\n type: string\n projectId:\n type: string\n userEmailAddress:\n type: string\nresources:\n member:\n type: equinix:metal:OrganizationMember\n properties:\n invitee: ${userEmailAddress}\n roles:\n - limited_collaborator\n projectsIds:\n - ${projectId}\n organizationId: ${organizationId}\noutputs:\n memberId: ${member.id}\n memberState: ${member.state}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using the `invitee` and `organization_id` as colon separated arguments:\n\n```sh\n$ pulumi import equinix:metal/organizationMember:OrganizationMember resource_name {invitee}:{organization_id}\n```\n\n\n{{% /examples %}}", + "description": "Manage the membership of existing and new invitees within an Equinix Metal organization and its projects.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst owner = new equinix.metal.OrganizationMember(\"owner\", {\n invitee: \"admin@example.com\",\n roles: [\"owner\"],\n projectsIds: [],\n organizationId: organizationId,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nowner = equinix.metal.OrganizationMember(\"owner\",\n invitee=\"admin@example.com\",\n roles=[\"owner\"],\n projects_ids=[],\n organization_id=organization_id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewOrganizationMember(ctx, \"owner\", \u0026metal.OrganizationMemberArgs{\n\t\t\tInvitee: pulumi.String(\"admin@example.com\"),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"owner\"),\n\t\t\t},\n\t\t\tProjectsIds: pulumi.StringArray{},\n\t\t\tOrganizationId: pulumi.Any(organizationId),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var owner = new Equinix.Metal.OrganizationMember(\"owner\", new()\n {\n Invitee = \"admin@example.com\",\n Roles = new[]\n {\n \"owner\",\n },\n ProjectsIds = new[] {},\n OrganizationId = organizationId,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.OrganizationMember;\nimport com.pulumi.equinix.metal.OrganizationMemberArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var owner = new OrganizationMember(\"owner\", OrganizationMemberArgs.builder()\n .invitee(\"admin@example.com\")\n .roles(\"owner\")\n .projectsIds()\n .organizationId(organizationId)\n .build());\n\n }\n}\n```\n```yaml\n owner:\n type: equinix:metal:OrganizationMember\n properties:\n invitee: admin@example.com\n roles:\n - owner\n projectsIds: []\n organizationId: ${organizationId}\n```\n{{% /example %}}\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst member = new equinix.metal.OrganizationMember(\"member\", {\n invitee: \"member@example.com\",\n roles: [\"limited_collaborator\"],\n projectsIds: [projectId],\n organizationId: organizationId,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nmember = equinix.metal.OrganizationMember(\"member\",\n invitee=\"member@example.com\",\n roles=[\"limited_collaborator\"],\n projects_ids=[project_id],\n organization_id=organization_id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewOrganizationMember(ctx, \"member\", \u0026metal.OrganizationMemberArgs{\n\t\t\tInvitee: pulumi.String(\"member@example.com\"),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"limited_collaborator\"),\n\t\t\t},\n\t\t\tProjectsIds: pulumi.StringArray{\n\t\t\t\tprojectId,\n\t\t\t},\n\t\t\tOrganizationId: pulumi.Any(organizationId),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var member = new Equinix.Metal.OrganizationMember(\"member\", new()\n {\n Invitee = \"member@example.com\",\n Roles = new[]\n {\n \"limited_collaborator\",\n },\n ProjectsIds = new[]\n {\n projectId,\n },\n OrganizationId = organizationId,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.OrganizationMember;\nimport com.pulumi.equinix.metal.OrganizationMemberArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var member = new OrganizationMember(\"member\", OrganizationMemberArgs.builder()\n .invitee(\"member@example.com\")\n .roles(\"limited_collaborator\")\n .projectsIds(projectId)\n .organizationId(organizationId)\n .build());\n\n }\n}\n```\n```yaml\n member:\n type: equinix:metal:OrganizationMember\n properties:\n invitee: member@example.com\n roles:\n - limited_collaborator\n projectsIds:\n - ${projectId}\n organizationId: ${organizationId}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using the `invitee` and `organization_id` as colon separated arguments:\n\n```sh\n$ pulumi import equinix:metal/organizationMember:OrganizationMember resource_name {invitee}:{organization_id}\n```\n\n\n{{% /examples %}}", "properties": { "created": { "type": "string", @@ -15626,7 +15626,6 @@ } }, "equinix:metal/port:Port": { - "description": "\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst portId = config.require(\"portId\");\nconst org = new equinix.metal.Port(\"org\", {\n portId: portId,\n bonded: true,\n layer2: true,\n});\nexport const portType = port.type;\nexport const portBondedNetworkType = port.networkType;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nport_id = config.require(\"portId\")\norg = equinix.metal.Port(\"org\",\n port_id=port_id,\n bonded=True,\n layer2=True)\npulumi.export(\"portType\", port[\"type\"])\npulumi.export(\"portBondedNetworkType\", port[\"networkType\"])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tportId := cfg.Require(\"portId\")\n\t\t_, err := metal.NewPort(ctx, \"org\", \u0026metal.PortArgs{\n\t\t\tPortId: pulumi.String(portId),\n\t\t\tBonded: pulumi.Bool(true),\n\t\t\tLayer2: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"portType\", port.Type)\n\t\tctx.Export(\"portBondedNetworkType\", port.NetworkType)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var portId = config.Require(\"portId\");\n var org = new Equinix.Metal.Port(\"org\", new()\n {\n PortId = portId,\n Bonded = true,\n Layer2 = true,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"portType\"] = port.Type,\n [\"portBondedNetworkType\"] = port.NetworkType,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.metal.Port;\nimport com.equinix.pulumi.metal.PortArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var portId = config.get(\"portId\").get();\n final var vlanId = config.get(\"vlanId\").get();\n var port = new Port(\"port\", PortArgs.builder() \n .portId(portId)\n .bonded(true)\n .layer2(false)\n .vlanIds(vlanId)\n .build());\n\n ctx.export(\"portType\", port.type());\n ctx.export(\"portBondedNetworkType\", port.networkType());\n }\n}\n```\n```yaml\nconfig:\n portId:\n type: string\nresources:\n org:\n type: equinix:metal:Port\n properties:\n portId: ${portId}\n bonded: true\n layer2: true\noutputs:\n portType: ${port.type}\n portBondedNetworkType: ${port.networkType}\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "bondId": { "type": "string", @@ -15816,7 +15815,7 @@ } }, "equinix:metal/portVlanAttachment:PortVlanAttachment": { - "description": "Provides a resource to attach device ports to VLANs.\n\nDevice and VLAN must be in the same metro.\n\nIf you need this resource to add the port back to bond on removal, set `force_bond = true`.\n\nTo learn more about Layer 2 networking in Equinix Metal, refer to\n\n* https://metal.equinix.com/developers/docs/networking/layer2/\n* https://metal.equinix.com/developers/docs/networking/layer2-configs/\n\n## Attribute Referece\n\nIn addition to all arguments above, the following attributes are exported:\n\n* `id` - UUID of device port used in the assignment.\n* `vlan_id` - UUID of VLAN API resource.\n* `port_id` - UUID of device port.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst deviceId = config.require(\"deviceId\");\nconst portName = config.get(\"portName\") || \"eth1\";\nconst vxlanId = config.getNumber(\"vxlanId\") || 1004;\nconst attach = new equinix.metal.PortVlanAttachment(\"attach\", {\n deviceId: deviceId,\n portName: portName,\n vlanVnid: vxlanId,\n});\nexport const attachId = attach.id;\nexport const portId = attach.portId;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\ndevice_id = config.require(\"deviceId\")\nport_name = config.get(\"portName\")\nif port_name is None:\n port_name = \"eth1\"\nvxlan_id = config.get_int(\"vxlanId\")\nif vxlan_id is None:\n vxlan_id = 1004\nattach = equinix.metal.PortVlanAttachment(\"attach\",\n device_id=device_id,\n port_name=port_name,\n vlan_vnid=vxlan_id)\npulumi.export(\"attachId\", attach.id)\npulumi.export(\"portId\", attach.port_id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdeviceId := cfg.Require(\"deviceId\")\n\t\tportName := \"eth1\"\n\t\tif param := cfg.Get(\"portName\"); param != \"\" {\n\t\t\tportName = param\n\t\t}\n\t\tvxlanId := 1004\n\t\tif param := cfg.GetInt(\"vxlanId\"); param != 0 {\n\t\t\tvxlanId = param\n\t\t}\n\t\tattach, err := metal.NewPortVlanAttachment(ctx, \"attach\", \u0026metal.PortVlanAttachmentArgs{\n\t\t\tDeviceId: pulumi.String(deviceId),\n\t\t\tPortName: pulumi.String(portName),\n\t\t\tVlanVnid: pulumi.Int(vxlanId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"attachId\", attach.ID())\n\t\tctx.Export(\"portId\", attach.PortId)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var deviceId = config.Require(\"deviceId\");\n var portName = config.Get(\"portName\") ?? \"eth1\";\n var vxlanId = config.GetNumber(\"vxlanId\") ?? 1004;\n var attach = new Equinix.Metal.PortVlanAttachment(\"attach\", new()\n {\n DeviceId = deviceId,\n PortName = portName,\n VlanVnid = vxlanId,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"attachId\"] = attach.Id,\n [\"portId\"] = attach.PortId,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.PortVlanAttachment;\nimport com.equinix.pulumi.metal.PortVlanAttachmentArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var deviceId = config.get(\"deviceId\").get();\n final var portName = config.get(\"portName\").orElse(\"eth1\");\n final var vxlanId = Integer.parseInt(config.get(\"vxlanId\").orElse(\"1004\"));\n\n var attach = new PortVlanAttachment(\"attach\", PortVlanAttachmentArgs.builder() \n .deviceId(deviceId)\n .portName(portName)\n .vlanVnid(vxlanId)\n .build());\n\n ctx.export(\"attachId\", attach.id());\n ctx.export(\"portId\", attach.portId());\n }\n}\n```\n```yaml\nconfig:\n deviceId:\n type: string\n portName:\n type: string\n default: eth1\n vxlanId:\n type: integer\n default: 1004\nresources:\n attach:\n type: equinix:metal:PortVlanAttachment\n properties:\n deviceId: ${deviceId}\n portName: ${portName}\n vlanVnid: ${vxlanId}\noutputs:\n attachId: ${attach.id}\n portId: ${attach.portId}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Provides a resource to attach device ports to VLANs.\n\nDevice and VLAN must be in the same metro.\n\nIf you need this resource to add the port back to bond on removal, set `force_bond = true`.\n\nTo learn more about Layer 2 networking in Equinix Metal, refer to\n\n* https://metal.equinix.com/developers/docs/networking/layer2/\n* https://metal.equinix.com/developers/docs/networking/layer2-configs/\n\n## Attribute Referece\n\nIn addition to all arguments above, the following attributes are exported:\n\n* `id` - UUID of device port used in the assignment.\n* `vlan_id` - UUID of VLAN API resource.\n* `port_id` - UUID of device port.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.metal.Device(\"test\", {\n hostname: \"test\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"ny\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n});\nconst testDeviceNetworkType = new equinix.metal.DeviceNetworkType(\"testDeviceNetworkType\", {\n deviceId: test.id,\n type: \"layer2-individual\",\n});\nconst test1 = new equinix.metal.Vlan(\"test1\", {\n description: \"VLAN in New York\",\n metro: \"ny\",\n projectId: projectId,\n});\nconst test2 = new equinix.metal.Vlan(\"test2\", {\n description: \"VLAN in New Jersey\",\n metro: \"ny\",\n projectId: projectId,\n});\nconst test1PortVlanAttachment = new equinix.metal.PortVlanAttachment(\"test1PortVlanAttachment\", {\n deviceId: testDeviceNetworkType.id,\n vlanVnid: test1.vxlan,\n portName: \"eth1\",\n});\nconst test2PortVlanAttachment = new equinix.metal.PortVlanAttachment(\"test2PortVlanAttachment\", {\n deviceId: testDeviceNetworkType.id,\n vlanVnid: test2.vxlan,\n portName: \"eth1\",\n native: true,\n}, {\n dependsOn: [test1PortVlanAttachment],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.metal.Device(\"test\",\n hostname=\"test\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"ny\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id)\ntest_device_network_type = equinix.metal.DeviceNetworkType(\"testDeviceNetworkType\",\n device_id=test.id,\n type=\"layer2-individual\")\ntest1 = equinix.metal.Vlan(\"test1\",\n description=\"VLAN in New York\",\n metro=\"ny\",\n project_id=project_id)\ntest2 = equinix.metal.Vlan(\"test2\",\n description=\"VLAN in New Jersey\",\n metro=\"ny\",\n project_id=project_id)\ntest1_port_vlan_attachment = equinix.metal.PortVlanAttachment(\"test1PortVlanAttachment\",\n device_id=test_device_network_type.id,\n vlan_vnid=test1.vxlan,\n port_name=\"eth1\")\ntest2_port_vlan_attachment = equinix.metal.PortVlanAttachment(\"test2PortVlanAttachment\",\n device_id=test_device_network_type.id,\n vlan_vnid=test2.vxlan,\n port_name=\"eth1\",\n native=True,\n opts = pulumi.ResourceOptions(depends_on=[test1_port_vlan_attachment]))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := metal.NewDevice(ctx, \"test\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"test\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, \"testDeviceNetworkType\", \u0026metal.DeviceNetworkTypeArgs{\n\t\t\tDeviceId: test.ID(),\n\t\t\tType: pulumi.String(\"layer2-individual\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest1, err := metal.NewVlan(ctx, \"test1\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"VLAN in New York\"),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest2, err := metal.NewVlan(ctx, \"test2\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"VLAN in New Jersey\"),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest1PortVlanAttachment, err := metal.NewPortVlanAttachment(ctx, \"test1PortVlanAttachment\", \u0026metal.PortVlanAttachmentArgs{\n\t\t\tDeviceId: testDeviceNetworkType.ID(),\n\t\t\tVlanVnid: test1.Vxlan,\n\t\t\tPortName: pulumi.String(\"eth1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewPortVlanAttachment(ctx, \"test2PortVlanAttachment\", \u0026metal.PortVlanAttachmentArgs{\n\t\t\tDeviceId: testDeviceNetworkType.ID(),\n\t\t\tVlanVnid: test2.Vxlan,\n\t\t\tPortName: pulumi.String(\"eth1\"),\n\t\t\tNative: pulumi.Bool(true),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ttest1PortVlanAttachment,\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.Metal.Device(\"test\", new()\n {\n Hostname = \"test\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"ny\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n });\n\n var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType(\"testDeviceNetworkType\", new()\n {\n DeviceId = test.Id,\n Type = \"layer2-individual\",\n });\n\n var test1 = new Equinix.Metal.Vlan(\"test1\", new()\n {\n Description = \"VLAN in New York\",\n Metro = \"ny\",\n ProjectId = projectId,\n });\n\n var test2 = new Equinix.Metal.Vlan(\"test2\", new()\n {\n Description = \"VLAN in New Jersey\",\n Metro = \"ny\",\n ProjectId = projectId,\n });\n\n var test1PortVlanAttachment = new Equinix.Metal.PortVlanAttachment(\"test1PortVlanAttachment\", new()\n {\n DeviceId = testDeviceNetworkType.Id,\n VlanVnid = test1.Vxlan,\n PortName = \"eth1\",\n });\n\n var test2PortVlanAttachment = new Equinix.Metal.PortVlanAttachment(\"test2PortVlanAttachment\", new()\n {\n DeviceId = testDeviceNetworkType.Id,\n VlanVnid = test2.Vxlan,\n PortName = \"eth1\",\n Native = true,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test1PortVlanAttachment,\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport com.pulumi.equinix.metal.DeviceNetworkType;\nimport com.pulumi.equinix.metal.DeviceNetworkTypeArgs;\nimport com.pulumi.equinix.metal.Vlan;\nimport com.pulumi.equinix.metal.VlanArgs;\nimport com.pulumi.equinix.metal.PortVlanAttachment;\nimport com.pulumi.equinix.metal.PortVlanAttachmentArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Device(\"test\", DeviceArgs.builder()\n .hostname(\"test\")\n .plan(\"c3.small.x86\")\n .metro(\"ny\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .build());\n\n var testDeviceNetworkType = new DeviceNetworkType(\"testDeviceNetworkType\", DeviceNetworkTypeArgs.builder()\n .deviceId(test.id())\n .type(\"layer2-individual\")\n .build());\n\n var test1 = new Vlan(\"test1\", VlanArgs.builder()\n .description(\"VLAN in New York\")\n .metro(\"ny\")\n .projectId(projectId)\n .build());\n\n var test2 = new Vlan(\"test2\", VlanArgs.builder()\n .description(\"VLAN in New Jersey\")\n .metro(\"ny\")\n .projectId(projectId)\n .build());\n\n var test1PortVlanAttachment = new PortVlanAttachment(\"test1PortVlanAttachment\", PortVlanAttachmentArgs.builder()\n .deviceId(testDeviceNetworkType.id())\n .vlanVnid(test1.vxlan())\n .portName(\"eth1\")\n .build());\n\n var test2PortVlanAttachment = new PortVlanAttachment(\"test2PortVlanAttachment\", PortVlanAttachmentArgs.builder()\n .deviceId(testDeviceNetworkType.id())\n .vlanVnid(test2.vxlan())\n .portName(\"eth1\")\n .native_(true)\n .build(), CustomResourceOptions.builder()\n .dependsOn(test1PortVlanAttachment)\n .build());\n\n }\n}\n```\n```yaml\n test:\n type: equinix:metal:Device\n properties:\n hostname: test\n plan: c3.small.x86\n metro: ny\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectId: ${projectId}\n testDeviceNetworkType:\n type: equinix:metal:DeviceNetworkType\n name: test\n properties:\n deviceId: ${test.id}\n type: layer2-individual\n test1:\n type: equinix:metal:Vlan\n properties:\n description: VLAN in New York\n metro: ny\n projectId: ${projectId}\n test2:\n type: equinix:metal:Vlan\n properties:\n description: VLAN in New Jersey\n metro: ny\n projectId: ${projectId}\n test1PortVlanAttachment:\n type: equinix:metal:PortVlanAttachment\n name: test1\n properties:\n deviceId: ${testDeviceNetworkType.id}\n vlanVnid: ${test1.vxlan}\n portName: eth1\n test2PortVlanAttachment:\n type: equinix:metal:PortVlanAttachment\n name: test2\n properties:\n deviceId: ${testDeviceNetworkType.id}\n vlanVnid: ${test2.vxlan}\n portName: eth1\n native: true\n options:\n dependson:\n - ${test1PortVlanAttachment}\n```\n{{% /example %}}\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.metal.Vlan(\"test\", {\n description: \"VLAN in New York\",\n metro: \"ny\",\n projectId: projectId,\n});\nconst testDevice = new equinix.metal.Device(\"testDevice\", {\n hostname: \"test\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"ny\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n});\nconst testDeviceNetworkType = new equinix.metal.DeviceNetworkType(\"testDeviceNetworkType\", {\n deviceId: testDevice.id,\n type: \"hybrid\",\n});\nconst testPortVlanAttachment = new equinix.metal.PortVlanAttachment(\"testPortVlanAttachment\", {\n deviceId: testDeviceNetworkType.id,\n portName: \"eth1\",\n vlanVnid: test.vxlan,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.metal.Vlan(\"test\",\n description=\"VLAN in New York\",\n metro=\"ny\",\n project_id=project_id)\ntest_device = equinix.metal.Device(\"testDevice\",\n hostname=\"test\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"ny\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id)\ntest_device_network_type = equinix.metal.DeviceNetworkType(\"testDeviceNetworkType\",\n device_id=test_device.id,\n type=\"hybrid\")\ntest_port_vlan_attachment = equinix.metal.PortVlanAttachment(\"testPortVlanAttachment\",\n device_id=test_device_network_type.id,\n port_name=\"eth1\",\n vlan_vnid=test.vxlan)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := metal.NewVlan(ctx, \"test\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"VLAN in New York\"),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestDevice, err := metal.NewDevice(ctx, \"testDevice\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"test\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, \"testDeviceNetworkType\", \u0026metal.DeviceNetworkTypeArgs{\n\t\t\tDeviceId: testDevice.ID(),\n\t\t\tType: pulumi.String(\"hybrid\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewPortVlanAttachment(ctx, \"testPortVlanAttachment\", \u0026metal.PortVlanAttachmentArgs{\n\t\t\tDeviceId: testDeviceNetworkType.ID(),\n\t\t\tPortName: pulumi.String(\"eth1\"),\n\t\t\tVlanVnid: test.Vxlan,\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.Metal.Vlan(\"test\", new()\n {\n Description = \"VLAN in New York\",\n Metro = \"ny\",\n ProjectId = projectId,\n });\n\n var testDevice = new Equinix.Metal.Device(\"testDevice\", new()\n {\n Hostname = \"test\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"ny\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n });\n\n var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType(\"testDeviceNetworkType\", new()\n {\n DeviceId = testDevice.Id,\n Type = \"hybrid\",\n });\n\n var testPortVlanAttachment = new Equinix.Metal.PortVlanAttachment(\"testPortVlanAttachment\", new()\n {\n DeviceId = testDeviceNetworkType.Id,\n PortName = \"eth1\",\n VlanVnid = test.Vxlan,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Vlan;\nimport com.pulumi.equinix.metal.VlanArgs;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport com.pulumi.equinix.metal.DeviceNetworkType;\nimport com.pulumi.equinix.metal.DeviceNetworkTypeArgs;\nimport com.pulumi.equinix.metal.PortVlanAttachment;\nimport com.pulumi.equinix.metal.PortVlanAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Vlan(\"test\", VlanArgs.builder()\n .description(\"VLAN in New York\")\n .metro(\"ny\")\n .projectId(projectId)\n .build());\n\n var testDevice = new Device(\"testDevice\", DeviceArgs.builder()\n .hostname(\"test\")\n .plan(\"c3.small.x86\")\n .metro(\"ny\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .build());\n\n var testDeviceNetworkType = new DeviceNetworkType(\"testDeviceNetworkType\", DeviceNetworkTypeArgs.builder()\n .deviceId(testDevice.id())\n .type(\"hybrid\")\n .build());\n\n var testPortVlanAttachment = new PortVlanAttachment(\"testPortVlanAttachment\", PortVlanAttachmentArgs.builder()\n .deviceId(testDeviceNetworkType.id())\n .portName(\"eth1\")\n .vlanVnid(test.vxlan())\n .build());\n\n }\n}\n```\n```yaml\n test:\n type: equinix:metal:Vlan\n properties:\n description: VLAN in New York\n metro: ny\n projectId: ${projectId}\n testDevice:\n type: equinix:metal:Device\n name: test\n properties:\n hostname: test\n plan: c3.small.x86\n metro: ny\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectId: ${projectId}\n testDeviceNetworkType:\n type: equinix:metal:DeviceNetworkType\n name: test\n properties:\n deviceId: ${testDevice.id}\n type: hybrid\n testPortVlanAttachment:\n type: equinix:metal:PortVlanAttachment\n name: test\n properties:\n deviceId: ${testDeviceNetworkType.id}\n portName: eth1\n vlanVnid: ${test.vxlan}\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "deviceId": { "type": "string", @@ -15925,7 +15924,7 @@ } }, "equinix:metal/project:Project": { - "description": "Provides an Equinix Metal project resource to allow you manage devices in your projects.\n\n\u003e **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix.metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst organizationId = config.require(\"organizationId\");\nconst name = config.get(\"name\") || \"Default Project\";\nconst projectResource = new equinix.metal.Project(\"project\", {\n name: name,\n organizationId: organizationId,\n});\nexport const projectId = projectResource.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\norganization_id = config.require(\"organizationId\")\nname = config.get(\"name\")\nif name is None:\n name = \"Default Project\"\nproject_resource = equinix.metal.Project(\"project\",\n name=name,\n organization_id=organization_id)\npulumi.export(\"projectId\", project_resource.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\torganizationId := cfg.Require(\"organizationId\")\n\t\tname := \"Default Project\"\n\t\tif param := cfg.Get(\"name\"); param != \"\" {\n\t\t\tname = param\n\t\t}\n\t\tprojectResource, err := metal.NewProject(ctx, \"project\", \u0026metal.ProjectArgs{\n\t\t\tName: pulumi.String(name),\n\t\t\tOrganizationId: pulumi.String(organizationId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"projectId\", projectResource.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var organizationId = config.Require(\"organizationId\");\n var name = config.Get(\"name\") ?? \"Default Project\";\n var projectResource = new Equinix.Metal.Project(\"project\", new()\n {\n Name = name,\n OrganizationId = organizationId,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"projectId\"] = projectResource.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.Project;\nimport com.equinix.pulumi.metal.ProjectArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var organizationId = config.get(\"organizationId\").get();\n final var name = config.get(\"name\").orElse(\"Default Project\");\n var projectResource = new Project(\"projectResource\", ProjectArgs.builder() \n .name(name)\n .organizationId(organizationId)\n .build());\n\n ctx.export(\"projectId\", projectResource.id());\n }\n}\n```\n```yaml\nconfig:\n organizationId:\n type: string\n name:\n type: string\n default: Default Project\nresources:\n project:\n type: equinix:metal:Project\n properties:\n name: ${name}\n organizationId: ${organizationId}\noutputs:\n projectId: ${project.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing project ID:\n\n```sh\n$ pulumi import equinix:metal/project:Project equinix_metal_project {existing_project_id}\n```\n\n\n{{% /examples %}}", + "description": "Provides an Equinix Metal project resource to allow you manage devices in your projects.\n\n\u003e **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix.metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 3\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst existingProject = new equinix.metal.Project(\"existingProject\", {\n name: \"The name of the project (if different, will rewrite)\",\n bgpConfig: {\n deploymentType: \"local\",\n md5: \"C179c28c41a85b\",\n asn: 65000,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nexisting_project = equinix.metal.Project(\"existingProject\",\n name=\"The name of the project (if different, will rewrite)\",\n bgp_config=equinix.metal.ProjectBgpConfigArgs(\n deployment_type=\"local\",\n md5=\"C179c28c41a85b\",\n asn=65000,\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewProject(ctx, \"existingProject\", \u0026metal.ProjectArgs{\n\t\t\tName: pulumi.String(\"The name of the project (if different, will rewrite)\"),\n\t\t\tBgpConfig: \u0026metal.ProjectBgpConfigArgs{\n\t\t\t\tDeploymentType: pulumi.String(\"local\"),\n\t\t\t\tMd5: pulumi.String(\"C179c28c41a85b\"),\n\t\t\t\tAsn: pulumi.Int(65000),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var existingProject = new Equinix.Metal.Project(\"existingProject\", new()\n {\n Name = \"The name of the project (if different, will rewrite)\",\n BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs\n {\n DeploymentType = \"local\",\n Md5 = \"C179c28c41a85b\",\n Asn = 65000,\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Project;\nimport com.pulumi.equinix.metal.ProjectArgs;\nimport com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var existingProject = new Project(\"existingProject\", ProjectArgs.builder()\n .name(\"The name of the project (if different, will rewrite)\")\n .bgpConfig(ProjectBgpConfigArgs.builder()\n .deploymentType(\"local\")\n .md5(\"C179c28c41a85b\")\n .asn(65000)\n .build())\n .build());\n\n }\n}\n```\n```yaml\n existingProject:\n type: equinix:metal:Project\n name: existing_project\n properties:\n name: The name of the project (if different, will rewrite)\n bgpConfig:\n deploymentType: local\n md5: C179c28c41a85b\n asn: 65000\n```\n{{% /example %}}\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst tfProject1 = new equinix.metal.Project(\"tfProject1\", {\n name: \"tftest\",\n bgpConfig: {\n deploymentType: \"local\",\n md5: \"C179c28c41a85b\",\n asn: 65000,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntf_project1 = equinix.metal.Project(\"tfProject1\",\n name=\"tftest\",\n bgp_config=equinix.metal.ProjectBgpConfigArgs(\n deployment_type=\"local\",\n md5=\"C179c28c41a85b\",\n asn=65000,\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewProject(ctx, \"tfProject1\", \u0026metal.ProjectArgs{\n\t\t\tName: pulumi.String(\"tftest\"),\n\t\t\tBgpConfig: \u0026metal.ProjectBgpConfigArgs{\n\t\t\t\tDeploymentType: pulumi.String(\"local\"),\n\t\t\t\tMd5: pulumi.String(\"C179c28c41a85b\"),\n\t\t\t\tAsn: pulumi.Int(65000),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var tfProject1 = new Equinix.Metal.Project(\"tfProject1\", new()\n {\n Name = \"tftest\",\n BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs\n {\n DeploymentType = \"local\",\n Md5 = \"C179c28c41a85b\",\n Asn = 65000,\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Project;\nimport com.pulumi.equinix.metal.ProjectArgs;\nimport com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var tfProject1 = new Project(\"tfProject1\", ProjectArgs.builder()\n .name(\"tftest\")\n .bgpConfig(ProjectBgpConfigArgs.builder()\n .deploymentType(\"local\")\n .md5(\"C179c28c41a85b\")\n .asn(65000)\n .build())\n .build());\n\n }\n}\n```\n```yaml\n # Create a new Project\n tfProject1:\n type: equinix:metal:Project\n name: tf_project_1\n properties:\n name: tftest\n bgpConfig:\n deploymentType: local\n md5: C179c28c41a85b\n asn: 65000\n```\n{{% /example %}}\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst tfProject1 = new equinix.metal.Project(\"tfProject1\", {name: \"Terraform Fun\"});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntf_project1 = equinix.metal.Project(\"tfProject1\", name=\"Terraform Fun\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewProject(ctx, \"tfProject1\", \u0026metal.ProjectArgs{\n\t\t\tName: pulumi.String(\"Terraform Fun\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var tfProject1 = new Equinix.Metal.Project(\"tfProject1\", new()\n {\n Name = \"Terraform Fun\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Project;\nimport com.pulumi.equinix.metal.ProjectArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var tfProject1 = new Project(\"tfProject1\", ProjectArgs.builder()\n .name(\"Terraform Fun\")\n .build());\n\n }\n}\n```\n```yaml\n tfProject1:\n type: equinix:metal:Project\n name: tf_project_1\n properties:\n name: Terraform Fun\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing project ID:\n\n```sh\n$ pulumi import equinix:metal/project:Project equinix_metal_project {existing_project_id}\n```\n\n\n{{% /examples %}}", "properties": { "backendTransfer": { "type": "boolean", @@ -16022,7 +16021,7 @@ } }, "equinix:metal/projectApiKey:ProjectApiKey": { - "description": "Use this resource to create Metal Project API Key resources in Equinix Metal. Project API keys can be used to create and read resources in a single project. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`).\n\nRead-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst readOnly = config.getBoolean(\"readOnly\") || false;\nconst apiKey = new equinix.metal.ProjectApiKey(\"apiKey\", {\n projectId: projectId,\n description: \"A project level API Key\",\n readOnly: readOnly,\n});\nexport const apiKeyToken = apiKey.token;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nread_only = config.get_bool(\"readOnly\")\nif read_only is None:\n read_only = False\napi_key = equinix.metal.ProjectApiKey(\"apiKey\",\n project_id=project_id,\n description=\"A project level API Key\",\n read_only=read_only)\npulumi.export(\"apiKeyToken\", api_key.token)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\treadOnly := false\n\t\tif param := cfg.GetBool(\"readOnly\"); param {\n\t\t\treadOnly = param\n\t\t}\n\t\tapiKey, err := metal.NewProjectApiKey(ctx, \"apiKey\", \u0026metal.ProjectApiKeyArgs{\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tDescription: pulumi.String(\"A project level API Key\"),\n\t\t\tReadOnly: pulumi.Bool(readOnly),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"apiKeyToken\", apiKey.Token)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var readOnly = config.GetBoolean(\"readOnly\") ?? false;\n var apiKey = new Equinix.Metal.ProjectApiKey(\"apiKey\", new()\n {\n ProjectId = projectId,\n Description = \"A project level API Key\",\n ReadOnly = readOnly,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"apiKeyToken\"] = apiKey.Token,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.ProjectApiKey;\nimport com.equinix.pulumi.metal.ProjectApiKeyArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var readOnly = config.getBoolean(\"readOnly\").orElse(false);\n var apiKey = new ProjectApiKey(\"apiKey\", ProjectApiKeyArgs.builder() \n .projectId(projectId)\n .description(\"A project level API Key\")\n .readOnly(readOnly)\n .build());\n\n ctx.export(\"apiKeyToken\", apiKey.token());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n readOnly:\n type: boolean\n default: false\nresources:\n apiKey:\n type: equinix:metal:ProjectApiKey\n properties:\n projectId: ${projectId}\n description: A project level API Key\n readOnly: ${readOnly}\noutputs:\n apiKeyToken: ${apiKey.token}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Use this resource to create Metal Project API Key resources in Equinix Metal. Project API keys can be used to create and read resources in a single project. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`).\n\nRead-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.metal.ProjectApiKey(\"test\", {\n projectId: existingProjectId,\n description: \"Read-only key scoped to a projct\",\n readOnly: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.metal.ProjectApiKey(\"test\",\n project_id=existing_project_id,\n description=\"Read-only key scoped to a projct\",\n read_only=True)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewProjectApiKey(ctx, \"test\", \u0026metal.ProjectApiKeyArgs{\n\t\t\tProjectId: pulumi.Any(existingProjectId),\n\t\t\tDescription: pulumi.String(\"Read-only key scoped to a projct\"),\n\t\t\tReadOnly: pulumi.Bool(true),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.Metal.ProjectApiKey(\"test\", new()\n {\n ProjectId = existingProjectId,\n Description = \"Read-only key scoped to a projct\",\n ReadOnly = true,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.ProjectApiKey;\nimport com.pulumi.equinix.metal.ProjectApiKeyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new ProjectApiKey(\"test\", ProjectApiKeyArgs.builder()\n .projectId(existingProjectId)\n .description(\"Read-only key scoped to a projct\")\n .readOnly(true)\n .build());\n\n }\n}\n```\n```yaml\n # Create a new read-only API key in existing project\n test:\n type: equinix:metal:ProjectApiKey\n properties:\n projectId: ${existingProjectId}\n description: Read-only key scoped to a projct\n readOnly: true\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "description": { "type": "string", @@ -16098,7 +16097,7 @@ } }, "equinix:metal/projectSshKey:ProjectSshKey": { - "description": "Provides an Equinix Metal project SSH key resource to manage project-specific SSH keys. Project SSH keys will only be populated onto servers that belong to that project, in contrast to User SSH Keys.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as fs from \"fs\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst sshKey = new equinix.metal.ProjectSshKey(\"sshKey\", {\n projectId: projectId,\n name: \"johnKent\",\n publicKey: fs.readFileSync(\"/Users/John/.ssh/metal_rsa.pub\"),\n});\nexport const sshKeyId = sshKey.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nssh_key = equinix.metal.ProjectSshKey(\"sshKey\",\n project_id=project_id,\n name=\"johnKent\",\n public_key=(lambda path: open(path).read())(\"/Users/John/.ssh/metal_rsa.pub\"))\npulumi.export(\"sshKeyId\", ssh_key.id)\n```\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc readFileOrPanic(path string) pulumi.StringPtrInput {\n\tdata, err := os.ReadFile(path)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn pulumi.String(string(data))\n}\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tsshKey, err := metal.NewProjectSshKey(ctx, \"sshKey\", \u0026metal.ProjectSshKeyArgs{\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tName: pulumi.String(\"johnKent\"),\n\t\t\tPublicKey: readFileOrPanic(\"/Users/John/.ssh/metal_rsa.pub\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"sshKeyId\", sshKey.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.IO;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var sshKey = new Equinix.Metal.ProjectSshKey(\"sshKey\", new()\n {\n ProjectId = projectId,\n Name = \"johnKent\",\n PublicKey = File.ReadAllText(\"/Users/John/.ssh/metal_rsa.pub\"),\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"sshKeyId\"] = sshKey.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.ProjectSshKey;\nimport com.equinix.pulumi.metal.ProjectSshKeyArgs;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n\n String content = null;\n try {\n content = Files.readString(Paths.get(\"/Users/John/.ssh/metal_rsa.pub\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n var sshKey = new ProjectSshKey(\"sshKey\", ProjectSshKeyArgs.builder() \n .projectId(projectId)\n .name(\"johnKent\")\n .publicKey(content)\n .build());\n\n ctx.export(\"sshKeyId\", sshKey.id());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\nresources:\n sshKey:\n type: equinix:metal:ProjectSshKey\n properties:\n projectId: ${projectId}\n name: johnKent\n publicKey:\n fn::readFile: /Users/John/.ssh/metal_rsa.pub\noutputs:\n sshKeyId: ${sshKey.id}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Provides an Equinix Metal project SSH key resource to manage project-specific SSH keys. Project SSH keys will only be populated onto servers that belong to that project, in contrast to User SSH Keys.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst projectId = \"\u003cUUID_of_your_project\u003e\";\nconst test = new equinix.metal.ProjectSshKey(\"test\", {\n name: \"test\",\n publicKey: \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2\",\n projectId: projectId,\n});\nconst testDevice = new equinix.metal.Device(\"testDevice\", {\n hostname: \"test\",\n plan: equinix.metal.Plan.C3MediumX86,\n metro: \"ny\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectSshKeyIds: [test.id],\n projectId: projectId,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nproject_id = \"\u003cUUID_of_your_project\u003e\"\ntest = equinix.metal.ProjectSshKey(\"test\",\n name=\"test\",\n public_key=\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2\",\n project_id=project_id)\ntest_device = equinix.metal.Device(\"testDevice\",\n hostname=\"test\",\n plan=equinix.metal.Plan.C3_MEDIUM_X86,\n metro=\"ny\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_ssh_key_ids=[test.id],\n project_id=project_id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tprojectId := \"\u003cUUID_of_your_project\u003e\"\n\t\ttest, err := metal.NewProjectSshKey(ctx, \"test\", \u0026metal.ProjectSshKeyArgs{\n\t\t\tName: pulumi.String(\"test\"),\n\t\t\tPublicKey: pulumi.String(\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2\"),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewDevice(ctx, \"testDevice\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"test\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3MediumX86),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectSshKeyIds: pulumi.StringArray{\n\t\t\t\ttest.ID(),\n\t\t\t},\n\t\t\tProjectId: pulumi.String(projectId),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var projectId = \"\u003cUUID_of_your_project\u003e\";\n\n var test = new Equinix.Metal.ProjectSshKey(\"test\", new()\n {\n Name = \"test\",\n PublicKey = \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2\",\n ProjectId = projectId,\n });\n\n var testDevice = new Equinix.Metal.Device(\"testDevice\", new()\n {\n Hostname = \"test\",\n Plan = Equinix.Metal.Plan.C3MediumX86,\n Metro = \"ny\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectSshKeyIds = new[]\n {\n test.Id,\n },\n ProjectId = projectId,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.ProjectSshKey;\nimport com.pulumi.equinix.metal.ProjectSshKeyArgs;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var projectId = \"\u003cUUID_of_your_project\u003e\";\n\n var test = new ProjectSshKey(\"test\", ProjectSshKeyArgs.builder()\n .name(\"test\")\n .publicKey(\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2\")\n .projectId(projectId)\n .build());\n\n var testDevice = new Device(\"testDevice\", DeviceArgs.builder()\n .hostname(\"test\")\n .plan(\"c3.medium.x86\")\n .metro(\"ny\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectSshKeyIds(test.id())\n .projectId(projectId)\n .build());\n\n }\n}\n```\n```yaml\n test:\n type: equinix:metal:ProjectSshKey\n properties:\n name: test\n publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2\n projectId: ${projectId}\n testDevice:\n type: equinix:metal:Device\n name: test\n properties:\n hostname: test\n plan: c3.medium.x86\n metro: ny\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectSshKeyIds:\n - ${test.id}\n projectId: ${projectId}\nvariables:\n projectId: \u003cUUID_of_your_project\u003e\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "created": { "type": "string", @@ -16192,7 +16191,7 @@ } }, "equinix:metal/reservedIpBlock:ReservedIpBlock": { - "description": "Provides a resource to create and manage blocks of reserved IP addresses in a project.\n\nWhen a user provisions first device in a metro, Equinix Metal API automatically allocates IPv6/56 and private IPv4/25 blocks. The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. Every new device in the project and metro will automatically get IPv6 and private IPv4 addresses from these pre-allocated blocks. The IPv6 and private IPv4 blocks can't be created, only imported. With this resource, it's possible to create either public IPv4 blocks or global IPv4 blocks.\n\nPublic blocks are allocated in a metro. Addresses from public blocks can only be assigned to devices in the metro. Public blocks can have mask from /24 (256 addresses) to /32 (1 address). If you create public block with this resource, you must fill the metro argument.\n\nAddresses from global blocks can be assigned in any metro. Global blocks can have mask from /30 (4 addresses), to /32 (1 address). If you create global block with this resource, you must specify type = \"global_ipv4\" and you must omit the metro argument.\n\nOnce IP block is allocated or imported, an address from it can be assigned to device with the `equinix.metal.IpAttachment` resource.\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst metro = config.get(\"metro\") || \"FR\";\nconst type = config.get(\"type\") || \"public_ipv4\";\nconst quantity = config.getNumber(\"quantity\") || 1;\nconst ipBlock = new equinix.metal.ReservedIpBlock(\"ipBlock\", {\n projectId: projectId,\n type: \"public_ipv4\",\n quantity: quantity,\n metro: metro,\n});\nexport const ipBlockId = ipBlock.id;\nexport const ipBlockSubent = ipBlock.cidrNotation;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"FR\"\ntype = config.get(\"type\")\nif type is None:\n type = \"public_ipv4\"\nquantity = config.get_int(\"quantity\")\nif quantity is None:\n quantity = 1\nip_block = equinix.metal.ReservedIpBlock(\"ipBlock\",\n project_id=project_id,\n type=\"public_ipv4\",\n quantity=quantity,\n metro=metro)\npulumi.export(\"ipBlockId\", ip_block.id)\npulumi.export(\"ipBlockSubent\", ip_block.cidr_notation)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tmetro := \"FR\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\t_type := \"public_ipv4\"\n\t\tif param := cfg.Get(\"type\"); param != \"\" {\n\t\t\t_type = param\n\t\t}\n\t\tquantity := 1\n\t\tif param := cfg.GetInt(\"quantity\"); param != 0 {\n\t\t\tquantity = param\n\t\t}\n\t\tipBlock, err := metal.NewReservedIpBlock(ctx, \"ipBlock\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tType: pulumi.String(\"public_ipv4\"),\n\t\t\tQuantity: pulumi.Int(quantity),\n\t\t\tMetro: pulumi.String(metro),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ipBlockId\", ipBlock.ID())\n\t\tctx.Export(\"ipBlockSubent\", ipBlock.CidrNotation)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var metro = config.Get(\"metro\") ?? \"FR\";\n var type = config.Get(\"type\") ?? \"public_ipv4\";\n var quantity = config.GetNumber(\"quantity\") ?? 1;\n var ipBlock = new Equinix.Metal.ReservedIpBlock(\"ipBlock\", new()\n {\n ProjectId = projectId,\n Type = \"public_ipv4\",\n Quantity = quantity,\n Metro = metro,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ipBlockId\"] = ipBlock.Id,\n [\"ipBlockSubent\"] = ipBlock.CidrNotation,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.ReservedIpBlock;\nimport com.equinix.pulumi.metal.ReservedIpBlockArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var metro = config.get(\"metro\").orElse(\"FR\");\n final var type = config.get(\"type\").orElse(\"public_ipv4\");\n final var quantity = Integer.parseInt(config.get(\"quantity\").orElse(\"1\"));\n var ipBlock = new ReservedIpBlock(\"ipBlock\", ReservedIpBlockArgs.builder() \n .projectId(projectId)\n .type(type)\n .quantity(quantity)\n .metro(metro)\n .build());\n\n ctx.export(\"ipBlockId\", ipBlock.id());\n ctx.export(\"ipBlockSubent\", ipBlock.cidrNotation());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n metro:\n type: string\n default: FR\n type:\n type: string\n default: public_ipv4\n quantity:\n type: integer\n default: 1\nresources:\n ipBlock:\n type: equinix:metal:ReservedIpBlock\n properties:\n projectId: ${projectId}\n type: public_ipv4\n quantity: ${quantity}\n metro: ${metro}\noutputs:\n ipBlockId: ${ipBlock.id}\n ipBlockSubent: ${ipBlock.cidrNotation}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing IP reservation ID:\n\n```sh\n$ pulumi import equinix:metal/reservedIpBlock:ReservedIpBlock equinix_metal_reserved_ip_block {existing_ip_reservation_id}\n```\n\n\n{{% /examples %}}", + "description": "Provides a resource to create and manage blocks of reserved IP addresses in a project.\n\nWhen a user provisions first device in a metro, Equinix Metal API automatically allocates IPv6/56 and private IPv4/25 blocks. The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. Every new device in the project and metro will automatically get IPv6 and private IPv4 addresses from these pre-allocated blocks. The IPv6 and private IPv4 blocks can't be created, only imported. With this resource, it's possible to create either public IPv4 blocks or global IPv4 blocks.\n\nPublic blocks are allocated in a metro. Addresses from public blocks can only be assigned to devices in the metro. Public blocks can have mask from /24 (256 addresses) to /32 (1 address). If you create public block with this resource, you must fill the metro argument.\n\nAddresses from global blocks can be assigned in any metro. Global blocks can have mask from /30 (4 addresses), to /32 (1 address). If you create global block with this resource, you must specify type = \"global_ipv4\" and you must omit the metro argument.\n\nOnce IP block is allocated or imported, an address from it can be assigned to device with the `equinix.metal.IpAttachment` resource.\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst twoElasticAddresses = new equinix.metal.ReservedIpBlock(\"twoElasticAddresses\", {\n projectId: projectId,\n metro: \"sv\",\n quantity: 2,\n});\nconst test1 = new equinix.metal.ReservedIpBlock(\"test1\", {\n projectId: projectId,\n type: equinix.metal.IpBlockType.PublicIPv4,\n metro: \"sv\",\n quantity: 1,\n});\nconst test = new equinix.metal.ReservedIpBlock(\"test\", {\n projectId: projectId,\n type: equinix.metal.IpBlockType.GlobalIPv4,\n quantity: 1,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntwo_elastic_addresses = equinix.metal.ReservedIpBlock(\"twoElasticAddresses\",\n project_id=project_id,\n metro=\"sv\",\n quantity=2)\ntest1 = equinix.metal.ReservedIpBlock(\"test1\",\n project_id=project_id,\n type=equinix.metal.IpBlockType.PUBLIC_I_PV4,\n metro=\"sv\",\n quantity=1)\ntest = equinix.metal.ReservedIpBlock(\"test\",\n project_id=project_id,\n type=equinix.metal.IpBlockType.GLOBAL_I_PV4,\n quantity=1)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewReservedIpBlock(ctx, \"twoElasticAddresses\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tQuantity: pulumi.Int(2),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewReservedIpBlock(ctx, \"test1\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tType: pulumi.String(metal.IpBlockTypePublicIPv4),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tQuantity: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewReservedIpBlock(ctx, \"test\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tType: pulumi.String(metal.IpBlockTypeGlobalIPv4),\n\t\t\tQuantity: pulumi.Int(1),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var twoElasticAddresses = new Equinix.Metal.ReservedIpBlock(\"twoElasticAddresses\", new()\n {\n ProjectId = projectId,\n Metro = \"sv\",\n Quantity = 2,\n });\n\n var test1 = new Equinix.Metal.ReservedIpBlock(\"test1\", new()\n {\n ProjectId = projectId,\n Type = Equinix.Metal.IpBlockType.PublicIPv4,\n Metro = \"sv\",\n Quantity = 1,\n });\n\n var test = new Equinix.Metal.ReservedIpBlock(\"test\", new()\n {\n ProjectId = projectId,\n Type = Equinix.Metal.IpBlockType.GlobalIPv4,\n Quantity = 1,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.ReservedIpBlock;\nimport com.pulumi.equinix.metal.ReservedIpBlockArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var twoElasticAddresses = new ReservedIpBlock(\"twoElasticAddresses\", ReservedIpBlockArgs.builder()\n .projectId(projectId)\n .metro(\"sv\")\n .quantity(2)\n .build());\n\n var test1 = new ReservedIpBlock(\"test1\", ReservedIpBlockArgs.builder()\n .projectId(projectId)\n .type(\"public_ipv4\")\n .metro(\"sv\")\n .quantity(1)\n .build());\n\n var test = new ReservedIpBlock(\"test\", ReservedIpBlockArgs.builder()\n .projectId(projectId)\n .type(\"global_ipv4\")\n .quantity(1)\n .build());\n\n }\n}\n```\n```yaml\n # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro for myproject\n twoElasticAddresses:\n type: equinix:metal:ReservedIpBlock\n name: two_elastic_addresses\n properties:\n projectId: ${projectId}\n metro: sv\n quantity: 2\n # Allocate 1 floating IP in Silicon Valley (sv) metro\n test1:\n type: equinix:metal:ReservedIpBlock\n properties:\n projectId: ${projectId}\n type: public_ipv4\n metro: sv\n quantity: 1\n # Allocate 1 global floating IP, which can be assigned to device in any metro\n test:\n type: equinix:metal:ReservedIpBlock\n properties:\n projectId: ${projectId}\n type: global_ipv4\n quantity: 1\n```\n{{% /example %}}\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst example = new equinix.metal.ReservedIpBlock(\"example\", {\n projectId: projectId,\n metro: \"sv\",\n quantity: 2,\n});\nconst nodes = new equinix.metal.Device(\"nodes\", {\n projectId: projectId,\n metro: \"sv\",\n plan: equinix.metal.Plan.C3SmallX86,\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n hostname: \"test\",\n billingCycle: equinix.metal.BillingCycle.Hourly,\n ipAddresses: [\n {\n type: \"public_ipv4\",\n cidr: 31,\n reservationIds: [example.id],\n },\n {\n type: \"private_ipv4\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nexample = equinix.metal.ReservedIpBlock(\"example\",\n project_id=project_id,\n metro=\"sv\",\n quantity=2)\nnodes = equinix.metal.Device(\"nodes\",\n project_id=project_id,\n metro=\"sv\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n hostname=\"test\",\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n ip_addresses=[\n equinix.metal.DeviceIpAddressArgs(\n type=\"public_ipv4\",\n cidr=31,\n reservation_ids=[example.id],\n ),\n equinix.metal.DeviceIpAddressArgs(\n type=\"private_ipv4\",\n ),\n ])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := metal.NewReservedIpBlock(ctx, \"example\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tQuantity: pulumi.Int(2),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewDevice(ctx, \"nodes\", \u0026metal.DeviceArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tHostname: pulumi.String(\"test\"),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tIpAddresses: metal.DeviceIpAddressArray{\n\t\t\t\t\u0026metal.DeviceIpAddressArgs{\n\t\t\t\t\tType: pulumi.String(\"public_ipv4\"),\n\t\t\t\t\tCidr: pulumi.Int(31),\n\t\t\t\t\tReservationIds: pulumi.StringArray{\n\t\t\t\t\t\texample.ID(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026metal.DeviceIpAddressArgs{\n\t\t\t\t\tType: pulumi.String(\"private_ipv4\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Equinix.Metal.ReservedIpBlock(\"example\", new()\n {\n ProjectId = projectId,\n Metro = \"sv\",\n Quantity = 2,\n });\n\n var nodes = new Equinix.Metal.Device(\"nodes\", new()\n {\n ProjectId = projectId,\n Metro = \"sv\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n Hostname = \"test\",\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n IpAddresses = new[]\n {\n new Equinix.Metal.Inputs.DeviceIpAddressArgs\n {\n Type = \"public_ipv4\",\n Cidr = 31,\n ReservationIds = new[]\n {\n example.Id,\n },\n },\n new Equinix.Metal.Inputs.DeviceIpAddressArgs\n {\n Type = \"private_ipv4\",\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.ReservedIpBlock;\nimport com.pulumi.equinix.metal.ReservedIpBlockArgs;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ReservedIpBlock(\"example\", ReservedIpBlockArgs.builder()\n .projectId(projectId)\n .metro(\"sv\")\n .quantity(2)\n .build());\n\n var nodes = new Device(\"nodes\", DeviceArgs.builder()\n .projectId(projectId)\n .metro(\"sv\")\n .plan(\"c3.small.x86\")\n .operatingSystem(\"ubuntu_20_04\")\n .hostname(\"test\")\n .billingCycle(\"hourly\")\n .ipAddresses( \n DeviceIpAddressArgs.builder()\n .type(\"public_ipv4\")\n .cidr(31)\n .reservationIds(example.id())\n .build(),\n DeviceIpAddressArgs.builder()\n .type(\"private_ipv4\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro\n example:\n type: equinix:metal:ReservedIpBlock\n properties:\n projectId: ${projectId}\n metro: sv\n quantity: 2\n # Run a device with both public IPv4 from the block assigned\n nodes:\n type: equinix:metal:Device\n properties:\n projectId: ${projectId}\n metro: sv\n plan: c3.small.x86\n operatingSystem: ubuntu_20_04\n hostname: test\n billingCycle: hourly\n ipAddresses:\n - type: public_ipv4\n cidr: 31\n reservationIds:\n - ${example.id}\n - type: private_ipv4\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing IP reservation ID:\n\n```sh\n$ pulumi import equinix:metal/reservedIpBlock:ReservedIpBlock equinix_metal_reserved_ip_block {existing_ip_reservation_id}\n```\n\n\n{{% /examples %}}", "properties": { "address": { "type": "string" @@ -16489,7 +16488,7 @@ } }, "equinix:metal/spotMarketRequest:SpotMarketRequest": { - "description": "Provides an Equinix Metal Spot Market Request resource to allow you to manage spot market requests on your account. For more detail on Spot Market, see [this article in Equinix Metal documentation](https://metal.equinix.com/developers/docs/deploy/spot-market/).\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst metro = config.get(\"metro\") || \"FR\";\nconst request = new equinix.metal.SpotMarketRequest(\"request\", {\n projectId: projectId,\n metro: metro,\n maxBidPrice: 0.75,\n devicesMin: 1,\n devicesMax: 1,\n instanceParameters: {\n hostname: \"testspot\",\n billingCycle: \"hourly\",\n operatingSystem: \"ubuntu_20_04\",\n plan: \"c3.small.x86\",\n },\n});\nexport const requestId = request.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"FR\"\nrequest = equinix.metal.SpotMarketRequest(\"request\",\n project_id=project_id,\n metro=metro,\n max_bid_price=0.75,\n devices_min=1,\n devices_max=1,\n instance_parameters=equinix.metal.SpotMarketRequestInstanceParametersArgs(\n hostname=\"testspot\",\n billing_cycle=\"hourly\",\n operating_system=\"ubuntu_20_04\",\n plan=\"c3.small.x86\",\n ))\npulumi.export(\"requestId\", request.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tmetro := \"FR\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\trequest, err := metal.NewSpotMarketRequest(ctx, \"request\", \u0026metal.SpotMarketRequestArgs{\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tMetro: pulumi.String(metro),\n\t\t\tMaxBidPrice: pulumi.Float64(0.75),\n\t\t\tDevicesMin: pulumi.Int(1),\n\t\t\tDevicesMax: pulumi.Int(1),\n\t\t\tInstanceParameters: \u0026metal.SpotMarketRequestInstanceParametersArgs{\n\t\t\t\tHostname: pulumi.String(\"testspot\"),\n\t\t\t\tBillingCycle: pulumi.String(\"hourly\"),\n\t\t\t\tOperatingSystem: pulumi.String(\"ubuntu_20_04\"),\n\t\t\t\tPlan: pulumi.String(\"c3.small.x86\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"requestId\", request.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var metro = config.Get(\"metro\") ?? \"FR\";\n var request = new Equinix.Metal.SpotMarketRequest(\"request\", new()\n {\n ProjectId = projectId,\n Metro = metro,\n MaxBidPrice = 0.75,\n DevicesMin = 1,\n DevicesMax = 1,\n InstanceParameters = new Equinix.Metal.Inputs.SpotMarketRequestInstanceParametersArgs\n {\n Hostname = \"testspot\",\n BillingCycle = \"hourly\",\n OperatingSystem = \"ubuntu_20_04\",\n Plan = \"c3.small.x86\",\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"requestId\"] = request.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.SpotMarketRequest;\nimport com.equinix.pulumi.metal.SpotMarketRequestArgs;\nimport com.equinix.pulumi.metal.inputs.SpotMarketRequestInstanceParametersArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var metro = config.get(\"metro\").orElse(\"FR\");\n var request = new SpotMarketRequest(\"request\", SpotMarketRequestArgs.builder() \n .projectId(projectId)\n .metro(metro)\n .maxBidPrice(0.75)\n .devicesMin(1)\n .devicesMax(1)\n .instanceParameters(SpotMarketRequestInstanceParametersArgs.builder()\n .hostname(\"testspot\")\n .billingCycle(\"hourly\")\n .operatingSystem(\"ubuntu_20_04\")\n .plan(\"c3.small.x86\")\n .build())\n .build());\n\n ctx.export(\"requestId\", request.id());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n metro:\n type: string\n default: FR\nresources:\n request:\n type: equinix:metal:SpotMarketRequest\n properties:\n projectId: ${projectId}\n metro: ${metro}\n maxBidPrice: 0.75\n devicesMin: 1\n devicesMax: 1\n instanceParameters:\n hostname: testspot\n billingCycle: hourly\n operatingSystem: ubuntu_20_04\n plan: c3.small.x86\noutputs:\n requestId: ${request.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing spot market request ID:\n\n```sh\n$ pulumi import equinix:metal/spotMarketRequest:SpotMarketRequest equinix_metal_spot_market_request {existing_spot_market_request_id}\n```\n\n\n{{% /examples %}}", + "description": "Provides an Equinix Metal Spot Market Request resource to allow you to manage spot market requests on your account. For more detail on Spot Market, see [this article in Equinix Metal documentation](https://metal.equinix.com/developers/docs/deploy/spot-market/).\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst req = new equinix.metal.SpotMarketRequest(\"req\", {\n projectId: projectId,\n maxBidPrice: 0.03,\n metro: \"ny\",\n devicesMin: 1,\n devicesMax: 1,\n instanceParameters: {\n hostname: \"testspot\",\n billingCycle: \"hourly\",\n operatingSystem: \"ubuntu_20_04\",\n plan: \"c3.small.x86\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nreq = equinix.metal.SpotMarketRequest(\"req\",\n project_id=project_id,\n max_bid_price=0.03,\n metro=\"ny\",\n devices_min=1,\n devices_max=1,\n instance_parameters=equinix.metal.SpotMarketRequestInstanceParametersArgs(\n hostname=\"testspot\",\n billing_cycle=\"hourly\",\n operating_system=\"ubuntu_20_04\",\n plan=\"c3.small.x86\",\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewSpotMarketRequest(ctx, \"req\", \u0026metal.SpotMarketRequestArgs{\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tMaxBidPrice: pulumi.Float64(0.03),\n\t\t\tMetro: pulumi.String(\"ny\"),\n\t\t\tDevicesMin: pulumi.Int(1),\n\t\t\tDevicesMax: pulumi.Int(1),\n\t\t\tInstanceParameters: \u0026metal.SpotMarketRequestInstanceParametersArgs{\n\t\t\t\tHostname: pulumi.String(\"testspot\"),\n\t\t\t\tBillingCycle: pulumi.String(\"hourly\"),\n\t\t\t\tOperatingSystem: pulumi.String(\"ubuntu_20_04\"),\n\t\t\t\tPlan: pulumi.String(\"c3.small.x86\"),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var req = new Equinix.Metal.SpotMarketRequest(\"req\", new()\n {\n ProjectId = projectId,\n MaxBidPrice = 0.03,\n Metro = \"ny\",\n DevicesMin = 1,\n DevicesMax = 1,\n InstanceParameters = new Equinix.Metal.Inputs.SpotMarketRequestInstanceParametersArgs\n {\n Hostname = \"testspot\",\n BillingCycle = \"hourly\",\n OperatingSystem = \"ubuntu_20_04\",\n Plan = \"c3.small.x86\",\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.SpotMarketRequest;\nimport com.pulumi.equinix.metal.SpotMarketRequestArgs;\nimport com.pulumi.equinix.metal.inputs.SpotMarketRequestInstanceParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var req = new SpotMarketRequest(\"req\", SpotMarketRequestArgs.builder()\n .projectId(projectId)\n .maxBidPrice(0.03)\n .metro(\"ny\")\n .devicesMin(1)\n .devicesMax(1)\n .instanceParameters(SpotMarketRequestInstanceParametersArgs.builder()\n .hostname(\"testspot\")\n .billingCycle(\"hourly\")\n .operatingSystem(\"ubuntu_20_04\")\n .plan(\"c3.small.x86\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n # Create a spot market request\n req:\n type: equinix:metal:SpotMarketRequest\n properties:\n projectId: ${projectId}\n maxBidPrice: 0.03\n metro: ny\n devicesMin: 1\n devicesMax: 1\n instanceParameters:\n hostname: testspot\n billingCycle: hourly\n operatingSystem: ubuntu_20_04\n plan: c3.small.x86\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing spot market request ID:\n\n```sh\n$ pulumi import equinix:metal/spotMarketRequest:SpotMarketRequest equinix_metal_spot_market_request {existing_spot_market_request_id}\n```\n\n\n{{% /examples %}}", "properties": { "devicesMax": { "type": "integer", @@ -16641,7 +16640,7 @@ } }, "equinix:metal/sshKey:SshKey": { - "description": "Provides a resource to manage User SSH keys on your Equinix Metal user account. If you create a new device in a project, all the keys of the project's collaborators will be injected to the device.\n\nThe link between User SSH key and device is implicit. If you want to make sure that a key will be copied to a device, you must ensure that the device resource `depends_on` the key resource.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as fs from \"fs\";\n\nconst sshKey = new equinix.metal.SshKey(\"sshKey\", {\n name: \"johnKent\",\n publicKey: fs.readFileSync(\"/Users/John/.ssh/metal_rsa.pub\"),\n});\nexport const sshKeyId = sshKey.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nssh_key = equinix.metal.SshKey(\"sshKey\",\n name=\"johnKent\",\n public_key=(lambda path: open(path).read())(\"/Users/John/.ssh/metal_rsa.pub\"))\npulumi.export(\"sshKeyId\", ssh_key.id)\n```\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc readFileOrPanic(path string) pulumi.StringPtrInput {\n\tdata, err := os.ReadFile(path)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn pulumi.String(string(data))\n}\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsshKey, err := metal.NewSshKey(ctx, \"sshKey\", \u0026metal.SshKeyArgs{\n\t\t\tName: pulumi.String(\"johnKent\"),\n\t\t\tPublicKey: readFileOrPanic(\"/Users/John/.ssh/metal_rsa.pub\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"sshKeyId\", sshKey.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.IO;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sshKey = new Equinix.Metal.SshKey(\"sshKey\", new()\n {\n Name = \"johnKent\",\n PublicKey = File.ReadAllText(\"/Users/John/.ssh/metal_rsa.pub\"),\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"sshKeyId\"] = sshKey.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.SshKey;\nimport com.equinix.pulumi.metal.SshKeyArgs;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n String content = null;\n try {\n content = Files.readString(Paths.get(\"/Users/John/.ssh/metal_rsa.pub\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n var sshKey = new SshKey(\"sshKey\", SshKeyArgs.builder() \n .name(\"johnKent\")\n .publicKey(content)\n .build());\n\n ctx.export(\"sshKeyId\", sshKey.id());\n }\n}\n```\n```yaml\nresources:\n sshKey:\n type: equinix:metal:SshKey\n properties:\n name: johnKent\n publicKey:\n fn::readFile: /Users/John/.ssh/metal_rsa.pub\noutputs:\n sshKeyId: ${sshKey.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing SSH Key ID:\n\n```sh\n$ pulumi import equinix:metal/sshKey:SshKey equinix_metal_ssh_key {existing_sshkey_id}\n```\n\n\n{{% /examples %}}", + "description": "Provides a resource to manage User SSH keys on your Equinix Metal user account. If you create a new device in a project, all the keys of the project's collaborators will be injected to the device.\n\nThe link between User SSH key and device is implicit. If you want to make sure that a key will be copied to a device, you must ensure that the device resource `depends_on` the key resource.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as std from \"@pulumi/std\";\n\nconst key1 = new equinix.metal.SshKey(\"key1\", {\n name: \"terraform-1\",\n publicKey: std.fileOutput({\n input: \"/home/terraform/.ssh/id_rsa.pub\",\n }).apply(invoke =\u003e invoke.result),\n});\nconst test = new equinix.metal.Device(\"test\", {\n hostname: \"test-device\",\n plan: equinix.metal.Plan.C3SmallX86,\n metro: \"sv\",\n operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,\n billingCycle: equinix.metal.BillingCycle.Hourly,\n projectId: projectId,\n}, {\n dependsOn: [key1],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\nimport pulumi_std as std\n\nkey1 = equinix.metal.SshKey(\"key1\",\n name=\"terraform-1\",\n public_key=std.file_output(input=\"/home/terraform/.ssh/id_rsa.pub\").apply(lambda invoke: invoke.result))\ntest = equinix.metal.Device(\"test\",\n hostname=\"test-device\",\n plan=equinix.metal.Plan.C3_SMALL_X86,\n metro=\"sv\",\n operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,\n billing_cycle=equinix.metal.BillingCycle.HOURLY,\n project_id=project_id,\n opts = pulumi.ResourceOptions(depends_on=[key1]))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: \"/home/terraform/.ssh/id_rsa.pub\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tkey1, err := metal.NewSshKey(ctx, \"key1\", \u0026metal.SshKeyArgs{\n\t\t\tName: pulumi.String(\"terraform-1\"),\n\t\t\tPublicKey: invokeFile.Result,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewDevice(ctx, \"test\", \u0026metal.DeviceArgs{\n\t\t\tHostname: pulumi.String(\"test-device\"),\n\t\t\tPlan: pulumi.String(metal.PlanC3SmallX86),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tOperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),\n\t\t\tBillingCycle: pulumi.String(metal.BillingCycleHourly),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tkey1,\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var key1 = new Equinix.Metal.SshKey(\"key1\", new()\n {\n Name = \"terraform-1\",\n PublicKey = Std.File.Invoke(new()\n {\n Input = \"/home/terraform/.ssh/id_rsa.pub\",\n }).Apply(invoke =\u003e invoke.Result),\n });\n\n var test = new Equinix.Metal.Device(\"test\", new()\n {\n Hostname = \"test-device\",\n Plan = Equinix.Metal.Plan.C3SmallX86,\n Metro = \"sv\",\n OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,\n BillingCycle = Equinix.Metal.BillingCycle.Hourly,\n ProjectId = projectId,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n key1,\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.SshKey;\nimport com.pulumi.equinix.metal.SshKeyArgs;\nimport com.pulumi.equinix.metal.Device;\nimport com.pulumi.equinix.metal.DeviceArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var key1 = new SshKey(\"key1\", SshKeyArgs.builder()\n .name(\"terraform-1\")\n .publicKey(StdFunctions.file(FileArgs.builder()\n .input(\"/home/terraform/.ssh/id_rsa.pub\")\n .build()).result())\n .build());\n\n var test = new Device(\"test\", DeviceArgs.builder()\n .hostname(\"test-device\")\n .plan(\"c3.small.x86\")\n .metro(\"sv\")\n .operatingSystem(\"ubuntu_20_04\")\n .billingCycle(\"hourly\")\n .projectId(projectId)\n .build(), CustomResourceOptions.builder()\n .dependsOn(key1)\n .build());\n\n }\n}\n```\n```yaml\n # Create a new SSH key\n key1:\n type: equinix:metal:SshKey\n properties:\n name: terraform-1\n publicKey:\n fn::invoke:\n Function: std:file\n Arguments:\n input: /home/terraform/.ssh/id_rsa.pub\n Return: result\n # Create new device with \"key1\" included. The device resource \"depends_on\" the\n # key, in order to make sure the key is created before the device.\n test:\n type: equinix:metal:Device\n properties:\n hostname: test-device\n plan: c3.small.x86\n metro: sv\n operatingSystem: ubuntu_20_04\n billingCycle: hourly\n projectId: ${projectId}\n options:\n dependson:\n - ${key1}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing SSH Key ID:\n\n```sh\n$ pulumi import equinix:metal/sshKey:SshKey equinix_metal_ssh_key {existing_sshkey_id}\n```\n\n\n{{% /examples %}}", "properties": { "created": { "type": "string", @@ -16721,7 +16720,7 @@ } }, "equinix:metal/userApiKey:UserApiKey": { - "description": "Use this resource to create Metal User API Key resources in Equinix Metal. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`).\n\nRead-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst description = config.get(\"description\") || \"An user level API Key\";\nconst readOnly = config.getBoolean(\"readOnly\") || false;\nconst apiKey = new equinix.metal.UserApiKey(\"apiKey\", {\n description: description,\n readOnly: readOnly,\n});\nexport const apiKeyToken = apiKey.token;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\ndescription = config.get(\"description\")\nif description is None:\n description = \"An user level API Key\"\nread_only = config.get_bool(\"readOnly\")\nif read_only is None:\n read_only = False\napi_key = equinix.metal.UserApiKey(\"apiKey\",\n description=description,\n read_only=read_only)\npulumi.export(\"apiKeyToken\", api_key.token)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdescription := \"An user level API Key\"\n\t\tif param := cfg.Get(\"description\"); param != \"\" {\n\t\t\tdescription = param\n\t\t}\n\t\treadOnly := false\n\t\tif param := cfg.GetBool(\"readOnly\"); param {\n\t\t\treadOnly = param\n\t\t}\n\t\tapiKey, err := metal.NewUserApiKey(ctx, \"apiKey\", \u0026metal.UserApiKeyArgs{\n\t\t\tDescription: pulumi.String(description),\n\t\t\tReadOnly: pulumi.Bool(readOnly),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"apiKeyToken\", apiKey.Token)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var description = config.Get(\"description\") ?? \"An user level API Key\";\n var readOnly = config.GetBoolean(\"readOnly\") ?? false;\n var apiKey = new Equinix.Metal.UserApiKey(\"apiKey\", new()\n {\n Description = description,\n ReadOnly = readOnly,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"apiKeyToken\"] = apiKey.Token,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.UserApiKey;\nimport com.equinix.pulumi.metal.UserApiKeyArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var description = config.get(\"description\").orElse(\"An user level API Key\");\n final var readOnly = config.getBoolean(\"readOnly\").orElse(false);\n var apiKey = new UserApiKey(\"apiKey\", UserApiKeyArgs.builder() \n .description(description)\n .readOnly(readOnly)\n .build());\n\n ctx.export(\"apiKeyToken\", apiKey.token());\n }\n}\n```\n```yaml\nconfig:\n description:\n type: string\n default: An user level API Key\n readOnly:\n type: boolean\n default: false\nresources:\n apiKey:\n type: equinix:metal:UserApiKey\n properties:\n description: ${description}\n readOnly: ${readOnly}\noutputs:\n apiKeyToken: ${apiKey.token}\n```\n{{% /example %}}\n\n{{% /examples %}}", + "description": "Use this resource to create Metal User API Key resources in Equinix Metal. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`).\n\nRead-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.metal.UserApiKey(\"test\", {\n description: \"Read-only user key\",\n readOnly: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.metal.UserApiKey(\"test\",\n description=\"Read-only user key\",\n read_only=True)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewUserApiKey(ctx, \"test\", \u0026metal.UserApiKeyArgs{\n\t\t\tDescription: pulumi.String(\"Read-only user key\"),\n\t\t\tReadOnly: pulumi.Bool(true),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.Metal.UserApiKey(\"test\", new()\n {\n Description = \"Read-only user key\",\n ReadOnly = true,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.UserApiKey;\nimport com.pulumi.equinix.metal.UserApiKeyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new UserApiKey(\"test\", UserApiKeyArgs.builder()\n .description(\"Read-only user key\")\n .readOnly(true)\n .build());\n\n }\n}\n```\n```yaml\n # Create a new read-only user API key\n test:\n type: equinix:metal:UserApiKey\n properties:\n description: Read-only user key\n readOnly: true\n```\n{{% /example %}}\n\n{{% /examples %}}", "properties": { "description": { "type": "string", @@ -16790,7 +16789,7 @@ } }, "equinix:metal/virtualCircuit:VirtualCircuit": { - "description": "Use this resource to associate VLAN with a Dedicated Port from [Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#associating-a-vlan-with-a-dedicated-port).\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst connectionId = config.require(\"connectionId\");\nconst vlanId = config.require(\"vlanId\");\nconst portId = equinix.metal.getInterconnection({\n connectionId: connectionId,\n}).then(invoke =\u003e invoke.ports?.[0]?.id);\nconst vc = new equinix.metal.VirtualCircuit(\"vc\", {\n connectionId: connectionId,\n projectId: projectId,\n portId: portId,\n vlanId: vlanId,\n nniVlan: 1056,\n});\nexport const vcStatus = vc.status;\nexport const vcVnid = vc.vnid;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nconnection_id = config.require(\"connectionId\")\nvlan_id = config.require(\"vlanId\")\nport_id = equinix.metal.get_interconnection(connection_id=connection_id).ports[0].id\nvc = equinix.metal.VirtualCircuit(\"vc\",\n connection_id=connection_id,\n project_id=project_id,\n port_id=port_id,\n vlan_id=vlan_id,\n nni_vlan=1056)\npulumi.export(\"vcStatus\", vc.status)\npulumi.export(\"vcVnid\", vc.vnid)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tconnectionId := cfg.Require(\"connectionId\")\n\t\tvlanId := cfg.Require(\"vlanId\")\n\t\tportId := metal.LookupInterconnection(ctx, \u0026metal.LookupInterconnectionArgs{\n\t\t\tConnectionId: connectionId,\n\t\t}, nil).Ports[0].Id\n\t\tvc, err := metal.NewVirtualCircuit(ctx, \"vc\", \u0026metal.VirtualCircuitArgs{\n\t\t\tConnectionId: pulumi.String(connectionId),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tPortId: *pulumi.String(portId),\n\t\t\tVlanId: pulumi.String(vlanId),\n\t\t\tNniVlan: pulumi.Int(1056),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"vcStatus\", vc.Status)\n\t\tctx.Export(\"vcVnid\", vc.Vnid)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var connectionId = config.Require(\"connectionId\");\n var vlanId = config.Require(\"vlanId\");\n var portId = Equinix.Metal.GetInterconnection.Invoke(new()\n {\n ConnectionId = connectionId,\n }).Apply(invoke =\u003e invoke.Ports[0]?.Id);\n\n var vc = new Equinix.Metal.VirtualCircuit(\"vc\", new()\n {\n ConnectionId = connectionId,\n ProjectId = projectId,\n PortId = portId,\n VlanId = vlanId,\n NniVlan = 1056,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"vcStatus\"] = vc.Status,\n [\"vcVnid\"] = vc.Vnid,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.inputs.GetInterconnectionArgs;\nimport com.equinix.pulumi.metal.MetalFunctions;\nimport com.equinix.pulumi.metal.VirtualCircuit;\nimport com.equinix.pulumi.metal.VirtualCircuitArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var connectionId = config.get(\"connectionId\").get();\n final var vlanId = config.get(\"vlanId\").get();\n final var portId = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder()\n .connectionId(connectionId)\n .build()).applyValue(data -\u003e data.ports().get(0).id());\n\n var vc = new VirtualCircuit(\"vc\", VirtualCircuitArgs.builder() \n .connectionId(connectionId)\n .projectId(projectId)\n .portId(portId)\n .vlanId(vlanId)\n .nniVlan(1056)\n .build());\n\n ctx.export(\"vcStatus\", vc.status());\n ctx.export(\"vcVnid\", vc.vnid());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n connectionId:\n type: string\n vlanId:\n type: string\nvariables:\n portId:\n fn::invoke:\n function: equinix:metal:getInterconnection\n arguments:\n connectionId: ${connectionId}\n return: ports[0].id\nresources:\n vc:\n type: equinix:metal:VirtualCircuit\n properties:\n connectionId: ${connectionId}\n projectId: ${projectId}\n portId: ${portId}\n vlanId: ${vlanId}\n nniVlan: 1056\noutputs:\n vcStatus: ${vc.status}\n vcVnid: ${vc.vnid}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing Virtual Circuit ID:\n\n```sh\n$ pulumi import equinix:metal/virtualCircuit:VirtualCircuit equinix_metal_virtual_circuit {existing_id}\n```\n\n\n{{% /examples %}}", + "description": "Use this resource to associate VLAN with a Dedicated Port from [Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#associating-a-vlan-with-a-dedicated-port).\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\n\nconst projectId = \"52000fb2-ee46-4673-93a8-de2c2bdba33c\";\nconst connId = \"73f12f29-3e19-43a0-8e90-ae81580db1e0\";\nconst test = equinix.metal.getInterconnectionOutput({\n connectionId: connId,\n});\nconst testVlan = new equinix.metal.Vlan(\"testVlan\", {\n projectId: projectId,\n metro: test.apply(test =\u003e test.metro),\n});\nconst testVirtualCircuit = new equinix.metal.VirtualCircuit(\"testVirtualCircuit\", {\n connectionId: connId,\n projectId: projectId,\n portId: test.apply(test =\u003e test.ports?.[0]?.id),\n vlanId: testVlan.id,\n nniVlan: 1056,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nproject_id = \"52000fb2-ee46-4673-93a8-de2c2bdba33c\"\nconn_id = \"73f12f29-3e19-43a0-8e90-ae81580db1e0\"\ntest = equinix.metal.get_interconnection_output(connection_id=conn_id)\ntest_vlan = equinix.metal.Vlan(\"testVlan\",\n project_id=project_id,\n metro=test.metro)\ntest_virtual_circuit = equinix.metal.VirtualCircuit(\"testVirtualCircuit\",\n connection_id=conn_id,\n project_id=project_id,\n port_id=test.ports[0].id,\n vlan_id=test_vlan.id,\n nni_vlan=1056)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tprojectId := \"52000fb2-ee46-4673-93a8-de2c2bdba33c\"\n\t\tconnId := \"73f12f29-3e19-43a0-8e90-ae81580db1e0\"\n\t\ttest, err := metal.LookupInterconnection(ctx, \u0026metal.LookupInterconnectionArgs{\n\t\t\tConnectionId: connId,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestVlan, err := metal.NewVlan(ctx, \"testVlan\", \u0026metal.VlanArgs{\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tMetro: pulumi.String(test.Metro),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewVirtualCircuit(ctx, \"testVirtualCircuit\", \u0026metal.VirtualCircuitArgs{\n\t\t\tConnectionId: pulumi.String(connId),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tPortId: pulumi.String(test.Ports[0].Id),\n\t\t\tVlanId: testVlan.ID(),\n\t\t\tNniVlan: pulumi.Int(1056),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var projectId = \"52000fb2-ee46-4673-93a8-de2c2bdba33c\";\n\n var connId = \"73f12f29-3e19-43a0-8e90-ae81580db1e0\";\n\n var test = Equinix.Metal.GetInterconnection.Invoke(new()\n {\n ConnectionId = connId,\n });\n\n var testVlan = new Equinix.Metal.Vlan(\"testVlan\", new()\n {\n ProjectId = projectId,\n Metro = test.Apply(getInterconnectionResult =\u003e getInterconnectionResult.Metro),\n });\n\n var testVirtualCircuit = new Equinix.Metal.VirtualCircuit(\"testVirtualCircuit\", new()\n {\n ConnectionId = connId,\n ProjectId = projectId,\n PortId = test.Apply(getInterconnectionResult =\u003e getInterconnectionResult.Ports[0]?.Id),\n VlanId = testVlan.Id,\n NniVlan = 1056,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.MetalFunctions;\nimport com.pulumi.equinix.metal.inputs.GetInterconnectionArgs;\nimport com.pulumi.equinix.metal.Vlan;\nimport com.pulumi.equinix.metal.VlanArgs;\nimport com.pulumi.equinix.metal.VirtualCircuit;\nimport com.pulumi.equinix.metal.VirtualCircuitArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var projectId = \"52000fb2-ee46-4673-93a8-de2c2bdba33c\";\n\n final var connId = \"73f12f29-3e19-43a0-8e90-ae81580db1e0\";\n\n final var test = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder()\n .connectionId(connId)\n .build());\n\n var testVlan = new Vlan(\"testVlan\", VlanArgs.builder()\n .projectId(projectId)\n .metro(test.applyValue(getInterconnectionResult -\u003e getInterconnectionResult.metro()))\n .build());\n\n var testVirtualCircuit = new VirtualCircuit(\"testVirtualCircuit\", VirtualCircuitArgs.builder()\n .connectionId(connId)\n .projectId(projectId)\n .portId(test.applyValue(getInterconnectionResult -\u003e getInterconnectionResult.ports()[0].id()))\n .vlanId(testVlan.id())\n .nniVlan(1056)\n .build());\n\n }\n}\n```\n```yaml\n testVlan:\n type: equinix:metal:Vlan\n name: test\n properties:\n projectId: ${projectId}\n metro: ${test.metro}\n testVirtualCircuit:\n type: equinix:metal:VirtualCircuit\n name: test\n properties:\n connectionId: ${connId}\n projectId: ${projectId}\n portId: ${test.ports[0].id}\n vlanId: ${testVlan.id}\n nniVlan: 1056\nvariables:\n projectId: 52000fb2-ee46-4673-93a8-de2c2bdba33c\n connId: 73f12f29-3e19-43a0-8e90-ae81580db1e0\n test:\n fn::invoke:\n Function: equinix:metal:getInterconnection\n Arguments:\n connectionId: ${connId}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing Virtual Circuit ID:\n\n```sh\n$ pulumi import equinix:metal/virtualCircuit:VirtualCircuit equinix_metal_virtual_circuit {existing_id}\n```\n\n\n{{% /examples %}}", "properties": { "connectionId": { "type": "string", @@ -17046,7 +17045,7 @@ } }, "equinix:metal/vlan:Vlan": { - "description": "Provides a resource to allow users to manage Virtual Networks in their projects.\n\nTo learn more about Layer 2 networking in Equinix Metal, refer to\n\n* https://metal.equinix.com/developers/docs/networking/layer2/\n* https://metal.equinix.com/developers/docs/networking/layer2-configs/\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst metro = config.get(\"metro\") || \"DA\";\nconst vxlan = config.requireNumber(\"vxlan\");\nconst vlan = new equinix.metal.Vlan(\"vlan\", {\n description: \"VLAN in Dallas\",\n projectId: projectId,\n metro: metro,\n vxlan: vxlan,\n});\nexport const vlanId = vlan.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"DA\"\nvxlan = config.require_int(\"vxlan\")\nvlan = equinix.metal.Vlan(\"vlan\",\n description=\"VLAN in Dallas\",\n project_id=project_id,\n metro=metro,\n vxlan=vxlan)\npulumi.export(\"vlanId\", vlan.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tmetro := \"DA\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tvxlan := cfg.RequireInt(\"vxlan\")\n\t\tvlan, err := metal.NewVlan(ctx, \"vlan\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"VLAN in Dallas\"),\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t\tMetro: pulumi.String(metro),\n\t\t\tVxlan: pulumi.Int(vxlan),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"vlanId\", vlan.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var metro = config.Get(\"metro\") ?? \"DA\";\n var vxlan = config.RequireNumber(\"vxlan\");\n var vlan = new Equinix.Metal.Vlan(\"vlan\", new()\n {\n Description = \"VLAN in Dallas\",\n ProjectId = projectId,\n Metro = metro,\n Vxlan = vxlan,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"vlanId\"] = vlan.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.Vlan;\nimport com.equinix.pulumi.metal.VlanArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var metro = config.get(\"metro\").orElse(\"DA\");\n final var vxlan = Integer.parseInt(config.get(\"vxlan\").get());\n var vlan = new Vlan(\"vlan\", VlanArgs.builder() \n .description(\"VLAN in Dallas\")\n .projectId(projectId)\n .metro(metro)\n .vxlan(vxlan)\n .build());\n\n ctx.export(\"vlanId\", vlan.id());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n metro:\n type: string\n default: DA\n vxlan:\n type: integer\nresources:\n vlan:\n type: equinix:metal:Vlan\n properties:\n description: VLAN in Dallas\n projectId: ${projectId}\n metro: ${metro}\n vxlan: ${vxlan}\noutputs:\n vlanId: ${vlan.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing VLAN ID (UUID):\n\n```sh\n$ pulumi import equinix:metal/vlan:Vlan equinix_metal_vlan {existing_vlan_id}\n```\n\n\n{{% /examples %}}", + "description": "Provides a resource to allow users to manage Virtual Networks in their projects.\n\nTo learn more about Layer 2 networking in Equinix Metal, refer to\n\n* https://metal.equinix.com/developers/docs/networking/layer2/\n* https://metal.equinix.com/developers/docs/networking/layer2-configs/\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst vlan1 = new equinix.metal.Vlan(\"vlan1\", {\n description: \"VLAN in New Jersey\",\n metro: \"sv\",\n projectId: projectId,\n vxlan: 1040,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nvlan1 = equinix.metal.Vlan(\"vlan1\",\n description=\"VLAN in New Jersey\",\n metro=\"sv\",\n project_id=project_id,\n vxlan=1040)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewVlan(ctx, \"vlan1\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"VLAN in New Jersey\"),\n\t\t\tMetro: pulumi.String(\"sv\"),\n\t\t\tProjectId: pulumi.Any(projectId),\n\t\t\tVxlan: pulumi.Int(1040),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vlan1 = new Equinix.Metal.Vlan(\"vlan1\", new()\n {\n Description = \"VLAN in New Jersey\",\n Metro = \"sv\",\n ProjectId = projectId,\n Vxlan = 1040,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Vlan;\nimport com.pulumi.equinix.metal.VlanArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vlan1 = new Vlan(\"vlan1\", VlanArgs.builder()\n .description(\"VLAN in New Jersey\")\n .metro(\"sv\")\n .projectId(projectId)\n .vxlan(1040)\n .build());\n\n }\n}\n```\n```yaml\n # Create a new VLAN in metro \"esv\"\n vlan1:\n type: equinix:metal:Vlan\n properties:\n description: VLAN in New Jersey\n metro: sv\n projectId: ${projectId}\n vxlan: 1040\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing VLAN ID (UUID):\n\n```sh\n$ pulumi import equinix:metal/vlan:Vlan equinix_metal_vlan {existing_vlan_id}\n```\n\n\n{{% /examples %}}", "properties": { "description": { "type": "string", @@ -17149,7 +17148,7 @@ } }, "equinix:metal/vrf:Vrf": { - "description": "Use this resource to manage a VRF.\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst projectId = config.require(\"projectId\");\nconst metro = config.get(\"metro\") || \"DA\";\nconst vrf = new equinix.metal.Vrf(\"vrf\", {\n description: \"VRF with ASN 65000 and a pool of address space\",\n name: \"example-vrf\",\n metro: metro,\n localAsn: 65000,\n ipRanges: [\n \"192.168.100.0/25\",\n \"192.168.200.0/25\",\n ],\n projectId: projectId,\n});\nexport const vrfId = vrf.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nproject_id = config.require(\"projectId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"DA\"\nvrf = equinix.metal.Vrf(\"vrf\",\n description=\"VRF with ASN 65000 and a pool of address space\",\n name=\"example-vrf\",\n metro=metro,\n local_asn=65000,\n ip_ranges=[\n \"192.168.100.0/25\",\n \"192.168.200.0/25\",\n ],\n project_id=project_id)\npulumi.export(\"vrfId\", vrf.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprojectId := cfg.Require(\"projectId\")\n\t\tmetro := \"DA\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tvrf, err := metal.NewVrf(ctx, \"vrf\", \u0026metal.VrfArgs{\n\t\t\tDescription: pulumi.String(\"VRF with ASN 65000 and a pool of address space\"),\n\t\t\tName: pulumi.String(\"example-vrf\"),\n\t\t\tMetro: pulumi.String(metro),\n\t\t\tLocalAsn: pulumi.Int(65000),\n\t\t\tIpRanges: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"192.168.100.0/25\"),\n\t\t\t\tpulumi.String(\"192.168.200.0/25\"),\n\t\t\t},\n\t\t\tProjectId: pulumi.String(projectId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"vrfId\", vrf.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var projectId = config.Require(\"projectId\");\n var metro = config.Get(\"metro\") ?? \"DA\";\n var vrf = new Equinix.Metal.Vrf(\"vrf\", new()\n {\n Description = \"VRF with ASN 65000 and a pool of address space\",\n Name = \"example-vrf\",\n Metro = metro,\n LocalAsn = 65000,\n IpRanges = new[]\n {\n \"192.168.100.0/25\",\n \"192.168.200.0/25\",\n },\n ProjectId = projectId,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"vrfId\"] = vrf.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.equinix.pulumi.metal.Vrf;\nimport com.equinix.pulumi.metal.VrfArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var projectId = config.get(\"projectId\").get();\n final var metro = config.get(\"metro\").orElse(\"DA\");\n var vrf = new Vrf(\"vrf\", VrfArgs.builder() \n .description(\"VRF with ASN 65000 and a pool of address space\")\n .name(\"example-vrf\")\n .metro(metro)\n .localAsn(65000)\n .ipRanges( \n \"192.168.100.0/25\",\n \"192.168.200.0/25\")\n .projectId(projectId)\n .build());\n\n ctx.export(\"vrfId\", vrf.id());\n }\n}\n```\n```yaml\nconfig:\n projectId:\n type: string\n metro:\n type: string\n default: DA\nresources:\n vrf:\n type: equinix:metal:Vrf\n properties:\n description: VRF with ASN 65000 and a pool of address space\n name: example-vrf\n metro: ${metro}\n localAsn: \"65000\"\n ipRanges:\n - 192.168.100.0/25\n - 192.168.200.0/25\n projectId: ${projectId}\noutputs:\n vrfId: ${vrf.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing VRF ID:\n\n```sh\n$ pulumi import equinix:metal/vrf:Vrf equinix_metal_vrf {existing_id}\n```\n\n\n{{% /examples %}}", + "description": "Use this resource to manage a VRF.\n\nSee the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst example = new equinix.metal.ReservedIpBlock(\"example\", {\n description: \"Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.\",\n projectId: exampleEquinixMetalProject.id,\n metro: exampleEquinixMetalVrf.metro,\n type: \"vrf\",\n vrfId: exampleEquinixMetalVrf.id,\n cidr: 29,\n network: \"192.168.100.0\",\n});\nconst exampleVlan = new equinix.metal.Vlan(\"exampleVlan\", {\n description: \"A VLAN for Layer2 and Hybrid Metal devices\",\n metro: exampleEquinixMetalVrf.metro,\n projectId: exampleEquinixMetalProject.id,\n});\nconst exampleGateway = new equinix.metal.Gateway(\"exampleGateway\", {\n projectId: exampleEquinixMetalProject.id,\n vlanId: exampleVlan.id,\n ipReservationId: example.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nexample = equinix.metal.ReservedIpBlock(\"example\",\n description=\"Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.\",\n project_id=example_equinix_metal_project[\"id\"],\n metro=example_equinix_metal_vrf[\"metro\"],\n type=\"vrf\",\n vrf_id=example_equinix_metal_vrf[\"id\"],\n cidr=29,\n network=\"192.168.100.0\")\nexample_vlan = equinix.metal.Vlan(\"exampleVlan\",\n description=\"A VLAN for Layer2 and Hybrid Metal devices\",\n metro=example_equinix_metal_vrf[\"metro\"],\n project_id=example_equinix_metal_project[\"id\"])\nexample_gateway = equinix.metal.Gateway(\"exampleGateway\",\n project_id=example_equinix_metal_project[\"id\"],\n vlan_id=example_vlan.id,\n ip_reservation_id=example.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := metal.NewReservedIpBlock(ctx, \"example\", \u0026metal.ReservedIpBlockArgs{\n\t\t\tDescription: pulumi.String(\"Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.\"),\n\t\t\tProjectId: pulumi.Any(exampleEquinixMetalProject.Id),\n\t\t\tMetro: pulumi.Any(exampleEquinixMetalVrf.Metro),\n\t\t\tType: pulumi.String(\"vrf\"),\n\t\t\tVrfId: pulumi.Any(exampleEquinixMetalVrf.Id),\n\t\t\tCidr: pulumi.Int(29),\n\t\t\tNetwork: pulumi.String(\"192.168.100.0\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVlan, err := metal.NewVlan(ctx, \"exampleVlan\", \u0026metal.VlanArgs{\n\t\t\tDescription: pulumi.String(\"A VLAN for Layer2 and Hybrid Metal devices\"),\n\t\t\tMetro: pulumi.Any(exampleEquinixMetalVrf.Metro),\n\t\t\tProjectId: pulumi.Any(exampleEquinixMetalProject.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewGateway(ctx, \"exampleGateway\", \u0026metal.GatewayArgs{\n\t\t\tProjectId: pulumi.Any(exampleEquinixMetalProject.Id),\n\t\t\tVlanId: exampleVlan.ID(),\n\t\t\tIpReservationId: example.ID(),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Equinix.Metal.ReservedIpBlock(\"example\", new()\n {\n Description = \"Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.\",\n ProjectId = exampleEquinixMetalProject.Id,\n Metro = exampleEquinixMetalVrf.Metro,\n Type = \"vrf\",\n VrfId = exampleEquinixMetalVrf.Id,\n Cidr = 29,\n Network = \"192.168.100.0\",\n });\n\n var exampleVlan = new Equinix.Metal.Vlan(\"exampleVlan\", new()\n {\n Description = \"A VLAN for Layer2 and Hybrid Metal devices\",\n Metro = exampleEquinixMetalVrf.Metro,\n ProjectId = exampleEquinixMetalProject.Id,\n });\n\n var exampleGateway = new Equinix.Metal.Gateway(\"exampleGateway\", new()\n {\n ProjectId = exampleEquinixMetalProject.Id,\n VlanId = exampleVlan.Id,\n IpReservationId = example.Id,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.ReservedIpBlock;\nimport com.pulumi.equinix.metal.ReservedIpBlockArgs;\nimport com.pulumi.equinix.metal.Vlan;\nimport com.pulumi.equinix.metal.VlanArgs;\nimport com.pulumi.equinix.metal.Gateway;\nimport com.pulumi.equinix.metal.GatewayArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ReservedIpBlock(\"example\", ReservedIpBlockArgs.builder()\n .description(\"Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.\")\n .projectId(exampleEquinixMetalProject.id())\n .metro(exampleEquinixMetalVrf.metro())\n .type(\"vrf\")\n .vrfId(exampleEquinixMetalVrf.id())\n .cidr(29)\n .network(\"192.168.100.0\")\n .build());\n\n var exampleVlan = new Vlan(\"exampleVlan\", VlanArgs.builder()\n .description(\"A VLAN for Layer2 and Hybrid Metal devices\")\n .metro(exampleEquinixMetalVrf.metro())\n .projectId(exampleEquinixMetalProject.id())\n .build());\n\n var exampleGateway = new Gateway(\"exampleGateway\", GatewayArgs.builder()\n .projectId(exampleEquinixMetalProject.id())\n .vlanId(exampleVlan.id())\n .ipReservationId(example.id())\n .build());\n\n }\n}\n```\n```yaml\n example:\n type: equinix:metal:ReservedIpBlock\n properties:\n description: Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.\n projectId: ${exampleEquinixMetalProject.id}\n metro: ${exampleEquinixMetalVrf.metro}\n type: vrf\n vrfId: ${exampleEquinixMetalVrf.id}\n cidr: 29\n network: 192.168.100.0\n exampleVlan:\n type: equinix:metal:Vlan\n name: example\n properties:\n description: A VLAN for Layer2 and Hybrid Metal devices\n metro: ${exampleEquinixMetalVrf.metro}\n projectId: ${exampleEquinixMetalProject.id}\n exampleGateway:\n type: equinix:metal:Gateway\n name: example\n properties:\n projectId: ${exampleEquinixMetalProject.id}\n vlanId: ${exampleVlan.id}\n ipReservationId: ${example.id}\n```\n{{% /example %}}\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst example = new equinix.metal.Project(\"example\", {name: \"example\"});\nconst exampleVrf = new equinix.metal.Vrf(\"exampleVrf\", {\n description: \"VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25\",\n name: \"example-vrf\",\n metro: \"da\",\n localAsn: 65000,\n ipRanges: [\n \"192.168.100.0/25\",\n \"192.168.200.0/25\",\n ],\n projectId: example.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nexample = equinix.metal.Project(\"example\", name=\"example\")\nexample_vrf = equinix.metal.Vrf(\"exampleVrf\",\n description=\"VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25\",\n name=\"example-vrf\",\n metro=\"da\",\n local_asn=65000,\n ip_ranges=[\n \"192.168.100.0/25\",\n \"192.168.200.0/25\",\n ],\n project_id=example.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := metal.NewProject(ctx, \"example\", \u0026metal.ProjectArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = metal.NewVrf(ctx, \"exampleVrf\", \u0026metal.VrfArgs{\n\t\t\tDescription: pulumi.String(\"VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25\"),\n\t\t\tName: pulumi.String(\"example-vrf\"),\n\t\t\tMetro: pulumi.String(\"da\"),\n\t\t\tLocalAsn: pulumi.Int(65000),\n\t\t\tIpRanges: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"192.168.100.0/25\"),\n\t\t\t\tpulumi.String(\"192.168.200.0/25\"),\n\t\t\t},\n\t\t\tProjectId: example.ID(),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Equinix.Metal.Project(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleVrf = new Equinix.Metal.Vrf(\"exampleVrf\", new()\n {\n Description = \"VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25\",\n Name = \"example-vrf\",\n Metro = \"da\",\n LocalAsn = 65000,\n IpRanges = new[]\n {\n \"192.168.100.0/25\",\n \"192.168.200.0/25\",\n },\n ProjectId = example.Id,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.Project;\nimport com.pulumi.equinix.metal.ProjectArgs;\nimport com.pulumi.equinix.metal.Vrf;\nimport com.pulumi.equinix.metal.VrfArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Project(\"example\", ProjectArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleVrf = new Vrf(\"exampleVrf\", VrfArgs.builder()\n .description(\"VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25\")\n .name(\"example-vrf\")\n .metro(\"da\")\n .localAsn(\"65000\")\n .ipRanges( \n \"192.168.100.0/25\",\n \"192.168.200.0/25\")\n .projectId(example.id())\n .build());\n\n }\n}\n```\n```yaml\n example:\n type: equinix:metal:Project\n properties:\n name: example\n exampleVrf:\n type: equinix:metal:Vrf\n name: example\n properties:\n description: VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25\n name: example-vrf\n metro: da\n localAsn: '65000'\n ipRanges:\n - 192.168.100.0/25\n - 192.168.200.0/25\n projectId: ${example.id}\n```\n{{% /example %}}\n\n{{% example %}}\n### example 3\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst exampleVirtualCircuit = new equinix.metal.VirtualCircuit(\"exampleVirtualCircuit\", {\n name: \"example-vc\",\n description: \"Virtual Circuit\",\n connectionId: example.id,\n projectId: exampleEquinixMetalProject.id,\n portId: example.ports[0].id,\n nniVlan: 1024,\n vrfId: exampleEquinixMetalVrf.id,\n peerAsn: 65530,\n subnet: \"192.168.100.16/31\",\n metalIp: \"192.168.100.16\",\n customerIp: \"192.168.100.17\",\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nexample_virtual_circuit = equinix.metal.VirtualCircuit(\"exampleVirtualCircuit\",\n name=\"example-vc\",\n description=\"Virtual Circuit\",\n connection_id=example[\"id\"],\n project_id=example_equinix_metal_project[\"id\"],\n port_id=example[\"ports\"][0][\"id\"],\n nni_vlan=1024,\n vrf_id=example_equinix_metal_vrf[\"id\"],\n peer_asn=65530,\n subnet=\"192.168.100.16/31\",\n metal_ip=\"192.168.100.16\",\n customer_ip=\"192.168.100.17\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal\"\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 := metal.NewVirtualCircuit(ctx, \"exampleVirtualCircuit\", \u0026metal.VirtualCircuitArgs{\n\t\t\tName: pulumi.String(\"example-vc\"),\n\t\t\tDescription: pulumi.String(\"Virtual Circuit\"),\n\t\t\tConnectionId: pulumi.Any(example.Id),\n\t\t\tProjectId: pulumi.Any(exampleEquinixMetalProject.Id),\n\t\t\tPortId: pulumi.Any(example.Ports[0].Id),\n\t\t\tNniVlan: pulumi.Int(1024),\n\t\t\tVrfId: pulumi.Any(exampleEquinixMetalVrf.Id),\n\t\t\tPeerAsn: pulumi.Int(65530),\n\t\t\tSubnet: pulumi.String(\"192.168.100.16/31\"),\n\t\t\tMetalIp: pulumi.String(\"192.168.100.16\"),\n\t\t\tCustomerIp: pulumi.String(\"192.168.100.17\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleVirtualCircuit = new Equinix.Metal.VirtualCircuit(\"exampleVirtualCircuit\", new()\n {\n Name = \"example-vc\",\n Description = \"Virtual Circuit\",\n ConnectionId = example.Id,\n ProjectId = exampleEquinixMetalProject.Id,\n PortId = example.Ports[0].Id,\n NniVlan = 1024,\n VrfId = exampleEquinixMetalVrf.Id,\n PeerAsn = 65530,\n Subnet = \"192.168.100.16/31\",\n MetalIp = \"192.168.100.16\",\n CustomerIp = \"192.168.100.17\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.metal.VirtualCircuit;\nimport com.pulumi.equinix.metal.VirtualCircuitArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleVirtualCircuit = new VirtualCircuit(\"exampleVirtualCircuit\", VirtualCircuitArgs.builder()\n .name(\"example-vc\")\n .description(\"Virtual Circuit\")\n .connectionId(example.id())\n .projectId(exampleEquinixMetalProject.id())\n .portId(example.ports()[0].id())\n .nniVlan(1024)\n .vrfId(exampleEquinixMetalVrf.id())\n .peerAsn(65530)\n .subnet(\"192.168.100.16/31\")\n .metalIp(\"192.168.100.16\")\n .customerIp(\"192.168.100.17\")\n .build());\n\n }\n}\n```\n```yaml\n exampleVirtualCircuit:\n type: equinix:metal:VirtualCircuit\n name: example\n properties:\n name: example-vc\n description: Virtual Circuit\n connectionId: ${example.id}\n projectId: ${exampleEquinixMetalProject.id}\n portId: ${example.ports[0].id}\n nniVlan: 1024\n vrfId: ${exampleEquinixMetalVrf.id}\n peerAsn: 65530\n subnet: 192.168.100.16/31\n metalIp: 192.168.100.16\n customerIp: 192.168.100.17\nvariables:\n example:\n fn::invoke:\n Function: equinix:metal:getInterconnection\n Arguments:\n connectionId: ${metalDedicatedConnectionId}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing VRF ID:\n\n```sh\n$ pulumi import equinix:metal/vrf:Vrf equinix_metal_vrf {existing_id}\n```\n\n\n{{% /examples %}}", "properties": { "description": { "type": "string", @@ -17253,7 +17252,7 @@ } }, "equinix:networkedge/aclTemplate:AclTemplate": { - "description": "Resource `equinix.networkedge.AclTemplate` allows creation and management of Equinix Network Edge device Access Control List templates.\n\nDevice ACL templates give possibility to define set of rules will allowed inbound traffic. Templates can be assigned to the network devices.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst aclTemplate = new equinix.networkedge.AclTemplate(\"aclTemplate\", {\n name: \"test\",\n description: \"Test ACL template\",\n inboundRules: [\n {\n subnet: \"1.1.1.1/32\",\n protocol: \"IP\",\n srcPort: \"any\",\n dstPort: \"any\",\n description: \"inbound rule description\",\n },\n {\n subnet: \"2.2.2.2/28\",\n protocol: \"TCP\",\n srcPort: \"any\",\n dstPort: \"any\",\n description: \"inbound rule description\",\n },\n ],\n});\nexport const templateId = aclTemplate.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nacl_template = equinix.networkedge.AclTemplate(\"aclTemplate\",\n name=\"test\",\n description=\"Test ACL template\",\n inbound_rules=[\n equinix.networkedge.AclTemplateInboundRuleArgs(\n subnet=\"1.1.1.1/32\",\n protocol=\"IP\",\n src_port=\"any\",\n dst_port=\"any\",\n description=\"inbound rule description\",\n ),\n equinix.networkedge.AclTemplateInboundRuleArgs(\n subnet=\"2.2.2.2/28\",\n protocol=\"TCP\",\n src_port=\"any\",\n dst_port=\"any\",\n description=\"inbound rule description\",\n ),\n ])\npulumi.export(\"templateId\", acl_template.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taclTemplate, err := networkedge.NewAclTemplate(ctx, \"aclTemplate\", \u0026networkedge.AclTemplateArgs{\n\t\t\tName: pulumi.String(\"test\"),\n\t\t\tDescription: pulumi.String(\"Test ACL template\"),\n\t\t\tInboundRules: networkedge.AclTemplateInboundRuleArray{\n\t\t\t\t\u0026networkedge.AclTemplateInboundRuleArgs{\n\t\t\t\t\tSubnet: pulumi.String(\"1.1.1.1/32\"),\n\t\t\t\t\tProtocol: pulumi.String(\"IP\"),\n\t\t\t\t\tSrcPort: pulumi.String(\"any\"),\n\t\t\t\t\tDstPort: pulumi.String(\"any\"),\n\t\t\t\t\tDescription: pulumi.String(\"inbound rule description\"),\n\t\t\t\t},\n\t\t\t\t\u0026networkedge.AclTemplateInboundRuleArgs{\n\t\t\t\t\tSubnet: pulumi.String(\"2.2.2.2/28\"),\n\t\t\t\t\tProtocol: pulumi.String(\"TCP\"),\n\t\t\t\t\tSrcPort: pulumi.String(\"any\"),\n\t\t\t\t\tDstPort: pulumi.String(\"any\"),\n\t\t\t\t\tDescription: pulumi.String(\"inbound rule description\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"templateId\", aclTemplate.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var aclTemplate = new Equinix.NetworkEdge.AclTemplate(\"aclTemplate\", new()\n {\n Name = \"test\",\n Description = \"Test ACL template\",\n InboundRules = new[]\n {\n new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs\n {\n Subnet = \"1.1.1.1/32\",\n Protocol = \"IP\",\n SrcPort = \"any\",\n DstPort = \"any\",\n Description = \"inbound rule description\",\n },\n new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs\n {\n Subnet = \"2.2.2.2/28\",\n Protocol = \"TCP\",\n SrcPort = \"any\",\n DstPort = \"any\",\n Description = \"inbound rule description\",\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"templateId\"] = aclTemplate.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.networkedge.AclTemplate;\nimport com.equinix.pulumi.networkedge.AclTemplateArgs;\nimport com.equinix.pulumi.networkedge.inputs.AclTemplateInboundRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var aclTemplate = new AclTemplate(\"aclTemplate\", AclTemplateArgs.builder() \n .name(\"test\")\n .description(\"Test ACL template\")\n .inboundRules( \n AclTemplateInboundRuleArgs.builder()\n .subnet(\"1.1.1.1/32\")\n .protocol(\"IP\")\n .srcPort(\"any\")\n .dstPort(\"any\")\n .description(\"inbound rule description\")\n .build(),\n AclTemplateInboundRuleArgs.builder()\n .subnet(\"2.2.2.2/28\")\n .protocol(\"TCP\")\n .srcPort(\"any\")\n .dstPort(\"any\")\n .description(\"inbound rule description\")\n .build())\n .build());\n\n ctx.export(\"templateId\", aclTemplate.id());\n }\n}\n```\n```yaml\nresources:\n aclTemplate:\n type: equinix:networkedge:AclTemplate\n properties:\n name: test\n description: Test ACL template\n inboundRules:\n - subnet: 1.1.1.1/32\n protocol: IP\n srcPort: any\n dstPort: any\n description: inbound rule description\n - subnet: 2.2.2.2/28\n protocol: TCP\n srcPort: any\n dstPort: any\n description: inbound rule description\noutputs:\n templateId: ${aclTemplate.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/aclTemplate:AclTemplate example {existing_id}\n```\n\n\n{{% /examples %}}", + "description": "Resource `equinix.networkedge.AclTemplate` allows creation and management of Equinix Network Edge device Access Control List templates.\n\nDevice ACL templates give possibility to define set of rules will allowed inbound traffic. Templates can be assigned to the network devices.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst myacl = new equinix.networkedge.AclTemplate(\"myacl\", {\n name: \"test\",\n description: \"Test ACL template\",\n projectId: \"a86d7112-d740-4758-9c9c-31e66373746b\",\n inboundRules: [\n {\n subnet: \"1.1.1.1/32\",\n protocol: equinix.networkedge.AclRuleProtocolType.IP,\n srcPort: \"any\",\n dstPort: \"any\",\n description: \"inbound rule description\",\n },\n {\n subnet: \"172.16.25.0/24\",\n protocol: equinix.networkedge.AclRuleProtocolType.UDP,\n srcPort: \"any\",\n dstPort: \"53,1045,2041\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nmyacl = equinix.networkedge.AclTemplate(\"myacl\",\n name=\"test\",\n description=\"Test ACL template\",\n project_id=\"a86d7112-d740-4758-9c9c-31e66373746b\",\n inbound_rules=[\n equinix.networkedge.AclTemplateInboundRuleArgs(\n subnet=\"1.1.1.1/32\",\n protocol=equinix.networkedge.AclRuleProtocolType.IP,\n src_port=\"any\",\n dst_port=\"any\",\n description=\"inbound rule description\",\n ),\n equinix.networkedge.AclTemplateInboundRuleArgs(\n subnet=\"172.16.25.0/24\",\n protocol=equinix.networkedge.AclRuleProtocolType.UDP,\n src_port=\"any\",\n dst_port=\"53,1045,2041\",\n ),\n ])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\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 := networkedge.NewAclTemplate(ctx, \"myacl\", \u0026networkedge.AclTemplateArgs{\n\t\t\tName: pulumi.String(\"test\"),\n\t\t\tDescription: pulumi.String(\"Test ACL template\"),\n\t\t\tProjectId: pulumi.String(\"a86d7112-d740-4758-9c9c-31e66373746b\"),\n\t\t\tInboundRules: networkedge.AclTemplateInboundRuleArray{\n\t\t\t\t\u0026networkedge.AclTemplateInboundRuleArgs{\n\t\t\t\t\tSubnet: pulumi.String(\"1.1.1.1/32\"),\n\t\t\t\t\tProtocol: pulumi.String(networkedge.AclRuleProtocolTypeIP),\n\t\t\t\t\tSrcPort: pulumi.String(\"any\"),\n\t\t\t\t\tDstPort: pulumi.String(\"any\"),\n\t\t\t\t\tDescription: pulumi.String(\"inbound rule description\"),\n\t\t\t\t},\n\t\t\t\t\u0026networkedge.AclTemplateInboundRuleArgs{\n\t\t\t\t\tSubnet: pulumi.String(\"172.16.25.0/24\"),\n\t\t\t\t\tProtocol: pulumi.String(networkedge.AclRuleProtocolTypeUDP),\n\t\t\t\t\tSrcPort: pulumi.String(\"any\"),\n\t\t\t\t\tDstPort: pulumi.String(\"53,1045,2041\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var myacl = new Equinix.NetworkEdge.AclTemplate(\"myacl\", new()\n {\n Name = \"test\",\n Description = \"Test ACL template\",\n ProjectId = \"a86d7112-d740-4758-9c9c-31e66373746b\",\n InboundRules = new[]\n {\n new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs\n {\n Subnet = \"1.1.1.1/32\",\n Protocol = Equinix.NetworkEdge.AclRuleProtocolType.IP,\n SrcPort = \"any\",\n DstPort = \"any\",\n Description = \"inbound rule description\",\n },\n new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs\n {\n Subnet = \"172.16.25.0/24\",\n Protocol = Equinix.NetworkEdge.AclRuleProtocolType.UDP,\n SrcPort = \"any\",\n DstPort = \"53,1045,2041\",\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.AclTemplate;\nimport com.pulumi.equinix.networkedge.AclTemplateArgs;\nimport com.pulumi.equinix.networkedge.inputs.AclTemplateInboundRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var myacl = new AclTemplate(\"myacl\", AclTemplateArgs.builder()\n .name(\"test\")\n .description(\"Test ACL template\")\n .projectId(\"a86d7112-d740-4758-9c9c-31e66373746b\")\n .inboundRules( \n AclTemplateInboundRuleArgs.builder()\n .subnet(\"1.1.1.1/32\")\n .protocol(\"IP\")\n .srcPort(\"any\")\n .dstPort(\"any\")\n .description(\"inbound rule description\")\n .build(),\n AclTemplateInboundRuleArgs.builder()\n .subnet(\"172.16.25.0/24\")\n .protocol(\"UDP\")\n .srcPort(\"any\")\n .dstPort(\"53,1045,2041\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n # Creates ACL template and assigns it to the network device\n myacl:\n type: equinix:networkedge:AclTemplate\n properties:\n name: test\n description: Test ACL template\n projectId: a86d7112-d740-4758-9c9c-31e66373746b\n inboundRules:\n - subnet: 1.1.1.1/32\n protocol: IP\n srcPort: any\n dstPort: any\n description: inbound rule description\n - subnet: 172.16.25.0/24\n protocol: UDP\n srcPort: any\n dstPort: 53,1045,2041\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/aclTemplate:AclTemplate example {existing_id}\n```\n\n\n{{% /examples %}}", "properties": { "description": { "type": "string", @@ -17392,7 +17391,7 @@ } }, "equinix:networkedge/bgp:Bgp": { - "description": "Resource `equinix.networkedge.Bgp` allows creation and management of Equinix Network Edge BGP peering configurations.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst bgp = new equinix.networkedge.Bgp(\"bgp\", {\n connectionId: \"54014acf-9730-4b55-a791-459283d05fb1\",\n localIpAddress: \"10.1.1.1/30\",\n localAsn: 12345,\n remoteIpAddress: \"10.1.1.2\",\n remoteAsn: 66123,\n authenticationKey: \"secret\",\n});\nexport const state = bgp.state;\nexport const provisioningStatus = bgp.provisioningStatus;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nbgp = equinix.networkedge.Bgp(\"bgp\",\n connection_id=\"54014acf-9730-4b55-a791-459283d05fb1\",\n local_ip_address=\"10.1.1.1/30\",\n local_asn=12345,\n remote_ip_address=\"10.1.1.2\",\n remote_asn=66123,\n authentication_key=\"secret\")\npulumi.export(\"state\", bgp.state)\npulumi.export(\"provisioningStatus\", bgp.provisioning_status)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tbgp, err := networkedge.NewBgp(ctx, \"bgp\", \u0026networkedge.BgpArgs{\n\t\t\tConnectionId: pulumi.String(\"54014acf-9730-4b55-a791-459283d05fb1\"),\n\t\t\tLocalIpAddress: pulumi.String(\"10.1.1.1/30\"),\n\t\t\tLocalAsn: pulumi.Int(12345),\n\t\t\tRemoteIpAddress: pulumi.String(\"10.1.1.2\"),\n\t\t\tRemoteAsn: pulumi.Int(66123),\n\t\t\tAuthenticationKey: pulumi.String(\"secret\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"state\", bgp.State)\n\t\tctx.Export(\"provisioningStatus\", bgp.ProvisioningStatus)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bgp = new Equinix.NetworkEdge.Bgp(\"bgp\", new()\n {\n ConnectionId = \"54014acf-9730-4b55-a791-459283d05fb1\",\n LocalIpAddress = \"10.1.1.1/30\",\n LocalAsn = 12345,\n RemoteIpAddress = \"10.1.1.2\",\n RemoteAsn = 66123,\n AuthenticationKey = \"secret\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"state\"] = bgp.State,\n [\"provisioningStatus\"] = bgp.ProvisioningStatus,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.networkedge.Bgp;\nimport com.equinix.pulumi.networkedge.BgpArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bgp = new Bgp(\"bgp\", BgpArgs.builder() \n .connectionId(\"54014acf-9730-4b55-a791-459283d05fb1\")\n .localIpAddress(\"10.1.1.1/30\")\n .localAsn(12345)\n .remoteIpAddress(\"10.1.1.2\")\n .remoteAsn(66123)\n .authenticationKey(\"secret\")\n .build());\n\n ctx.export(\"state\", bgp.state());\n ctx.export(\"provisioningStatus\", bgp.provisioningStatus());\n }\n}\n```\n```yaml\nresources:\n bgp:\n type: equinix:networkedge:Bgp\n properties:\n connectionId: 54014acf-9730-4b55-a791-459283d05fb1\n localIpAddress: 10.1.1.1/30\n localAsn: 12345\n remoteIpAddress: 10.1.1.2\n remoteAsn: 66123\n authenticationKey: secret\noutputs:\n state: ${bgp.state}\n provisioningStatus: ${bgp.provisioningStatus}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/bgp:Bgp example {existing_id}\n```\n\n\n{{% /examples %}}", + "description": "Resource `equinix.networkedge.Bgp` allows creation and management of Equinix Network Edge BGP peering configurations.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.networkedge.Bgp(\"test\", {\n connectionId: \"54014acf-9730-4b55-a791-459283d05fb1\",\n localIpAddress: \"10.1.1.1/30\",\n localAsn: 12345,\n remoteIpAddress: \"10.1.1.2\",\n remoteAsn: 66123,\n authenticationKey: \"secret\",\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.networkedge.Bgp(\"test\",\n connection_id=\"54014acf-9730-4b55-a791-459283d05fb1\",\n local_ip_address=\"10.1.1.1/30\",\n local_asn=12345,\n remote_ip_address=\"10.1.1.2\",\n remote_asn=66123,\n authentication_key=\"secret\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\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 := networkedge.NewBgp(ctx, \"test\", \u0026networkedge.BgpArgs{\n\t\t\tConnectionId: pulumi.String(\"54014acf-9730-4b55-a791-459283d05fb1\"),\n\t\t\tLocalIpAddress: pulumi.String(\"10.1.1.1/30\"),\n\t\t\tLocalAsn: pulumi.Int(12345),\n\t\t\tRemoteIpAddress: pulumi.String(\"10.1.1.2\"),\n\t\t\tRemoteAsn: pulumi.Int(66123),\n\t\t\tAuthenticationKey: pulumi.String(\"secret\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.NetworkEdge.Bgp(\"test\", new()\n {\n ConnectionId = \"54014acf-9730-4b55-a791-459283d05fb1\",\n LocalIpAddress = \"10.1.1.1/30\",\n LocalAsn = 12345,\n RemoteIpAddress = \"10.1.1.2\",\n RemoteAsn = 66123,\n AuthenticationKey = \"secret\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.Bgp;\nimport com.pulumi.equinix.networkedge.BgpArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Bgp(\"test\", BgpArgs.builder()\n .connectionId(\"54014acf-9730-4b55-a791-459283d05fb1\")\n .localIpAddress(\"10.1.1.1/30\")\n .localAsn(12345)\n .remoteIpAddress(\"10.1.1.2\")\n .remoteAsn(66123)\n .authenticationKey(\"secret\")\n .build());\n\n }\n}\n```\n```yaml\n # Create BGP peering configuration on a existing connection\n # between network device and service provider\n test:\n type: equinix:networkedge:Bgp\n properties:\n connectionId: 54014acf-9730-4b55-a791-459283d05fb1\n localIpAddress: 10.1.1.1/30\n localAsn: 12345\n remoteIpAddress: 10.1.1.2\n remoteAsn: 66123\n authenticationKey: secret\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/bgp:Bgp example {existing_id}\n```\n\n\n{{% /examples %}}", "properties": { "authenticationKey": { "type": "string", @@ -17532,7 +17531,7 @@ } }, "equinix:networkedge/device:Device": { - "description": "Resource `equinix.networkedge.Device` allows creation and management of Equinix Network Edge virtual network devices.\n\nNetwork Edge virtual network devices can be created in two modes:\n\n* **managed** - (default) Where Equinix manages connectivity and services in the device and customer gets limited access to the device.\n* **self-configured** - Where customer provisions and manages own services in the device with less restricted access. Some device types are offered only in this mode.\n\nIn addition to management modes, there are two software license modes available:\n\n* **subscription** - Where Equinix provides software license, including end-to-end support, and bills for the service respectively.\n* **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst accountName = config.require(\"accountName\");\nconst licenseToken = config.require(\"licenseToken\");\nconst sshUserName = config.require(\"sshUserName\");\nconst sshKeyName = config.require(\"sshKeyName\");\nconst aclTemplateId = config.require(\"aclTemplateId\");\nconst metro = config.get(\"metro\") || \"SV\";\nconst devicePackageCode = config.get(\"devicePackageCode\") || \"network-essentials\";\nconst deviceVersion = config.get(\"deviceVersion\") || \"17.06.01a\";\nconst sizeInCores = config.getNumber(\"sizeInCores\") || 2;\nconst termLength = config.getNumber(\"termLength\") || 6;\nconst additionalBandwidth = config.getNumber(\"additionalBandwidth\") || 5;\nconst accountNum = equinix.networkedge.getAccount({\n name: accountName,\n metroCode: metro,\n}).then(invoke =\u003e invoke.number);\nconst c8KRouter = new equinix.networkedge.Device(\"c8kRouter\", {\n name: \"catalystRouter\",\n metroCode: metro,\n typeCode: \"C8000V\",\n selfManaged: true,\n byol: true,\n packageCode: devicePackageCode,\n notifications: [\"example@equinix.com\"],\n hostname: \"C8KV\",\n accountNumber: accountNum,\n version: deviceVersion,\n coreCount: sizeInCores,\n termLength: termLength,\n licenseToken: licenseToken,\n additionalBandwidth: additionalBandwidth,\n sshKey: {\n username: sshUserName,\n keyName: sshKeyName,\n },\n aclTemplateId: aclTemplateId,\n});\nexport const routerId = c8KRouter.id;\nexport const provisionStatus = c8KRouter.status;\nexport const licenseStatus = c8KRouter.licenseStatus;\nexport const sshIpAddress = c8KRouter.sshIpAddress;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\naccount_name = config.require(\"accountName\")\nlicense_token = config.require(\"licenseToken\")\nssh_user_name = config.require(\"sshUserName\")\nssh_key_name = config.require(\"sshKeyName\")\nacl_template_id = config.require(\"aclTemplateId\")\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"SV\"\ndevice_package_code = config.get(\"devicePackageCode\")\nif device_package_code is None:\n device_package_code = \"network-essentials\"\ndevice_version = config.get(\"deviceVersion\")\nif device_version is None:\n device_version = \"17.06.01a\"\nsize_in_cores = config.get_int(\"sizeInCores\")\nif size_in_cores is None:\n size_in_cores = 2\nterm_length = config.get_int(\"termLength\")\nif term_length is None:\n term_length = 6\nadditional_bandwidth = config.get_int(\"additionalBandwidth\")\nif additional_bandwidth is None:\n additional_bandwidth = 5\naccount_num = equinix.networkedge.get_account(name=account_name,\n metro_code=metro).number\nc8_k_router = equinix.networkedge.Device(\"c8kRouter\",\n name=\"catalystRouter\",\n metro_code=metro,\n type_code=\"C8000V\",\n self_managed=True,\n byol=True,\n package_code=device_package_code,\n notifications=[\"example@equinix.com\"],\n hostname=\"C8KV\",\n account_number=account_num,\n version=device_version,\n core_count=size_in_cores,\n term_length=term_length,\n license_token=license_token,\n additional_bandwidth=additional_bandwidth,\n ssh_key=equinix.networkedge.DeviceSshKeyArgs(\n username=ssh_user_name,\n key_name=ssh_key_name,\n ),\n acl_template_id=acl_template_id)\npulumi.export(\"routerId\", c8_k_router.id)\npulumi.export(\"provisionStatus\", c8_k_router.status)\npulumi.export(\"licenseStatus\", c8_k_router.license_status)\npulumi.export(\"sshIpAddress\", c8_k_router.ssh_ip_address)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\taccountName := cfg.Require(\"accountName\")\n\t\tlicenseToken := cfg.Require(\"licenseToken\")\n\t\tsshUserName := cfg.Require(\"sshUserName\")\n\t\tsshKeyName := cfg.Require(\"sshKeyName\")\n\t\taclTemplateId := cfg.Require(\"aclTemplateId\")\n\t\tmetro := \"SV\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tdevicePackageCode := \"network-essentials\"\n\t\tif param := cfg.Get(\"devicePackageCode\"); param != \"\" {\n\t\t\tdevicePackageCode = param\n\t\t}\n\t\tdeviceVersion := \"17.06.01a\"\n\t\tif param := cfg.Get(\"deviceVersion\"); param != \"\" {\n\t\t\tdeviceVersion = param\n\t\t}\n\t\tsizeInCores := 2\n\t\tif param := cfg.GetInt(\"sizeInCores\"); param != 0 {\n\t\t\tsizeInCores = param\n\t\t}\n\t\ttermLength := 6\n\t\tif param := cfg.GetInt(\"termLength\"); param != 0 {\n\t\t\ttermLength = param\n\t\t}\n\t\tadditionalBandwidth := 5\n\t\tif param := cfg.GetInt(\"additionalBandwidth\"); param != 0 {\n\t\t\tadditionalBandwidth = param\n\t\t}\n\t\taccountNum := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tName: pulumi.StringRef(accountName),\n\t\t\tMetroCode: metro,\n\t\t}, nil).Number\n\t\tc8KRouter, err := networkedge.NewDevice(ctx, \"c8kRouter\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"catalystRouter\"),\n\t\t\tMetroCode: pulumi.String(metro),\n\t\t\tTypeCode: pulumi.String(\"C8000V\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(devicePackageCode),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"example@equinix.com\"),\n\t\t\t},\n\t\t\tHostname: pulumi.String(\"C8KV\"),\n\t\t\tAccountNumber: *pulumi.String(accountNum),\n\t\t\tVersion: pulumi.Any(deviceVersion),\n\t\t\tCoreCount: pulumi.Int(sizeInCores),\n\t\t\tTermLength: pulumi.Int(termLength),\n\t\t\tLicenseToken: pulumi.String(licenseToken),\n\t\t\tAdditionalBandwidth: pulumi.Int(additionalBandwidth),\n\t\t\tSshKey: \u0026networkedge.DeviceSshKeyArgs{\n\t\t\t\tUsername: pulumi.String(sshUserName),\n\t\t\t\tKeyName: pulumi.String(sshKeyName),\n\t\t\t},\n\t\t\tAclTemplateId: pulumi.String(aclTemplateId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"routerId\", c8KRouter.ID())\n\t\tctx.Export(\"provisionStatus\", c8KRouter.Status)\n\t\tctx.Export(\"licenseStatus\", c8KRouter.LicenseStatus)\n\t\tctx.Export(\"sshIpAddress\", c8KRouter.SshIpAddress)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var accountName = config.Require(\"accountName\");\n var licenseToken = config.Require(\"licenseToken\");\n var sshUserName = config.Require(\"sshUserName\");\n var sshKeyName = config.Require(\"sshKeyName\");\n var aclTemplateId = config.Require(\"aclTemplateId\");\n var metro = config.Get(\"metro\") ?? \"SV\";\n var devicePackageCode = config.Get(\"devicePackageCode\") ?? \"network-essentials\";\n var deviceVersion = config.Get(\"deviceVersion\") ?? \"17.06.01a\";\n var sizeInCores = config.GetNumber(\"sizeInCores\") ?? 2;\n var termLength = config.GetNumber(\"termLength\") ?? 6;\n var additionalBandwidth = config.GetNumber(\"additionalBandwidth\") ?? 5;\n var accountNum = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n Name = accountName,\n MetroCode = metro,\n }).Apply(invoke =\u003e invoke.Number);\n\n var c8KRouter = new Equinix.NetworkEdge.Device(\"c8kRouter\", new()\n {\n Name = \"catalystRouter\",\n MetroCode = metro,\n TypeCode = \"C8000V\",\n SelfManaged = true,\n Byol = true,\n PackageCode = devicePackageCode,\n Notifications = new[]\n {\n \"example@equinix.com\",\n },\n Hostname = \"C8KV\",\n AccountNumber = accountNum,\n Version = deviceVersion,\n CoreCount = sizeInCores,\n TermLength = termLength,\n LicenseToken = licenseToken,\n AdditionalBandwidth = additionalBandwidth,\n SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs\n {\n Username = sshUserName,\n KeyName = sshKeyName,\n },\n AclTemplateId = aclTemplateId,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"routerId\"] = c8KRouter.Id,\n [\"provisionStatus\"] = c8KRouter.Status,\n [\"licenseStatus\"] = c8KRouter.LicenseStatus,\n [\"sshIpAddress\"] = c8KRouter.SshIpAddress,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.networkedge.Device;\nimport com.equinix.pulumi.networkedge.DeviceArgs;\nimport com.equinix.pulumi.networkedge.inputs.DeviceSshKeyArgs;\nimport com.equinix.pulumi.networkedge.inputs.GetAccountArgs;\nimport com.equinix.pulumi.networkedge.NetworkedgeFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var accountName = config.get(\"accountName\").get();\n final var licenseToken = config.get(\"licenseToken\").get();\n final var sshUserName = config.get(\"sshUserName\").get();\n final var sshKeyName = config.get(\"sshKeyName\").get();\n final var aclTemplateId = config.get(\"aclTemplateId\").get();\n final var metro = config.get(\"metro\").orElse(\"SV\");\n final var devicePackageCode = config.get(\"devicePackageCode\").orElse(\"network-essentials\");\n final var deviceVersion = config.get(\"deviceVersion\").orElse(\"17.06.01a\");\n final var sizeInCores = Integer.parseInt(config.get(\"sizeInCores\").orElse(\"2\"));\n final var termLength = Integer.parseInt(config.get(\"termLength\").orElse(\"6\"));\n final var additionalBandwidth = Integer.parseInt(config.get(\"additionalBandwidth\").orElse(\"5\"));\n final var accountNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .name(accountName)\n .metroCode(metro)\n .build()).applyValue(account -\u003e account.number());\n\n var c8KRouter = new Device(\"c8KRouter\", DeviceArgs.builder() \n .name(\"catalystRouter\")\n .metroCode(metro)\n .typeCode(\"C8000V\")\n .selfManaged(true)\n .byol(true)\n .packageCode(devicePackageCode)\n .notifications(\"example@equinix.com\")\n .hostname(\"C8KV\")\n .accountNumber(accountNum)\n .version(deviceVersion)\n .coreCount(sizeInCores)\n .termLength(termLength)\n .licenseToken(licenseToken)\n .additionalBandwidth(additionalBandwidth)\n .sshKey(DeviceSshKeyArgs.builder()\n .username(sshUserName)\n .keyName(sshKeyName)\n .build())\n .aclTemplateId(aclTemplateId)\n .build());\n\n ctx.export(\"routerId\", c8KRouter.id());\n ctx.export(\"provisionStatus\", c8KRouter.status());\n ctx.export(\"licenseStatus\", c8KRouter.licenseStatus());\n ctx.export(\"sshIpAddress\", c8KRouter.sshIpAddress());\n }\n}\n```\n```yaml\nconfig:\n accountName:\n type: string\n licenseToken:\n type: string\n sshUserName:\n type: string\n sshKeyName:\n type: string\n aclTemplateId:\n type: string\n metro:\n type: string\n default: SV\n devicePackageCode:\n type: string\n default: network-essentials\n deviceVersion:\n type: string\n default: 17.06.01a\n sizeInCores:\n type: integer\n default: 2\n termLength:\n type: integer\n default: 6\n additionalBandwidth:\n type: integer\n default: 5\nvariables:\n accountNum:\n fn::invoke:\n function: equinix:networkedge:getAccount\n arguments:\n name: ${accountName}\n metroCode: ${metro}\n return: number\nresources:\n c8kRouter:\n type: equinix:networkedge:Device\n properties:\n name: catalystRouter\n metroCode: ${metro}\n typeCode: C8000V\n selfManaged: true\n byol: true\n packageCode: ${devicePackageCode}\n notifications:\n - \"example@equinix.com\"\n hostname: C8KV\n accountNumber: ${accountNum}\n version: ${deviceVersion}\n coreCount: ${sizeInCores}\n termLength: ${termLength}\n licenseToken: ${licenseToken}\n additionalBandwidth: ${additionalBandwidth}\n sshKey:\n username: ${sshUserName}\n keyName: ${sshKeyName}\n aclTemplateId: ${aclTemplateId}\noutputs:\n routerId: ${c8kRouter.id}\n provisionStatus: ${c8kRouter.status}\n licenseStatus: ${c8kRouter.licenseStatus}\n sshIpAddress: ${c8kRouter.sshIpAddress}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/device:Device example {existing_id}\n```\n\nThe `license_token`, `mgmt_acl_template_uuid` and `cloud_init_file_id` fields can not be imported.\n\n\n{{% /examples %}}", + "description": "Resource `equinix.networkedge.Device` allows creation and management of Equinix Network Edge virtual network devices.\n\nNetwork Edge virtual network devices can be created in two modes:\n\n* **managed** - (default) Where Equinix manages connectivity and services in the device and customer gets limited access to the device.\n* **self-configured** - Where customer provisions and manages own services in the device with less restricted access. Some device types are offered only in this mode.\n\nIn addition to management modes, there are two software license modes available:\n\n* **subscription** - Where Equinix provides software license, including end-to-end support, and bills for the service respectively.\n* **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n### example 8\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\nimport * as std from \"@pulumi/std\";\n\nconst sv = equinix.networkedge.getAccountOutput({\n name: \"account-name\",\n metroCode: \"SV\",\n});\nconst bluecatEdgeServicePointCloudinitPrimaryFile = new equinix.networkedge.NetworkFile(\"bluecatEdgeServicePointCloudinitPrimaryFile\", {\n fileName: \"TF-BLUECAT-ESP-cloud-init-file.txt\",\n content: std.fileOutput({\n input: filepath,\n }).apply(invoke =\u003e invoke.result),\n metroCode: sv.apply(sv =\u003e sv.metroCode).apply((x) =\u003e equinix.index.Metro[x]),\n deviceTypeCode: \"BLUECAT-EDGE-SERVICE-POINT\",\n processType: equinix.networkedge.FileType.CloudInit,\n selfManaged: true,\n byol: true,\n});\nconst bluecatEdgeServicePointCloudinitSecondaryFile = new equinix.networkedge.NetworkFile(\"bluecatEdgeServicePointCloudinitSecondaryFile\", {\n fileName: \"TF-BLUECAT-ESP-cloud-init-file.txt\",\n content: std.fileOutput({\n input: filepath,\n }).apply(invoke =\u003e invoke.result),\n metroCode: sv.apply(sv =\u003e sv.metroCode).apply((x) =\u003e equinix.index.Metro[x]),\n deviceTypeCode: \"BLUECAT-EDGE-SERVICE-POINT\",\n processType: equinix.networkedge.FileType.CloudInit,\n selfManaged: true,\n byol: true,\n});\nconst bluecatEdgeServicePointHa = new equinix.networkedge.Device(\"bluecatEdgeServicePointHa\", {\n name: \"tf-bluecat-edge-service-point-p\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n typeCode: \"BLUECAT-EDGE-SERVICE-POINT\",\n selfManaged: true,\n connectivity: \"PRIVATE\",\n byol: true,\n packageCode: \"STD\",\n notifications: [\"test@equinix.com\"],\n accountNumber: sv.apply(sv =\u003e sv.number),\n cloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.uuid,\n version: \"4.6.3\",\n coreCount: 4,\n termLength: 12,\n secondaryDevice: {\n name: \"tf-bluecat-edge-service-point-s\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n notifications: [\"test@eq.com\"],\n accountNumber: sv.apply(sv =\u003e sv.number),\n cloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.uuid,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\nimport pulumi_std as std\n\nsv = equinix.networkedge.get_account_output(name=\"account-name\",\n metro_code=\"SV\")\nbluecat_edge_service_point_cloudinit_primary_file = equinix.networkedge.NetworkFile(\"bluecatEdgeServicePointCloudinitPrimaryFile\",\n file_name=\"TF-BLUECAT-ESP-cloud-init-file.txt\",\n content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),\n metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),\n device_type_code=\"BLUECAT-EDGE-SERVICE-POINT\",\n process_type=equinix.networkedge.FileType.CLOUD_INIT,\n self_managed=True,\n byol=True)\nbluecat_edge_service_point_cloudinit_secondary_file = equinix.networkedge.NetworkFile(\"bluecatEdgeServicePointCloudinitSecondaryFile\",\n file_name=\"TF-BLUECAT-ESP-cloud-init-file.txt\",\n content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),\n metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),\n device_type_code=\"BLUECAT-EDGE-SERVICE-POINT\",\n process_type=equinix.networkedge.FileType.CLOUD_INIT,\n self_managed=True,\n byol=True)\nbluecat_edge_service_point_ha = equinix.networkedge.Device(\"bluecatEdgeServicePointHa\",\n name=\"tf-bluecat-edge-service-point-p\",\n metro_code=sv.metro_code,\n type_code=\"BLUECAT-EDGE-SERVICE-POINT\",\n self_managed=True,\n connectivity=\"PRIVATE\",\n byol=True,\n package_code=\"STD\",\n notifications=[\"test@equinix.com\"],\n account_number=sv.number,\n cloud_init_file_id=bluecat_edge_service_point_cloudinit_primary_file.uuid,\n version=\"4.6.3\",\n core_count=4,\n term_length=12,\n secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(\n name=\"tf-bluecat-edge-service-point-s\",\n metro_code=sv.metro_code,\n notifications=[\"test@eq.com\"],\n account_number=sv.number,\n cloud_init_file_id=bluecat_edge_service_point_cloudinit_secondary_file.uuid,\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tName: pulumi.StringRef(\"account-name\"),\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: filepath,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbluecatEdgeServicePointCloudinitPrimaryFile, err := networkedge.NewNetworkFile(ctx, \"bluecatEdgeServicePointCloudinitPrimaryFile\", \u0026networkedge.NetworkFileArgs{\n\t\t\tFileName: pulumi.String(\"TF-BLUECAT-ESP-cloud-init-file.txt\"),\n\t\t\tContent: invokeFile.Result,\n\t\t\tMetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput),\n\t\t\tDeviceTypeCode: pulumi.String(\"BLUECAT-EDGE-SERVICE-POINT\"),\n\t\t\tProcessType: pulumi.String(networkedge.FileTypeCloudInit),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFile1, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: filepath,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbluecatEdgeServicePointCloudinitSecondaryFile, err := networkedge.NewNetworkFile(ctx, \"bluecatEdgeServicePointCloudinitSecondaryFile\", \u0026networkedge.NetworkFileArgs{\n\t\t\tFileName: pulumi.String(\"TF-BLUECAT-ESP-cloud-init-file.txt\"),\n\t\t\tContent: invokeFile1.Result,\n\t\t\tMetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput),\n\t\t\tDeviceTypeCode: pulumi.String(\"BLUECAT-EDGE-SERVICE-POINT\"),\n\t\t\tProcessType: pulumi.String(networkedge.FileTypeCloudInit),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"bluecatEdgeServicePointHa\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-bluecat-edge-service-point-p\"),\n\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"BLUECAT-EDGE-SERVICE-POINT\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tConnectivity: pulumi.String(\"PRIVATE\"),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(\"STD\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"test@equinix.com\"),\n\t\t\t},\n\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\tCloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.Uuid,\n\t\t\tVersion: pulumi.String(\"4.6.3\"),\n\t\t\tCoreCount: pulumi.Int(4),\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tSecondaryDevice: \u0026networkedge.DeviceSecondaryDeviceArgs{\n\t\t\t\tName: pulumi.String(\"tf-bluecat-edge-service-point-s\"),\n\t\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"test@eq.com\"),\n\t\t\t\t},\n\t\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\t\tCloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.Uuid,\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n Name = \"account-name\",\n MetroCode = \"SV\",\n });\n\n var bluecatEdgeServicePointCloudinitPrimaryFile = new Equinix.NetworkEdge.NetworkFile(\"bluecatEdgeServicePointCloudinitPrimaryFile\", new()\n {\n FileName = \"TF-BLUECAT-ESP-cloud-init-file.txt\",\n Content = Std.File.Invoke(new()\n {\n Input = filepath,\n }).Apply(invoke =\u003e invoke.Result),\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode).Apply(System.Enum.Parse\u003cEquinix.Metro\u003e),\n DeviceTypeCode = \"BLUECAT-EDGE-SERVICE-POINT\",\n ProcessType = Equinix.NetworkEdge.FileType.CloudInit,\n SelfManaged = true,\n Byol = true,\n });\n\n var bluecatEdgeServicePointCloudinitSecondaryFile = new Equinix.NetworkEdge.NetworkFile(\"bluecatEdgeServicePointCloudinitSecondaryFile\", new()\n {\n FileName = \"TF-BLUECAT-ESP-cloud-init-file.txt\",\n Content = Std.File.Invoke(new()\n {\n Input = filepath,\n }).Apply(invoke =\u003e invoke.Result),\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode).Apply(System.Enum.Parse\u003cEquinix.Metro\u003e),\n DeviceTypeCode = \"BLUECAT-EDGE-SERVICE-POINT\",\n ProcessType = Equinix.NetworkEdge.FileType.CloudInit,\n SelfManaged = true,\n Byol = true,\n });\n\n var bluecatEdgeServicePointHa = new Equinix.NetworkEdge.Device(\"bluecatEdgeServicePointHa\", new()\n {\n Name = \"tf-bluecat-edge-service-point-p\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"BLUECAT-EDGE-SERVICE-POINT\",\n SelfManaged = true,\n Connectivity = \"PRIVATE\",\n Byol = true,\n PackageCode = \"STD\",\n Notifications = new[]\n {\n \"test@equinix.com\",\n },\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n CloudInitFileId = bluecatEdgeServicePointCloudinitPrimaryFile.Uuid,\n Version = \"4.6.3\",\n CoreCount = 4,\n TermLength = 12,\n SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs\n {\n Name = \"tf-bluecat-edge-service-point-s\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n Notifications = new[]\n {\n \"test@eq.com\",\n },\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n CloudInitFileId = bluecatEdgeServicePointCloudinitSecondaryFile.Uuid,\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.NetworkFile;\nimport com.pulumi.equinix.networkedge.NetworkFileArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .name(\"account-name\")\n .metroCode(\"SV\")\n .build());\n\n var bluecatEdgeServicePointCloudinitPrimaryFile = new NetworkFile(\"bluecatEdgeServicePointCloudinitPrimaryFile\", NetworkFileArgs.builder()\n .fileName(\"TF-BLUECAT-ESP-cloud-init-file.txt\")\n .content(StdFunctions.file(FileArgs.builder()\n .input(filepath)\n .build()).result())\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .deviceTypeCode(\"BLUECAT-EDGE-SERVICE-POINT\")\n .processType(\"CLOUD_INIT\")\n .selfManaged(true)\n .byol(true)\n .build());\n\n var bluecatEdgeServicePointCloudinitSecondaryFile = new NetworkFile(\"bluecatEdgeServicePointCloudinitSecondaryFile\", NetworkFileArgs.builder()\n .fileName(\"TF-BLUECAT-ESP-cloud-init-file.txt\")\n .content(StdFunctions.file(FileArgs.builder()\n .input(filepath)\n .build()).result())\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .deviceTypeCode(\"BLUECAT-EDGE-SERVICE-POINT\")\n .processType(\"CLOUD_INIT\")\n .selfManaged(true)\n .byol(true)\n .build());\n\n var bluecatEdgeServicePointHa = new Device(\"bluecatEdgeServicePointHa\", DeviceArgs.builder()\n .name(\"tf-bluecat-edge-service-point-p\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"BLUECAT-EDGE-SERVICE-POINT\")\n .selfManaged(true)\n .connectivity(\"PRIVATE\")\n .byol(true)\n .packageCode(\"STD\")\n .notifications(\"test@equinix.com\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .cloudInitFileId(bluecatEdgeServicePointCloudinitPrimaryFile.uuid())\n .version(\"4.6.3\")\n .coreCount(4)\n .termLength(12)\n .secondaryDevice(DeviceSecondaryDeviceArgs.builder()\n .name(\"tf-bluecat-edge-service-point-s\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .notifications(\"test@eq.com\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .cloudInitFileId(bluecatEdgeServicePointCloudinitSecondaryFile.uuid())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n bluecatEdgeServicePointCloudinitPrimaryFile:\n type: equinix:networkedge:NetworkFile\n name: bluecat_edge_service_point_cloudinit_primary_file\n properties:\n fileName: TF-BLUECAT-ESP-cloud-init-file.txt\n content:\n fn::invoke:\n Function: std:file\n Arguments:\n input: ${filepath}\n Return: result\n metroCode: ${sv.metroCode}\n deviceTypeCode: BLUECAT-EDGE-SERVICE-POINT\n processType: CLOUD_INIT\n selfManaged: true\n byol: true\n bluecatEdgeServicePointCloudinitSecondaryFile:\n type: equinix:networkedge:NetworkFile\n name: bluecat_edge_service_point_cloudinit_secondary_file\n properties:\n fileName: TF-BLUECAT-ESP-cloud-init-file.txt\n content:\n fn::invoke:\n Function: std:file\n Arguments:\n input: ${filepath}\n Return: result\n metroCode: ${sv.metroCode}\n deviceTypeCode: BLUECAT-EDGE-SERVICE-POINT\n processType: CLOUD_INIT\n selfManaged: true\n byol: true\n bluecatEdgeServicePointHa:\n type: equinix:networkedge:Device\n name: bluecat_edge_service_point_ha\n properties:\n name: tf-bluecat-edge-service-point-p\n metroCode: ${sv.metroCode}\n typeCode: BLUECAT-EDGE-SERVICE-POINT\n selfManaged: true\n connectivity: PRIVATE\n byol: true\n packageCode: STD\n notifications:\n - test@equinix.com\n accountNumber: ${sv.number}\n cloudInitFileId: ${bluecatEdgeServicePointCloudinitPrimaryFile.uuid}\n version: 4.6.3\n coreCount: 4\n termLength: 12\n secondaryDevice:\n name: tf-bluecat-edge-service-point-s\n metroCode: ${sv.metroCode}\n notifications:\n - test@eq.com\n accountNumber: ${sv.number}\n cloudInitFileId: ${bluecatEdgeServicePointCloudinitSecondaryFile.uuid}\nvariables:\n # Create self configured redundant BlueCat Edge Service Point\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n name: account-name\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 1\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\n\nconst dc = equinix.networkedge.getAccountOutput({\n metroCode: \"DC\",\n});\nconst sv = equinix.networkedge.getAccountOutput({\n metroCode: \"SV\",\n});\nconst csr1000VHa = new equinix.networkedge.Device(\"csr1000vHa\", {\n name: \"tf-csr1000v-p\",\n throughput: 500,\n throughputUnit: equinix.networkedge.ThroughputUnit.Mbps,\n metroCode: dc.apply(dc =\u003e dc.metroCode),\n typeCode: \"CSR1000V\",\n selfManaged: false,\n connectivity: \"INTERNET-ACCESS\",\n byol: false,\n packageCode: \"SEC\",\n notifications: [\n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\",\n ],\n hostname: \"csr1000v-p\",\n termLength: 12,\n accountNumber: dc.apply(dc =\u003e dc.number),\n version: \"16.09.05\",\n coreCount: 2,\n secondaryDevice: {\n name: \"tf-csr1000v-s\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n hostname: \"csr1000v-s\",\n notifications: [\n \"john@equinix.com\",\n \"marry@equinix.com\",\n ],\n accountNumber: sv.apply(sv =\u003e sv.number),\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ndc = equinix.networkedge.get_account_output(metro_code=\"DC\")\nsv = equinix.networkedge.get_account_output(metro_code=\"SV\")\ncsr1000_v_ha = equinix.networkedge.Device(\"csr1000vHa\",\n name=\"tf-csr1000v-p\",\n throughput=500,\n throughput_unit=equinix.networkedge.ThroughputUnit.MBPS,\n metro_code=dc.metro_code,\n type_code=\"CSR1000V\",\n self_managed=False,\n connectivity=\"INTERNET-ACCESS\",\n byol=False,\n package_code=\"SEC\",\n notifications=[\n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\",\n ],\n hostname=\"csr1000v-p\",\n term_length=12,\n account_number=dc.number,\n version=\"16.09.05\",\n core_count=2,\n secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(\n name=\"tf-csr1000v-s\",\n metro_code=sv.metro_code,\n hostname=\"csr1000v-s\",\n notifications=[\n \"john@equinix.com\",\n \"marry@equinix.com\",\n ],\n account_number=sv.number,\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdc, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tMetroCode: \"DC\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"csr1000vHa\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-csr1000v-p\"),\n\t\t\tThroughput: pulumi.Int(500),\n\t\t\tThroughputUnit: pulumi.String(networkedge.ThroughputUnitMbps),\n\t\t\tMetroCode: pulumi.String(dc.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"CSR1000V\"),\n\t\t\tSelfManaged: pulumi.Bool(false),\n\t\t\tConnectivity: pulumi.String(\"INTERNET-ACCESS\"),\n\t\t\tByol: pulumi.Bool(false),\n\t\t\tPackageCode: pulumi.String(\"SEC\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"john@equinix.com\"),\n\t\t\t\tpulumi.String(\"marry@equinix.com\"),\n\t\t\t\tpulumi.String(\"fred@equinix.com\"),\n\t\t\t},\n\t\t\tHostname: pulumi.String(\"csr1000v-p\"),\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tAccountNumber: pulumi.String(dc.Number),\n\t\t\tVersion: pulumi.String(\"16.09.05\"),\n\t\t\tCoreCount: pulumi.Int(2),\n\t\t\tSecondaryDevice: \u0026networkedge.DeviceSecondaryDeviceArgs{\n\t\t\t\tName: pulumi.String(\"tf-csr1000v-s\"),\n\t\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\t\tHostname: pulumi.String(\"csr1000v-s\"),\n\t\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"john@equinix.com\"),\n\t\t\t\t\tpulumi.String(\"marry@equinix.com\"),\n\t\t\t\t},\n\t\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dc = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n MetroCode = \"DC\",\n });\n\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n MetroCode = \"SV\",\n });\n\n var csr1000VHa = new Equinix.NetworkEdge.Device(\"csr1000vHa\", new()\n {\n Name = \"tf-csr1000v-p\",\n Throughput = 500,\n ThroughputUnit = Equinix.NetworkEdge.ThroughputUnit.Mbps,\n MetroCode = dc.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"CSR1000V\",\n SelfManaged = false,\n Connectivity = \"INTERNET-ACCESS\",\n Byol = false,\n PackageCode = \"SEC\",\n Notifications = new[]\n {\n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\",\n },\n Hostname = \"csr1000v-p\",\n TermLength = 12,\n AccountNumber = dc.Apply(getAccountResult =\u003e getAccountResult.Number),\n Version = \"16.09.05\",\n CoreCount = 2,\n SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs\n {\n Name = \"tf-csr1000v-s\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n Hostname = \"csr1000v-s\",\n Notifications = new[]\n {\n \"john@equinix.com\",\n \"marry@equinix.com\",\n },\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var dc = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .metroCode(\"DC\")\n .build());\n\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .metroCode(\"SV\")\n .build());\n\n var csr1000VHa = new Device(\"csr1000VHa\", DeviceArgs.builder()\n .name(\"tf-csr1000v-p\")\n .throughput(500)\n .throughputUnit(\"Mbps\")\n .metroCode(dc.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"CSR1000V\")\n .selfManaged(false)\n .connectivity(\"INTERNET-ACCESS\")\n .byol(false)\n .packageCode(\"SEC\")\n .notifications( \n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\")\n .hostname(\"csr1000v-p\")\n .termLength(12)\n .accountNumber(dc.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .version(\"16.09.05\")\n .coreCount(2)\n .secondaryDevice(DeviceSecondaryDeviceArgs.builder()\n .name(\"tf-csr1000v-s\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .hostname(\"csr1000v-s\")\n .notifications( \n \"john@equinix.com\",\n \"marry@equinix.com\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .build())\n .build());\n\n }\n}\n```\n```yaml\n csr1000vHa:\n type: equinix:networkedge:Device\n name: csr1000v_ha\n properties:\n name: tf-csr1000v-p\n throughput: 500\n throughputUnit: Mbps\n metroCode: ${dc.metroCode}\n typeCode: CSR1000V\n selfManaged: false\n connectivity: INTERNET-ACCESS\n byol: false\n packageCode: SEC\n notifications:\n - john@equinix.com\n - marry@equinix.com\n - fred@equinix.com\n hostname: csr1000v-p\n termLength: 12\n accountNumber: ${dc.number}\n version: 16.09.05\n coreCount: 2\n secondaryDevice:\n name: tf-csr1000v-s\n metroCode: ${sv.metroCode}\n hostname: csr1000v-s\n notifications:\n - john@equinix.com\n - marry@equinix.com\n accountNumber: ${sv.number}\nvariables:\n # Create pair of redundant, managed CSR1000V routers with license subscription\n # in two different metro locations\n dc:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n metroCode: DC\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 4\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\n\nconst sv = equinix.networkedge.getAccountOutput({\n name: \"account-name\",\n metroCode: \"SV\",\n});\nconst c8KvSingle = new equinix.networkedge.Device(\"c8kvSingle\", {\n name: \"tf-c8kv\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n typeCode: \"C8000V\",\n selfManaged: true,\n byol: true,\n packageCode: \"network-essentials\",\n notifications: [\"test@equinix.com\"],\n hostname: \"C8KV\",\n accountNumber: sv.apply(sv =\u003e sv.number),\n version: \"17.06.01a\",\n coreCount: 2,\n termLength: 12,\n licenseToken: \"valid-license-token\",\n additionalBandwidth: 5,\n sshKey: {\n username: \"test-username\",\n keyName: \"valid-key-name\",\n },\n aclTemplateId: \"3e548c02-9164-4197-aa23-05b1f644883c\",\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nsv = equinix.networkedge.get_account_output(name=\"account-name\",\n metro_code=\"SV\")\nc8_kv_single = equinix.networkedge.Device(\"c8kvSingle\",\n name=\"tf-c8kv\",\n metro_code=sv.metro_code,\n type_code=\"C8000V\",\n self_managed=True,\n byol=True,\n package_code=\"network-essentials\",\n notifications=[\"test@equinix.com\"],\n hostname=\"C8KV\",\n account_number=sv.number,\n version=\"17.06.01a\",\n core_count=2,\n term_length=12,\n license_token=\"valid-license-token\",\n additional_bandwidth=5,\n ssh_key=equinix.networkedge.DeviceSshKeyArgs(\n username=\"test-username\",\n key_name=\"valid-key-name\",\n ),\n acl_template_id=\"3e548c02-9164-4197-aa23-05b1f644883c\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tName: pulumi.StringRef(\"account-name\"),\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"c8kvSingle\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-c8kv\"),\n\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"C8000V\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(\"network-essentials\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"test@equinix.com\"),\n\t\t\t},\n\t\t\tHostname: pulumi.String(\"C8KV\"),\n\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\tVersion: pulumi.String(\"17.06.01a\"),\n\t\t\tCoreCount: pulumi.Int(2),\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tLicenseToken: pulumi.String(\"valid-license-token\"),\n\t\t\tAdditionalBandwidth: pulumi.Int(5),\n\t\t\tSshKey: \u0026networkedge.DeviceSshKeyArgs{\n\t\t\t\tUsername: pulumi.String(\"test-username\"),\n\t\t\t\tKeyName: pulumi.String(\"valid-key-name\"),\n\t\t\t},\n\t\t\tAclTemplateId: pulumi.String(\"3e548c02-9164-4197-aa23-05b1f644883c\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n Name = \"account-name\",\n MetroCode = \"SV\",\n });\n\n var c8KvSingle = new Equinix.NetworkEdge.Device(\"c8kvSingle\", new()\n {\n Name = \"tf-c8kv\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"C8000V\",\n SelfManaged = true,\n Byol = true,\n PackageCode = \"network-essentials\",\n Notifications = new[]\n {\n \"test@equinix.com\",\n },\n Hostname = \"C8KV\",\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n Version = \"17.06.01a\",\n CoreCount = 2,\n TermLength = 12,\n LicenseToken = \"valid-license-token\",\n AdditionalBandwidth = 5,\n SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs\n {\n Username = \"test-username\",\n KeyName = \"valid-key-name\",\n },\n AclTemplateId = \"3e548c02-9164-4197-aa23-05b1f644883c\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .name(\"account-name\")\n .metroCode(\"SV\")\n .build());\n\n var c8KvSingle = new Device(\"c8KvSingle\", DeviceArgs.builder()\n .name(\"tf-c8kv\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"C8000V\")\n .selfManaged(true)\n .byol(true)\n .packageCode(\"network-essentials\")\n .notifications(\"test@equinix.com\")\n .hostname(\"C8KV\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .version(\"17.06.01a\")\n .coreCount(2)\n .termLength(12)\n .licenseToken(\"valid-license-token\")\n .additionalBandwidth(5)\n .sshKey(DeviceSshKeyArgs.builder()\n .username(\"test-username\")\n .keyName(\"valid-key-name\")\n .build())\n .aclTemplateId(\"3e548c02-9164-4197-aa23-05b1f644883c\")\n .build());\n\n }\n}\n```\n```yaml\n c8kvSingle:\n type: equinix:networkedge:Device\n name: c8kv_single\n properties:\n name: tf-c8kv\n metroCode: ${sv.metroCode}\n typeCode: C8000V\n selfManaged: true\n byol: true\n packageCode: network-essentials\n notifications:\n - test@equinix.com\n hostname: C8KV\n accountNumber: ${sv.number}\n version: 17.06.01a\n coreCount: 2\n termLength: 12\n licenseToken: valid-license-token\n additionalBandwidth: 5\n sshKey:\n username: test-username\n keyName: valid-key-name\n aclTemplateId: 3e548c02-9164-4197-aa23-05b1f644883c\nvariables:\n # Create self configured single Catalyst 8000V (Autonomous Mode) router with license token\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n name: account-name\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 7\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\n\nconst sv = equinix.networkedge.getAccountOutput({\n name: \"account-name\",\n metroCode: \"SV\",\n});\nconst testPublicKey = new equinix.networkedge.SshKey(\"testPublicKey\", {\n name: \"key-name\",\n publicKey: \"ssh-dss key-value\",\n type: \"DSA\",\n});\nconst bluecatBddsHa = new equinix.networkedge.Device(\"bluecatBddsHa\", {\n name: \"tf-bluecat-bdds-p\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n typeCode: \"BLUECAT\",\n selfManaged: true,\n connectivity: \"PRIVATE\",\n byol: true,\n packageCode: \"STD\",\n notifications: [\"test@equinix.com\"],\n accountNumber: sv.apply(sv =\u003e sv.number),\n version: \"9.6.0\",\n coreCount: 2,\n termLength: 12,\n vendorConfiguration: {\n hostname: \"test\",\n privateAddress: \"x.x.x.x\",\n privateCidrMask: \"24\",\n privateGateway: \"x.x.x.x\",\n licenseKey: \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\",\n licenseId: \"xxxxxxxxxxxxxxx\",\n },\n sshKey: {\n username: \"test-username\",\n keyName: testPublicKey.name,\n },\n secondaryDevice: {\n name: \"tf-bluecat-bdds-s\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n notifications: [\"test@eq.com\"],\n accountNumber: sv.apply(sv =\u003e sv.number),\n vendorConfiguration: {\n hostname: \"test\",\n privateAddress: \"x.x.x.x\",\n privateCidrMask: \"24\",\n privateGateway: \"x.x.x.x\",\n licenseKey: \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\",\n licenseId: \"xxxxxxxxxxxxxxx\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nsv = equinix.networkedge.get_account_output(name=\"account-name\",\n metro_code=\"SV\")\ntest_public_key = equinix.networkedge.SshKey(\"testPublicKey\",\n name=\"key-name\",\n public_key=\"ssh-dss key-value\",\n type=\"DSA\")\nbluecat_bdds_ha = equinix.networkedge.Device(\"bluecatBddsHa\",\n name=\"tf-bluecat-bdds-p\",\n metro_code=sv.metro_code,\n type_code=\"BLUECAT\",\n self_managed=True,\n connectivity=\"PRIVATE\",\n byol=True,\n package_code=\"STD\",\n notifications=[\"test@equinix.com\"],\n account_number=sv.number,\n version=\"9.6.0\",\n core_count=2,\n term_length=12,\n vendor_configuration={\n \"hostname\": \"test\",\n \"privateAddress\": \"x.x.x.x\",\n \"privateCidrMask\": \"24\",\n \"privateGateway\": \"x.x.x.x\",\n \"licenseKey\": \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\",\n \"licenseId\": \"xxxxxxxxxxxxxxx\",\n },\n ssh_key=equinix.networkedge.DeviceSshKeyArgs(\n username=\"test-username\",\n key_name=test_public_key.name,\n ),\n secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(\n name=\"tf-bluecat-bdds-s\",\n metro_code=sv.metro_code,\n notifications=[\"test@eq.com\"],\n account_number=sv.number,\n vendor_configuration={\n \"hostname\": \"test\",\n \"privateAddress\": \"x.x.x.x\",\n \"privateCidrMask\": \"24\",\n \"privateGateway\": \"x.x.x.x\",\n \"licenseKey\": \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\",\n \"licenseId\": \"xxxxxxxxxxxxxxx\",\n },\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tName: pulumi.StringRef(\"account-name\"),\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestPublicKey, err := networkedge.NewSshKey(ctx, \"testPublicKey\", \u0026networkedge.SshKeyArgs{\n\t\t\tName: pulumi.String(\"key-name\"),\n\t\t\tPublicKey: pulumi.String(\"ssh-dss key-value\"),\n\t\t\tType: pulumi.String(\"DSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"bluecatBddsHa\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-bluecat-bdds-p\"),\n\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"BLUECAT\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tConnectivity: pulumi.String(\"PRIVATE\"),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(\"STD\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"test@equinix.com\"),\n\t\t\t},\n\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\tVersion: pulumi.String(\"9.6.0\"),\n\t\t\tCoreCount: pulumi.Int(2),\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tVendorConfiguration: pulumi.StringMap{\n\t\t\t\t\"hostname\": pulumi.String(\"test\"),\n\t\t\t\t\"privateAddress\": pulumi.String(\"x.x.x.x\"),\n\t\t\t\t\"privateCidrMask\": pulumi.String(\"24\"),\n\t\t\t\t\"privateGateway\": pulumi.String(\"x.x.x.x\"),\n\t\t\t\t\"licenseKey\": pulumi.String(\"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\"),\n\t\t\t\t\"licenseId\": pulumi.String(\"xxxxxxxxxxxxxxx\"),\n\t\t\t},\n\t\t\tSshKey: \u0026networkedge.DeviceSshKeyArgs{\n\t\t\t\tUsername: pulumi.String(\"test-username\"),\n\t\t\t\tKeyName: testPublicKey.Name,\n\t\t\t},\n\t\t\tSecondaryDevice: \u0026networkedge.DeviceSecondaryDeviceArgs{\n\t\t\t\tName: pulumi.String(\"tf-bluecat-bdds-s\"),\n\t\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"test@eq.com\"),\n\t\t\t\t},\n\t\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\t\tVendorConfiguration: pulumi.StringMap{\n\t\t\t\t\t\"hostname\": pulumi.String(\"test\"),\n\t\t\t\t\t\"privateAddress\": pulumi.String(\"x.x.x.x\"),\n\t\t\t\t\t\"privateCidrMask\": pulumi.String(\"24\"),\n\t\t\t\t\t\"privateGateway\": pulumi.String(\"x.x.x.x\"),\n\t\t\t\t\t\"licenseKey\": pulumi.String(\"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\"),\n\t\t\t\t\t\"licenseId\": pulumi.String(\"xxxxxxxxxxxxxxx\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n Name = \"account-name\",\n MetroCode = \"SV\",\n });\n\n var testPublicKey = new Equinix.NetworkEdge.SshKey(\"testPublicKey\", new()\n {\n Name = \"key-name\",\n PublicKey = \"ssh-dss key-value\",\n Type = \"DSA\",\n });\n\n var bluecatBddsHa = new Equinix.NetworkEdge.Device(\"bluecatBddsHa\", new()\n {\n Name = \"tf-bluecat-bdds-p\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"BLUECAT\",\n SelfManaged = true,\n Connectivity = \"PRIVATE\",\n Byol = true,\n PackageCode = \"STD\",\n Notifications = new[]\n {\n \"test@equinix.com\",\n },\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n Version = \"9.6.0\",\n CoreCount = 2,\n TermLength = 12,\n VendorConfiguration = \n {\n { \"hostname\", \"test\" },\n { \"privateAddress\", \"x.x.x.x\" },\n { \"privateCidrMask\", \"24\" },\n { \"privateGateway\", \"x.x.x.x\" },\n { \"licenseKey\", \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\" },\n { \"licenseId\", \"xxxxxxxxxxxxxxx\" },\n },\n SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs\n {\n Username = \"test-username\",\n KeyName = testPublicKey.Name,\n },\n SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs\n {\n Name = \"tf-bluecat-bdds-s\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n Notifications = new[]\n {\n \"test@eq.com\",\n },\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n VendorConfiguration = \n {\n { \"hostname\", \"test\" },\n { \"privateAddress\", \"x.x.x.x\" },\n { \"privateCidrMask\", \"24\" },\n { \"privateGateway\", \"x.x.x.x\" },\n { \"licenseKey\", \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\" },\n { \"licenseId\", \"xxxxxxxxxxxxxxx\" },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.SshKey;\nimport com.pulumi.equinix.networkedge.SshKeyArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .name(\"account-name\")\n .metroCode(\"SV\")\n .build());\n\n var testPublicKey = new SshKey(\"testPublicKey\", SshKeyArgs.builder()\n .name(\"key-name\")\n .publicKey(\"ssh-dss key-value\")\n .type(\"DSA\")\n .build());\n\n var bluecatBddsHa = new Device(\"bluecatBddsHa\", DeviceArgs.builder()\n .name(\"tf-bluecat-bdds-p\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"BLUECAT\")\n .selfManaged(true)\n .connectivity(\"PRIVATE\")\n .byol(true)\n .packageCode(\"STD\")\n .notifications(\"test@equinix.com\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .version(\"9.6.0\")\n .coreCount(2)\n .termLength(12)\n .vendorConfiguration(Map.ofEntries(\n Map.entry(\"hostname\", \"test\"),\n Map.entry(\"privateAddress\", \"x.x.x.x\"),\n Map.entry(\"privateCidrMask\", \"24\"),\n Map.entry(\"privateGateway\", \"x.x.x.x\"),\n Map.entry(\"licenseKey\", \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\"),\n Map.entry(\"licenseId\", \"xxxxxxxxxxxxxxx\")\n ))\n .sshKey(DeviceSshKeyArgs.builder()\n .username(\"test-username\")\n .keyName(testPublicKey.name())\n .build())\n .secondaryDevice(DeviceSecondaryDeviceArgs.builder()\n .name(\"tf-bluecat-bdds-s\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .notifications(\"test@eq.com\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .vendorConfiguration(Map.ofEntries(\n Map.entry(\"hostname\", \"test\"),\n Map.entry(\"privateAddress\", \"x.x.x.x\"),\n Map.entry(\"privateCidrMask\", \"24\"),\n Map.entry(\"privateGateway\", \"x.x.x.x\"),\n Map.entry(\"licenseKey\", \"xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\"),\n Map.entry(\"licenseId\", \"xxxxxxxxxxxxxxx\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\n testPublicKey:\n type: equinix:networkedge:SshKey\n name: test_public_key\n properties:\n name: key-name\n publicKey: ssh-dss key-value\n type: DSA\n bluecatBddsHa:\n type: equinix:networkedge:Device\n name: bluecat_bdds_ha\n properties:\n name: tf-bluecat-bdds-p\n metroCode: ${sv.metroCode}\n typeCode: BLUECAT\n selfManaged: true\n connectivity: PRIVATE\n byol: true\n packageCode: STD\n notifications:\n - test@equinix.com\n accountNumber: ${sv.number}\n version: 9.6.0\n coreCount: 2\n termLength: 12\n vendorConfiguration:\n hostname: test\n privateAddress: x.x.x.x\n privateCidrMask: '24'\n privateGateway: x.x.x.x\n licenseKey: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\n licenseId: xxxxxxxxxxxxxxx\n sshKey:\n username: test-username\n keyName: ${testPublicKey.name}\n secondaryDevice:\n name: tf-bluecat-bdds-s\n metroCode: ${sv.metroCode}\n notifications:\n - test@eq.com\n accountNumber: ${sv.number}\n vendorConfiguration:\n hostname: test\n privateAddress: x.x.x.x\n privateCidrMask: '24'\n privateGateway: x.x.x.x\n licenseKey: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\n licenseId: xxxxxxxxxxxxxxx\nvariables:\n # Create self configured redundant BlueCat DNS and DHCP Server\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n name: account-name\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 2\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\n\nconst sv = equinix.networkedge.getAccountOutput({\n metroCode: \"SV\",\n});\nconst panwCluster = new equinix.networkedge.Device(\"panwCluster\", {\n name: \"tf-panw\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n typeCode: \"PA-VM\",\n selfManaged: true,\n byol: true,\n packageCode: \"VM100\",\n notifications: [\n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\",\n ],\n termLength: 12,\n accountNumber: sv.apply(sv =\u003e sv.number),\n version: \"10.1.3\",\n interfaceCount: 10,\n coreCount: 2,\n sshKey: {\n username: \"test\",\n keyName: \"test-key\",\n },\n aclTemplateId: \"0bff6e05-f0e7-44cd-804a-25b92b835f8b\",\n clusterDetails: {\n clusterName: \"tf-panw-cluster\",\n node0: {\n vendorConfiguration: {\n hostname: \"panw-node0\",\n },\n licenseToken: \"licenseToken\",\n },\n node1: {\n vendorConfiguration: {\n hostname: \"panw-node1\",\n },\n licenseToken: \"licenseToken\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nsv = equinix.networkedge.get_account_output(metro_code=\"SV\")\npanw_cluster = equinix.networkedge.Device(\"panwCluster\",\n name=\"tf-panw\",\n metro_code=sv.metro_code,\n type_code=\"PA-VM\",\n self_managed=True,\n byol=True,\n package_code=\"VM100\",\n notifications=[\n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\",\n ],\n term_length=12,\n account_number=sv.number,\n version=\"10.1.3\",\n interface_count=10,\n core_count=2,\n ssh_key=equinix.networkedge.DeviceSshKeyArgs(\n username=\"test\",\n key_name=\"test-key\",\n ),\n acl_template_id=\"0bff6e05-f0e7-44cd-804a-25b92b835f8b\",\n cluster_details=equinix.networkedge.DeviceClusterDetailsArgs(\n cluster_name=\"tf-panw-cluster\",\n node0=equinix.networkedge.DeviceClusterDetailsNode0Args(\n vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs(\n hostname=\"panw-node0\",\n ),\n license_token=\"licenseToken\",\n ),\n node1=equinix.networkedge.DeviceClusterDetailsNode1Args(\n vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs(\n hostname=\"panw-node1\",\n ),\n license_token=\"licenseToken\",\n ),\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"panwCluster\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-panw\"),\n\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"PA-VM\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(\"VM100\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"john@equinix.com\"),\n\t\t\t\tpulumi.String(\"marry@equinix.com\"),\n\t\t\t\tpulumi.String(\"fred@equinix.com\"),\n\t\t\t},\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\tVersion: pulumi.String(\"10.1.3\"),\n\t\t\tInterfaceCount: pulumi.Int(10),\n\t\t\tCoreCount: pulumi.Int(2),\n\t\t\tSshKey: \u0026networkedge.DeviceSshKeyArgs{\n\t\t\t\tUsername: pulumi.String(\"test\"),\n\t\t\t\tKeyName: pulumi.String(\"test-key\"),\n\t\t\t},\n\t\t\tAclTemplateId: pulumi.String(\"0bff6e05-f0e7-44cd-804a-25b92b835f8b\"),\n\t\t\tClusterDetails: \u0026networkedge.DeviceClusterDetailsArgs{\n\t\t\t\tClusterName: pulumi.String(\"tf-panw-cluster\"),\n\t\t\t\tNode0: \u0026networkedge.DeviceClusterDetailsNode0Args{\n\t\t\t\t\tVendorConfiguration: \u0026networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs{\n\t\t\t\t\t\tHostname: pulumi.String(\"panw-node0\"),\n\t\t\t\t\t},\n\t\t\t\t\tLicenseToken: pulumi.String(\"licenseToken\"),\n\t\t\t\t},\n\t\t\t\tNode1: \u0026networkedge.DeviceClusterDetailsNode1Args{\n\t\t\t\t\tVendorConfiguration: \u0026networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs{\n\t\t\t\t\t\tHostname: pulumi.String(\"panw-node1\"),\n\t\t\t\t\t},\n\t\t\t\t\tLicenseToken: pulumi.String(\"licenseToken\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n MetroCode = \"SV\",\n });\n\n var panwCluster = new Equinix.NetworkEdge.Device(\"panwCluster\", new()\n {\n Name = \"tf-panw\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"PA-VM\",\n SelfManaged = true,\n Byol = true,\n PackageCode = \"VM100\",\n Notifications = new[]\n {\n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\",\n },\n TermLength = 12,\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n Version = \"10.1.3\",\n InterfaceCount = 10,\n CoreCount = 2,\n SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs\n {\n Username = \"test\",\n KeyName = \"test-key\",\n },\n AclTemplateId = \"0bff6e05-f0e7-44cd-804a-25b92b835f8b\",\n ClusterDetails = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsArgs\n {\n ClusterName = \"tf-panw-cluster\",\n Node0 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0Args\n {\n VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0VendorConfigurationArgs\n {\n Hostname = \"panw-node0\",\n },\n LicenseToken = \"licenseToken\",\n },\n Node1 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1Args\n {\n VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1VendorConfigurationArgs\n {\n Hostname = \"panw-node1\",\n },\n LicenseToken = \"licenseToken\",\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0Args;\nimport com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0VendorConfigurationArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1Args;\nimport com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1VendorConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .metroCode(\"SV\")\n .build());\n\n var panwCluster = new Device(\"panwCluster\", DeviceArgs.builder()\n .name(\"tf-panw\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"PA-VM\")\n .selfManaged(true)\n .byol(true)\n .packageCode(\"VM100\")\n .notifications( \n \"john@equinix.com\",\n \"marry@equinix.com\",\n \"fred@equinix.com\")\n .termLength(12)\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .version(\"10.1.3\")\n .interfaceCount(10)\n .coreCount(2)\n .sshKey(DeviceSshKeyArgs.builder()\n .username(\"test\")\n .keyName(\"test-key\")\n .build())\n .aclTemplateId(\"0bff6e05-f0e7-44cd-804a-25b92b835f8b\")\n .clusterDetails(DeviceClusterDetailsArgs.builder()\n .clusterName(\"tf-panw-cluster\")\n .node0(DeviceClusterDetailsNode0Args.builder()\n .vendorConfiguration(DeviceClusterDetailsNode0VendorConfigurationArgs.builder()\n .hostname(\"panw-node0\")\n .build())\n .licenseToken(\"licenseToken\")\n .build())\n .node1(DeviceClusterDetailsNode1Args.builder()\n .vendorConfiguration(DeviceClusterDetailsNode1VendorConfigurationArgs.builder()\n .hostname(\"panw-node1\")\n .build())\n .licenseToken(\"licenseToken\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\n panwCluster:\n type: equinix:networkedge:Device\n name: panw_cluster\n properties:\n name: tf-panw\n metroCode: ${sv.metroCode}\n typeCode: PA-VM\n selfManaged: true\n byol: true\n packageCode: VM100\n notifications:\n - john@equinix.com\n - marry@equinix.com\n - fred@equinix.com\n termLength: 12\n accountNumber: ${sv.number}\n version: 10.1.3\n interfaceCount: 10\n coreCount: 2\n sshKey:\n username: test\n keyName: test-key\n aclTemplateId: 0bff6e05-f0e7-44cd-804a-25b92b835f8b\n clusterDetails:\n clusterName: tf-panw-cluster\n node0:\n vendorConfiguration:\n hostname: panw-node0\n licenseToken: licenseToken\n node1:\n vendorConfiguration:\n hostname: panw-node1\n licenseToken: licenseToken\nvariables:\n # Create self configured PANW cluster with BYOL license\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 5\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\n\nconst sv = equinix.networkedge.getAccountOutput({\n name: \"account-name\",\n metroCode: \"SV\",\n});\nconst vsrxSingle = new equinix.networkedge.Device(\"vsrxSingle\", {\n name: \"tf-c8kv-sdwan\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n typeCode: \"VSRX\",\n selfManaged: true,\n byol: true,\n packageCode: \"STD\",\n notifications: [\"test@equinix.com\"],\n hostname: \"VSRX\",\n accountNumber: sv.apply(sv =\u003e sv.number),\n version: \"23.2R1.13\",\n coreCount: 2,\n termLength: 12,\n additionalBandwidth: 5,\n projectId: \"a86d7112-d740-4758-9c9c-31e66373746b\",\n diverseDeviceId: \"ed7891bd-15b4-4f72-ac56-d96cfdacddcc\",\n sshKey: {\n username: \"test-username\",\n keyName: \"valid-key-name\",\n },\n aclTemplateId: \"3e548c02-9164-4197-aa23-05b1f644883c\",\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nsv = equinix.networkedge.get_account_output(name=\"account-name\",\n metro_code=\"SV\")\nvsrx_single = equinix.networkedge.Device(\"vsrxSingle\",\n name=\"tf-c8kv-sdwan\",\n metro_code=sv.metro_code,\n type_code=\"VSRX\",\n self_managed=True,\n byol=True,\n package_code=\"STD\",\n notifications=[\"test@equinix.com\"],\n hostname=\"VSRX\",\n account_number=sv.number,\n version=\"23.2R1.13\",\n core_count=2,\n term_length=12,\n additional_bandwidth=5,\n project_id=\"a86d7112-d740-4758-9c9c-31e66373746b\",\n diverse_device_id=\"ed7891bd-15b4-4f72-ac56-d96cfdacddcc\",\n ssh_key=equinix.networkedge.DeviceSshKeyArgs(\n username=\"test-username\",\n key_name=\"valid-key-name\",\n ),\n acl_template_id=\"3e548c02-9164-4197-aa23-05b1f644883c\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tName: pulumi.StringRef(\"account-name\"),\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"vsrxSingle\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-c8kv-sdwan\"),\n\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"VSRX\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(\"STD\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"test@equinix.com\"),\n\t\t\t},\n\t\t\tHostname: pulumi.String(\"VSRX\"),\n\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\tVersion: pulumi.String(\"23.2R1.13\"),\n\t\t\tCoreCount: pulumi.Int(2),\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tAdditionalBandwidth: pulumi.Int(5),\n\t\t\tProjectId: pulumi.String(\"a86d7112-d740-4758-9c9c-31e66373746b\"),\n\t\t\tDiverseDeviceId: pulumi.String(\"ed7891bd-15b4-4f72-ac56-d96cfdacddcc\"),\n\t\t\tSshKey: \u0026networkedge.DeviceSshKeyArgs{\n\t\t\t\tUsername: pulumi.String(\"test-username\"),\n\t\t\t\tKeyName: pulumi.String(\"valid-key-name\"),\n\t\t\t},\n\t\t\tAclTemplateId: pulumi.String(\"3e548c02-9164-4197-aa23-05b1f644883c\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n Name = \"account-name\",\n MetroCode = \"SV\",\n });\n\n var vsrxSingle = new Equinix.NetworkEdge.Device(\"vsrxSingle\", new()\n {\n Name = \"tf-c8kv-sdwan\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"VSRX\",\n SelfManaged = true,\n Byol = true,\n PackageCode = \"STD\",\n Notifications = new[]\n {\n \"test@equinix.com\",\n },\n Hostname = \"VSRX\",\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n Version = \"23.2R1.13\",\n CoreCount = 2,\n TermLength = 12,\n AdditionalBandwidth = 5,\n ProjectId = \"a86d7112-d740-4758-9c9c-31e66373746b\",\n DiverseDeviceId = \"ed7891bd-15b4-4f72-ac56-d96cfdacddcc\",\n SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs\n {\n Username = \"test-username\",\n KeyName = \"valid-key-name\",\n },\n AclTemplateId = \"3e548c02-9164-4197-aa23-05b1f644883c\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .name(\"account-name\")\n .metroCode(\"SV\")\n .build());\n\n var vsrxSingle = new Device(\"vsrxSingle\", DeviceArgs.builder()\n .name(\"tf-c8kv-sdwan\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"VSRX\")\n .selfManaged(true)\n .byol(true)\n .packageCode(\"STD\")\n .notifications(\"test@equinix.com\")\n .hostname(\"VSRX\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .version(\"23.2R1.13\")\n .coreCount(2)\n .termLength(12)\n .additionalBandwidth(5)\n .projectId(\"a86d7112-d740-4758-9c9c-31e66373746b\")\n .diverseDeviceId(\"ed7891bd-15b4-4f72-ac56-d96cfdacddcc\")\n .sshKey(DeviceSshKeyArgs.builder()\n .username(\"test-username\")\n .keyName(\"valid-key-name\")\n .build())\n .aclTemplateId(\"3e548c02-9164-4197-aa23-05b1f644883c\")\n .build());\n\n }\n}\n```\n```yaml\n vsrxSingle:\n type: equinix:networkedge:Device\n name: vsrx_single\n properties:\n name: tf-c8kv-sdwan\n metroCode: ${sv.metroCode}\n typeCode: VSRX\n selfManaged: true\n byol: true\n packageCode: STD\n notifications:\n - test@equinix.com\n hostname: VSRX\n accountNumber: ${sv.number}\n version: 23.2R1.13\n coreCount: 2\n termLength: 12\n additionalBandwidth: 5\n projectId: a86d7112-d740-4758-9c9c-31e66373746b\n diverseDeviceId: ed7891bd-15b4-4f72-ac56-d96cfdacddcc\n sshKey:\n username: test-username\n keyName: valid-key-name\n aclTemplateId: 3e548c02-9164-4197-aa23-05b1f644883c\nvariables:\n # Create self configured single VSRX device with BYOL License\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n name: account-name\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 3\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\nimport * as std from \"@pulumi/std\";\n\nconst config = new pulumi.Config();\nconst filepath = config.get(\"filepath\") || \"cloudInitFileFolder/TF-AVX-cloud-init-file.txt\";\nconst sv = equinix.networkedge.getAccountOutput({\n metroCode: \"SV\",\n});\nconst aviatrixCloudinitFile = new equinix.networkedge.NetworkFile(\"aviatrixCloudinitFile\", {\n fileName: \"TF-AVX-cloud-init-file.txt\",\n content: std.fileOutput({\n input: filepath,\n }).apply(invoke =\u003e invoke.result),\n metroCode: sv.apply(sv =\u003e sv.metroCode).apply((x) =\u003e equinix.index.Metro[x]),\n deviceTypeCode: \"AVIATRIX_EDGE\",\n processType: equinix.networkedge.FileType.CloudInit,\n selfManaged: true,\n byol: true,\n});\nconst aviatrixSingle = new equinix.networkedge.Device(\"aviatrixSingle\", {\n name: \"tf-aviatrix\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n typeCode: \"AVIATRIX_EDGE\",\n selfManaged: true,\n byol: true,\n packageCode: \"STD\",\n notifications: [\"john@equinix.com\"],\n termLength: 12,\n accountNumber: sv.apply(sv =\u003e sv.number),\n version: \"6.9\",\n coreCount: 2,\n cloudInitFileId: aviatrixCloudinitFile.uuid,\n aclTemplateId: \"c06150ea-b604-4ad1-832a-d63936e9b938\",\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\nimport pulumi_std as std\n\nconfig = pulumi.Config()\nfilepath = config.get(\"filepath\")\nif filepath is None:\n filepath = \"cloudInitFileFolder/TF-AVX-cloud-init-file.txt\"\nsv = equinix.networkedge.get_account_output(metro_code=\"SV\")\naviatrix_cloudinit_file = equinix.networkedge.NetworkFile(\"aviatrixCloudinitFile\",\n file_name=\"TF-AVX-cloud-init-file.txt\",\n content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),\n metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),\n device_type_code=\"AVIATRIX_EDGE\",\n process_type=equinix.networkedge.FileType.CLOUD_INIT,\n self_managed=True,\n byol=True)\naviatrix_single = equinix.networkedge.Device(\"aviatrixSingle\",\n name=\"tf-aviatrix\",\n metro_code=sv.metro_code,\n type_code=\"AVIATRIX_EDGE\",\n self_managed=True,\n byol=True,\n package_code=\"STD\",\n notifications=[\"john@equinix.com\"],\n term_length=12,\n account_number=sv.number,\n version=\"6.9\",\n core_count=2,\n cloud_init_file_id=aviatrix_cloudinit_file.uuid,\n acl_template_id=\"c06150ea-b604-4ad1-832a-d63936e9b938\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tfilepath := \"cloudInitFileFolder/TF-AVX-cloud-init-file.txt\"\n\t\tif param := cfg.Get(\"filepath\"); param != \"\" {\n\t\t\tfilepath = param\n\t\t}\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: filepath,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\taviatrixCloudinitFile, err := networkedge.NewNetworkFile(ctx, \"aviatrixCloudinitFile\", \u0026networkedge.NetworkFileArgs{\n\t\t\tFileName: pulumi.String(\"TF-AVX-cloud-init-file.txt\"),\n\t\t\tContent: invokeFile.Result,\n\t\t\tMetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput),\n\t\t\tDeviceTypeCode: pulumi.String(\"AVIATRIX_EDGE\"),\n\t\t\tProcessType: pulumi.String(networkedge.FileTypeCloudInit),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"aviatrixSingle\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-aviatrix\"),\n\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"AVIATRIX_EDGE\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(\"STD\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"john@equinix.com\"),\n\t\t\t},\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\tVersion: pulumi.String(\"6.9\"),\n\t\t\tCoreCount: pulumi.Int(2),\n\t\t\tCloudInitFileId: aviatrixCloudinitFile.Uuid,\n\t\t\tAclTemplateId: pulumi.String(\"c06150ea-b604-4ad1-832a-d63936e9b938\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var filepath = config.Get(\"filepath\") ?? \"cloudInitFileFolder/TF-AVX-cloud-init-file.txt\";\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n MetroCode = \"SV\",\n });\n\n var aviatrixCloudinitFile = new Equinix.NetworkEdge.NetworkFile(\"aviatrixCloudinitFile\", new()\n {\n FileName = \"TF-AVX-cloud-init-file.txt\",\n Content = Std.File.Invoke(new()\n {\n Input = filepath,\n }).Apply(invoke =\u003e invoke.Result),\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode).Apply(System.Enum.Parse\u003cEquinix.Metro\u003e),\n DeviceTypeCode = \"AVIATRIX_EDGE\",\n ProcessType = Equinix.NetworkEdge.FileType.CloudInit,\n SelfManaged = true,\n Byol = true,\n });\n\n var aviatrixSingle = new Equinix.NetworkEdge.Device(\"aviatrixSingle\", new()\n {\n Name = \"tf-aviatrix\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"AVIATRIX_EDGE\",\n SelfManaged = true,\n Byol = true,\n PackageCode = \"STD\",\n Notifications = new[]\n {\n \"john@equinix.com\",\n },\n TermLength = 12,\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n Version = \"6.9\",\n CoreCount = 2,\n CloudInitFileId = aviatrixCloudinitFile.Uuid,\n AclTemplateId = \"c06150ea-b604-4ad1-832a-d63936e9b938\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.NetworkFile;\nimport com.pulumi.equinix.networkedge.NetworkFileArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var filepath = config.get(\"filepath\").orElse(\"cloudInitFileFolder/TF-AVX-cloud-init-file.txt\");\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .metroCode(\"SV\")\n .build());\n\n var aviatrixCloudinitFile = new NetworkFile(\"aviatrixCloudinitFile\", NetworkFileArgs.builder()\n .fileName(\"TF-AVX-cloud-init-file.txt\")\n .content(StdFunctions.file(FileArgs.builder()\n .input(filepath)\n .build()).result())\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .deviceTypeCode(\"AVIATRIX_EDGE\")\n .processType(\"CLOUD_INIT\")\n .selfManaged(true)\n .byol(true)\n .build());\n\n var aviatrixSingle = new Device(\"aviatrixSingle\", DeviceArgs.builder()\n .name(\"tf-aviatrix\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"AVIATRIX_EDGE\")\n .selfManaged(true)\n .byol(true)\n .packageCode(\"STD\")\n .notifications(\"john@equinix.com\")\n .termLength(12)\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .version(\"6.9\")\n .coreCount(2)\n .cloudInitFileId(aviatrixCloudinitFile.uuid())\n .aclTemplateId(\"c06150ea-b604-4ad1-832a-d63936e9b938\")\n .build());\n\n }\n}\n```\n```yaml\n filepath:\n type: string\n default: cloudInitFileFolder/TF-AVX-cloud-init-file.txt\nresources:\n aviatrixCloudinitFile:\n type: equinix:networkedge:NetworkFile\n name: aviatrix_cloudinit_file\n properties:\n fileName: TF-AVX-cloud-init-file.txt\n content:\n fn::invoke:\n Function: std:file\n Arguments:\n input: ${filepath}\n Return: result\n metroCode: ${sv.metroCode}\n deviceTypeCode: AVIATRIX_EDGE\n processType: CLOUD_INIT\n selfManaged: true\n byol: true\n aviatrixSingle:\n type: equinix:networkedge:Device\n name: aviatrix_single\n properties:\n name: tf-aviatrix\n metroCode: ${sv.metroCode}\n typeCode: AVIATRIX_EDGE\n selfManaged: true\n byol: true\n packageCode: STD\n notifications:\n - john@equinix.com\n termLength: 12\n accountNumber: ${sv.number}\n version: '6.9'\n coreCount: 2\n cloudInitFileId: ${aviatrixCloudinitFile.uuid}\n aclTemplateId: c06150ea-b604-4ad1-832a-d63936e9b938\nvariables:\n # Create self configured single Aviatrix device with cloud init file\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n metroCode: SV\n```\n{{% /example %}}\n\n{{% example %}}\n### example 6\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as equinix from \"@pulumi/equinix\";\n\nconst sv = equinix.networkedge.getAccountOutput({\n name: \"account-name\",\n metroCode: \"SV\",\n});\nconst testPublicKey = new equinix.networkedge.SshKey(\"testPublicKey\", {\n name: \"key-name\",\n publicKey: \"ssh-dss key-value\",\n type: \"DSA\",\n});\nconst aristaHa = new equinix.networkedge.Device(\"aristaHa\", {\n name: \"tf-arista-p\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n typeCode: \"ARISTA-ROUTER\",\n selfManaged: true,\n connectivity: \"PRIVATE\",\n byol: true,\n packageCode: \"CloudEOS\",\n notifications: [\"test@equinix.com\"],\n hostname: \"arista-p\",\n accountNumber: sv.apply(sv =\u003e sv.number),\n version: \"4.29.0\",\n coreCount: 4,\n termLength: 12,\n additionalBandwidth: 5,\n sshKey: {\n username: \"test-username\",\n keyName: testPublicKey.name,\n },\n aclTemplateId: \"c637a17b-7a6a-4486-924b-30e6c36904b0\",\n secondaryDevice: {\n name: \"tf-arista-s\",\n metroCode: sv.apply(sv =\u003e sv.metroCode),\n hostname: \"arista-s\",\n notifications: [\"test@eq.com\"],\n accountNumber: sv.apply(sv =\u003e sv.number),\n aclTemplateId: \"fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nsv = equinix.networkedge.get_account_output(name=\"account-name\",\n metro_code=\"SV\")\ntest_public_key = equinix.networkedge.SshKey(\"testPublicKey\",\n name=\"key-name\",\n public_key=\"ssh-dss key-value\",\n type=\"DSA\")\narista_ha = equinix.networkedge.Device(\"aristaHa\",\n name=\"tf-arista-p\",\n metro_code=sv.metro_code,\n type_code=\"ARISTA-ROUTER\",\n self_managed=True,\n connectivity=\"PRIVATE\",\n byol=True,\n package_code=\"CloudEOS\",\n notifications=[\"test@equinix.com\"],\n hostname=\"arista-p\",\n account_number=sv.number,\n version=\"4.29.0\",\n core_count=4,\n term_length=12,\n additional_bandwidth=5,\n ssh_key=equinix.networkedge.DeviceSshKeyArgs(\n username=\"test-username\",\n key_name=test_public_key.name,\n ),\n acl_template_id=\"c637a17b-7a6a-4486-924b-30e6c36904b0\",\n secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(\n name=\"tf-arista-s\",\n metro_code=sv.metro_code,\n hostname=\"arista-s\",\n notifications=[\"test@eq.com\"],\n account_number=sv.number,\n acl_template_id=\"fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138\",\n ))\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsv, err := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tName: pulumi.StringRef(\"account-name\"),\n\t\t\tMetroCode: \"SV\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestPublicKey, err := networkedge.NewSshKey(ctx, \"testPublicKey\", \u0026networkedge.SshKeyArgs{\n\t\t\tName: pulumi.String(\"key-name\"),\n\t\t\tPublicKey: pulumi.String(\"ssh-dss key-value\"),\n\t\t\tType: pulumi.String(\"DSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewDevice(ctx, \"aristaHa\", \u0026networkedge.DeviceArgs{\n\t\t\tName: pulumi.String(\"tf-arista-p\"),\n\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\tTypeCode: pulumi.String(\"ARISTA-ROUTER\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tConnectivity: pulumi.String(\"PRIVATE\"),\n\t\t\tByol: pulumi.Bool(true),\n\t\t\tPackageCode: pulumi.String(\"CloudEOS\"),\n\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"test@equinix.com\"),\n\t\t\t},\n\t\t\tHostname: pulumi.String(\"arista-p\"),\n\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\tVersion: pulumi.String(\"4.29.0\"),\n\t\t\tCoreCount: pulumi.Int(4),\n\t\t\tTermLength: pulumi.Int(12),\n\t\t\tAdditionalBandwidth: pulumi.Int(5),\n\t\t\tSshKey: \u0026networkedge.DeviceSshKeyArgs{\n\t\t\t\tUsername: pulumi.String(\"test-username\"),\n\t\t\t\tKeyName: testPublicKey.Name,\n\t\t\t},\n\t\t\tAclTemplateId: pulumi.String(\"c637a17b-7a6a-4486-924b-30e6c36904b0\"),\n\t\t\tSecondaryDevice: \u0026networkedge.DeviceSecondaryDeviceArgs{\n\t\t\t\tName: pulumi.String(\"tf-arista-s\"),\n\t\t\t\tMetroCode: pulumi.String(sv.MetroCode),\n\t\t\t\tHostname: pulumi.String(\"arista-s\"),\n\t\t\t\tNotifications: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"test@eq.com\"),\n\t\t\t\t},\n\t\t\t\tAccountNumber: pulumi.String(sv.Number),\n\t\t\t\tAclTemplateId: pulumi.String(\"fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138\"),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sv = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n Name = \"account-name\",\n MetroCode = \"SV\",\n });\n\n var testPublicKey = new Equinix.NetworkEdge.SshKey(\"testPublicKey\", new()\n {\n Name = \"key-name\",\n PublicKey = \"ssh-dss key-value\",\n Type = \"DSA\",\n });\n\n var aristaHa = new Equinix.NetworkEdge.Device(\"aristaHa\", new()\n {\n Name = \"tf-arista-p\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n TypeCode = \"ARISTA-ROUTER\",\n SelfManaged = true,\n Connectivity = \"PRIVATE\",\n Byol = true,\n PackageCode = \"CloudEOS\",\n Notifications = new[]\n {\n \"test@equinix.com\",\n },\n Hostname = \"arista-p\",\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n Version = \"4.29.0\",\n CoreCount = 4,\n TermLength = 12,\n AdditionalBandwidth = 5,\n SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs\n {\n Username = \"test-username\",\n KeyName = testPublicKey.Name,\n },\n AclTemplateId = \"c637a17b-7a6a-4486-924b-30e6c36904b0\",\n SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs\n {\n Name = \"tf-arista-s\",\n MetroCode = sv.Apply(getAccountResult =\u003e getAccountResult.MetroCode),\n Hostname = \"arista-s\",\n Notifications = new[]\n {\n \"test@eq.com\",\n },\n AccountNumber = sv.Apply(getAccountResult =\u003e getAccountResult.Number),\n AclTemplateId = \"fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138\",\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkedgeFunctions;\nimport com.pulumi.equinix.networkedge.inputs.GetAccountArgs;\nimport com.pulumi.equinix.networkedge.SshKey;\nimport com.pulumi.equinix.networkedge.SshKeyArgs;\nimport com.pulumi.equinix.networkedge.Device;\nimport com.pulumi.equinix.networkedge.DeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .name(\"account-name\")\n .metroCode(\"SV\")\n .build());\n\n var testPublicKey = new SshKey(\"testPublicKey\", SshKeyArgs.builder()\n .name(\"key-name\")\n .publicKey(\"ssh-dss key-value\")\n .type(\"DSA\")\n .build());\n\n var aristaHa = new Device(\"aristaHa\", DeviceArgs.builder()\n .name(\"tf-arista-p\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .typeCode(\"ARISTA-ROUTER\")\n .selfManaged(true)\n .connectivity(\"PRIVATE\")\n .byol(true)\n .packageCode(\"CloudEOS\")\n .notifications(\"test@equinix.com\")\n .hostname(\"arista-p\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .version(\"4.29.0\")\n .coreCount(4)\n .termLength(12)\n .additionalBandwidth(5)\n .sshKey(DeviceSshKeyArgs.builder()\n .username(\"test-username\")\n .keyName(testPublicKey.name())\n .build())\n .aclTemplateId(\"c637a17b-7a6a-4486-924b-30e6c36904b0\")\n .secondaryDevice(DeviceSecondaryDeviceArgs.builder()\n .name(\"tf-arista-s\")\n .metroCode(sv.applyValue(getAccountResult -\u003e getAccountResult.metroCode()))\n .hostname(\"arista-s\")\n .notifications(\"test@eq.com\")\n .accountNumber(sv.applyValue(getAccountResult -\u003e getAccountResult.number()))\n .aclTemplateId(\"fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n testPublicKey:\n type: equinix:networkedge:SshKey\n name: test_public_key\n properties:\n name: key-name\n publicKey: ssh-dss key-value\n type: DSA\n aristaHa:\n type: equinix:networkedge:Device\n name: arista_ha\n properties:\n name: tf-arista-p\n metroCode: ${sv.metroCode}\n typeCode: ARISTA-ROUTER\n selfManaged: true\n connectivity: PRIVATE\n byol: true\n packageCode: CloudEOS\n notifications:\n - test@equinix.com\n hostname: arista-p\n accountNumber: ${sv.number}\n version: 4.29.0\n coreCount: 4\n termLength: 12\n additionalBandwidth: 5\n sshKey:\n username: test-username\n keyName: ${testPublicKey.name}\n aclTemplateId: c637a17b-7a6a-4486-924b-30e6c36904b0\n secondaryDevice:\n name: tf-arista-s\n metroCode: ${sv.metroCode}\n hostname: arista-s\n notifications:\n - test@eq.com\n accountNumber: ${sv.number}\n aclTemplateId: fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138\nvariables:\n # Create self configured redundant Arista router with DSA key\n sv:\n fn::invoke:\n Function: equinix:networkedge:getAccount\n Arguments:\n name: account-name\n metroCode: SV\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/device:Device example {existing_id}\n```\n\nThe `license_token`, `mgmt_acl_template_uuid` and `cloud_init_file_id` fields can not be imported.\n\n\n{{% /examples %}}", "properties": { "accountNumber": { "type": "string", @@ -18164,7 +18163,7 @@ } }, "equinix:networkedge/deviceLink:DeviceLink": { - "description": "Resource `equinix.networkedge.DeviceLink` allows creation and management of Equinix Network Edge virtual network device links.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst accountName = config.require(\"accountName\");\nconst accountMetro = config.require(\"accountMetro\");\nconst device1Id = config.require(\"device1Id\");\nconst device2Id = config.require(\"device2Id\");\nconst accountfNum = equinix.networkedge.getAccount({\n name: accountName,\n metroCode: accountMetro,\n}).then(invoke =\u003e invoke.number);\nconst device1Metro = equinix.networkedge.getDevice({\n uuid: device1Id,\n}).then(invoke =\u003e invoke.metroCode);\nconst device2Metro = equinix.networkedge.getDevice({\n uuid: device2Id,\n}).then(invoke =\u003e invoke.metroCode);\nconst deviceLink = new equinix.networkedge.DeviceLink(\"deviceLink\", {\n name: \"test-link\",\n subnet: \"192.168.40.64/27\",\n devices: [\n {\n id: \"device1Id\",\n asn: 22111,\n interfaceId: 6,\n },\n {\n id: \"device2Id\",\n asn: 22333,\n interfaceId: 7,\n },\n ],\n links: [{\n accountNumber: accountfNum,\n srcMetroCode: device1Metro,\n dstMetroCode: device2Metro,\n throughput: \"50\",\n throughputUnit: \"Mbps\",\n }],\n});\nexport const status = deviceLink.status;\nexport const devices = deviceLink.devices;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\naccount_name = config.require(\"accountName\")\naccount_metro = config.require(\"accountMetro\")\ndevice1_id = config.require(\"device1Id\")\ndevice2_id = config.require(\"device2Id\")\naccountf_num = equinix.networkedge.get_account(name=account_name,\n metro_code=account_metro).number\ndevice1_metro = equinix.networkedge.get_device(uuid=device1_id).metro_code\ndevice2_metro = equinix.networkedge.get_device(uuid=device2_id).metro_code\ndevice_link = equinix.networkedge.DeviceLink(\"deviceLink\",\n name=\"test-link\",\n subnet=\"192.168.40.64/27\",\n devices=[\n equinix.networkedge.DeviceLinkDeviceArgs(\n id=\"device1Id\",\n asn=22111,\n interface_id=6,\n ),\n equinix.networkedge.DeviceLinkDeviceArgs(\n id=\"device2Id\",\n asn=22333,\n interface_id=7,\n ),\n ],\n links=[equinix.networkedge.DeviceLinkLinkArgs(\n account_number=accountf_num,\n src_metro_code=device1_metro,\n dst_metro_code=device2_metro,\n throughput=\"50\",\n throughput_unit=\"Mbps\",\n )])\npulumi.export(\"status\", device_link.status)\npulumi.export(\"devices\", device_link.devices)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\taccountName := cfg.Require(\"accountName\")\n\t\taccountMetro := cfg.Require(\"accountMetro\")\n\t\tdevice1Id := cfg.Require(\"device1Id\")\n\t\tdevice2Id := cfg.Require(\"device2Id\")\n\t\taccountfNum := networkedge.GetAccount(ctx, \u0026networkedge.GetAccountArgs{\n\t\t\tName: pulumi.StringRef(accountName),\n\t\t\tMetroCode: accountMetro,\n\t\t}, nil).Number\n\t\tdevice1Metro := networkedge.LookupDevice(ctx, \u0026networkedge.LookupDeviceArgs{\n\t\t\tUuid: pulumi.StringRef(device1Id),\n\t\t}, nil).MetroCode\n\t\tdevice2Metro := networkedge.LookupDevice(ctx, \u0026networkedge.LookupDeviceArgs{\n\t\t\tUuid: pulumi.StringRef(device2Id),\n\t\t}, nil).MetroCode\n\t\tdeviceLink, err := networkedge.NewDeviceLink(ctx, \"deviceLink\", \u0026networkedge.DeviceLinkArgs{\n\t\t\tName: pulumi.String(\"test-link\"),\n\t\t\tSubnet: pulumi.String(\"192.168.40.64/27\"),\n\t\t\tDevices: networkedge.DeviceLinkDeviceArray{\n\t\t\t\t\u0026networkedge.DeviceLinkDeviceArgs{\n\t\t\t\t\tId: pulumi.String(\"device1Id\"),\n\t\t\t\t\tAsn: pulumi.Int(22111),\n\t\t\t\t\tInterfaceId: pulumi.Int(6),\n\t\t\t\t},\n\t\t\t\t\u0026networkedge.DeviceLinkDeviceArgs{\n\t\t\t\t\tId: pulumi.String(\"device2Id\"),\n\t\t\t\t\tAsn: pulumi.Int(22333),\n\t\t\t\t\tInterfaceId: pulumi.Int(7),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLinks: networkedge.DeviceLinkLinkArray{\n\t\t\t\t\u0026networkedge.DeviceLinkLinkArgs{\n\t\t\t\t\tAccountNumber: *pulumi.String(accountfNum),\n\t\t\t\t\tSrcMetroCode: *pulumi.String(device1Metro),\n\t\t\t\t\tDstMetroCode: *pulumi.String(device2Metro),\n\t\t\t\t\tThroughput: pulumi.String(\"50\"),\n\t\t\t\t\tThroughputUnit: pulumi.String(\"Mbps\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"status\", deviceLink.Status)\n\t\tctx.Export(\"devices\", deviceLink.Devices)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var accountName = config.Require(\"accountName\");\n var accountMetro = config.Require(\"accountMetro\");\n var device1Id = config.Require(\"device1Id\");\n var device2Id = config.Require(\"device2Id\");\n var accountfNum = Equinix.NetworkEdge.GetAccount.Invoke(new()\n {\n Name = accountName,\n MetroCode = accountMetro,\n }).Apply(invoke =\u003e invoke.Number);\n\n var device1Metro = Equinix.NetworkEdge.GetDevice.Invoke(new()\n {\n Uuid = device1Id,\n }).Apply(invoke =\u003e invoke.MetroCode);\n\n var device2Metro = Equinix.NetworkEdge.GetDevice.Invoke(new()\n {\n Uuid = device2Id,\n }).Apply(invoke =\u003e invoke.MetroCode);\n\n var deviceLink = new Equinix.NetworkEdge.DeviceLink(\"deviceLink\", new()\n {\n Name = \"test-link\",\n Subnet = \"192.168.40.64/27\",\n Devices = new[]\n {\n new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs\n {\n Id = \"device1Id\",\n Asn = 22111,\n InterfaceId = 6,\n },\n new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs\n {\n Id = \"device2Id\",\n Asn = 22333,\n InterfaceId = 7,\n },\n },\n Links = new[]\n {\n new Equinix.NetworkEdge.Inputs.DeviceLinkLinkArgs\n {\n AccountNumber = accountfNum,\n SrcMetroCode = device1Metro,\n DstMetroCode = device2Metro,\n Throughput = \"50\",\n ThroughputUnit = \"Mbps\",\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"status\"] = deviceLink.Status,\n [\"devices\"] = deviceLink.Devices,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.networkedge.DeviceLink;\nimport com.equinix.pulumi.networkedge.DeviceLinkArgs;\nimport com.equinix.pulumi.networkedge.inputs.DeviceLinkDeviceArgs;\nimport com.equinix.pulumi.networkedge.inputs.DeviceLinkLinkArgs;\nimport com.equinix.pulumi.networkedge.inputs.GetAccountArgs;\nimport com.equinix.pulumi.networkedge.inputs.GetDeviceArgs;\nimport com.equinix.pulumi.networkedge.NetworkedgeFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var accountName = config.get(\"accountName\").get();\n final var accountMetro = config.get(\"accountMetro\").get();\n final var device1Id = config.get(\"device1Id\").get();\n final var device2Id = config.get(\"device2Id\").get();\n final var accountfNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()\n .name(accountName)\n .metroCode(accountMetro)\n .build()).applyValue(account -\u003e account.number());\n\n final var device1Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder()\n .uuid(device1Id)\n .build()).applyValue(device -\u003e device.metroCode());\n\n final var device2Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder()\n .uuid(device2Id)\n .build()).applyValue(device -\u003e device.metroCode());\n\n var deviceLink = new DeviceLink(\"deviceLink\", DeviceLinkArgs.builder() \n .name(\"test-link\")\n .subnet(\"192.168.40.64/27\")\n .devices( \n DeviceLinkDeviceArgs.builder()\n .id(\"device1Id\")\n .asn(22111)\n .interfaceId(6)\n .build(),\n DeviceLinkDeviceArgs.builder()\n .id(\"device2Id\")\n .asn(22333)\n .interfaceId(7)\n .build())\n .links(DeviceLinkLinkArgs.builder()\n .accountNumber(accountfNum)\n .srcMetroCode(device1Metro)\n .dstMetroCode(device2Metro)\n .throughput(\"50\")\n .throughputUnit(\"Mbps\")\n .build())\n .build());\n\n ctx.export(\"status\", deviceLink.status());\n ctx.export(\"devices\", deviceLink.devices());\n }\n}\n```\n```yaml\nconfig:\n accountName:\n type: string\n accountMetro:\n type: string\n device1Id:\n type: string\n device2Id:\n type: string\nvariables:\n accountfNum:\n fn::invoke:\n function: equinix:networkedge:getAccount\n arguments:\n name: ${accountName}\n metroCode: ${accountMetro}\n return: number\n device1Metro:\n fn::invoke:\n function: equinix:networkedge:getDevice\n arguments:\n uuid: ${device1Id}\n return: metroCode\n device2Metro:\n fn::invoke:\n function: equinix:networkedge:getDevice\n arguments:\n uuid: ${device2Id}\n return: metroCode\nresources:\n deviceLink:\n type: equinix:networkedge:DeviceLink\n properties:\n name: test-link\n subnet: 192.168.40.64/27\n devices:\n - id: device1Id\n asn: 22111\n interfaceId: 6\n - id: device2Id\n asn: 22333\n interfaceId: 7\n links:\n - accountNumber: ${accountfNum}\n srcMetroCode: ${device1Metro}\n dstMetroCode: ${device2Metro}\n throughput: 50\n throughputUnit: Mbps\noutputs:\n status: ${deviceLink.status}\n devices: ${deviceLink.devices}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/deviceLink:DeviceLink example {existing_id}\n```\n\n\n{{% /examples %}}", + "description": "Resource `equinix.networkedge.DeviceLink` allows creation and management of Equinix Network Edge virtual network device links.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst test = new equinix.networkedge.DeviceLink(\"test\", {\n name: \"test-link\",\n subnet: \"192.168.40.64/27\",\n projectId: \"a86d7112-d740-4758-9c9c-31e66373746b\",\n devices: [\n {\n id: testEquinixNetworkDevice.uuid,\n asn: 22111,\n interfaceId: 6,\n },\n {\n id: testEquinixNetworkDevice.secondaryDevice[0].uuid,\n asn: 22333,\n interfaceId: 7,\n },\n ],\n links: [{\n accountNumber: testEquinixNetworkDevice.accountNumber,\n srcMetroCode: testEquinixNetworkDevice.metroCode,\n dstMetroCode: testEquinixNetworkDevice.secondaryDevice[0].metroCode,\n throughput: \"50\",\n throughputUnit: \"Mbps\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\ntest = equinix.networkedge.DeviceLink(\"test\",\n name=\"test-link\",\n subnet=\"192.168.40.64/27\",\n project_id=\"a86d7112-d740-4758-9c9c-31e66373746b\",\n devices=[\n equinix.networkedge.DeviceLinkDeviceArgs(\n id=test_equinix_network_device[\"uuid\"],\n asn=22111,\n interface_id=6,\n ),\n equinix.networkedge.DeviceLinkDeviceArgs(\n id=test_equinix_network_device[\"secondaryDevice\"][0][\"uuid\"],\n asn=22333,\n interface_id=7,\n ),\n ],\n links=[equinix.networkedge.DeviceLinkLinkArgs(\n account_number=test_equinix_network_device[\"accountNumber\"],\n src_metro_code=test_equinix_network_device[\"metroCode\"],\n dst_metro_code=test_equinix_network_device[\"secondaryDevice\"][0][\"metroCode\"],\n throughput=\"50\",\n throughput_unit=\"Mbps\",\n )])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\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 := networkedge.NewDeviceLink(ctx, \"test\", \u0026networkedge.DeviceLinkArgs{\n\t\t\tName: pulumi.String(\"test-link\"),\n\t\t\tSubnet: pulumi.String(\"192.168.40.64/27\"),\n\t\t\tProjectId: pulumi.String(\"a86d7112-d740-4758-9c9c-31e66373746b\"),\n\t\t\tDevices: networkedge.DeviceLinkDeviceArray{\n\t\t\t\t\u0026networkedge.DeviceLinkDeviceArgs{\n\t\t\t\t\tId: pulumi.Any(testEquinixNetworkDevice.Uuid),\n\t\t\t\t\tAsn: pulumi.Int(22111),\n\t\t\t\t\tInterfaceId: pulumi.Int(6),\n\t\t\t\t},\n\t\t\t\t\u0026networkedge.DeviceLinkDeviceArgs{\n\t\t\t\t\tId: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].Uuid),\n\t\t\t\t\tAsn: pulumi.Int(22333),\n\t\t\t\t\tInterfaceId: pulumi.Int(7),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLinks: networkedge.DeviceLinkLinkArray{\n\t\t\t\t\u0026networkedge.DeviceLinkLinkArgs{\n\t\t\t\t\tAccountNumber: pulumi.Any(testEquinixNetworkDevice.AccountNumber),\n\t\t\t\t\tSrcMetroCode: pulumi.Any(testEquinixNetworkDevice.MetroCode),\n\t\t\t\t\tDstMetroCode: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].MetroCode),\n\t\t\t\t\tThroughput: pulumi.String(\"50\"),\n\t\t\t\t\tThroughputUnit: pulumi.String(\"Mbps\"),\n\t\t\t\t},\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Equinix.NetworkEdge.DeviceLink(\"test\", new()\n {\n Name = \"test-link\",\n Subnet = \"192.168.40.64/27\",\n ProjectId = \"a86d7112-d740-4758-9c9c-31e66373746b\",\n Devices = new[]\n {\n new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs\n {\n Id = testEquinixNetworkDevice.Uuid,\n Asn = 22111,\n InterfaceId = 6,\n },\n new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs\n {\n Id = testEquinixNetworkDevice.SecondaryDevice[0].Uuid,\n Asn = 22333,\n InterfaceId = 7,\n },\n },\n Links = new[]\n {\n new Equinix.NetworkEdge.Inputs.DeviceLinkLinkArgs\n {\n AccountNumber = testEquinixNetworkDevice.AccountNumber,\n SrcMetroCode = testEquinixNetworkDevice.MetroCode,\n DstMetroCode = testEquinixNetworkDevice.SecondaryDevice[0].MetroCode,\n Throughput = \"50\",\n ThroughputUnit = \"Mbps\",\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.DeviceLink;\nimport com.pulumi.equinix.networkedge.DeviceLinkArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceLinkDeviceArgs;\nimport com.pulumi.equinix.networkedge.inputs.DeviceLinkLinkArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new DeviceLink(\"test\", DeviceLinkArgs.builder()\n .name(\"test-link\")\n .subnet(\"192.168.40.64/27\")\n .projectId(\"a86d7112-d740-4758-9c9c-31e66373746b\")\n .devices( \n DeviceLinkDeviceArgs.builder()\n .id(testEquinixNetworkDevice.uuid())\n .asn(22111)\n .interfaceId(6)\n .build(),\n DeviceLinkDeviceArgs.builder()\n .id(testEquinixNetworkDevice.secondaryDevice()[0].uuid())\n .asn(22333)\n .interfaceId(7)\n .build())\n .links(DeviceLinkLinkArgs.builder()\n .accountNumber(testEquinixNetworkDevice.accountNumber())\n .srcMetroCode(testEquinixNetworkDevice.metroCode())\n .dstMetroCode(testEquinixNetworkDevice.secondaryDevice()[0].metroCode())\n .throughput(\"50\")\n .throughputUnit(\"Mbps\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\n # Example of device link with HA device pair\n # where each device is in different metro\n test:\n type: equinix:networkedge:DeviceLink\n properties:\n name: test-link\n subnet: 192.168.40.64/27\n projectId: a86d7112-d740-4758-9c9c-31e66373746b\n devices:\n - id: ${testEquinixNetworkDevice.uuid}\n asn: 22111\n interfaceId: 6\n - id: ${testEquinixNetworkDevice.secondaryDevice[0].uuid}\n asn: 22333\n interfaceId: 7\n links:\n - accountNumber: ${testEquinixNetworkDevice.accountNumber}\n srcMetroCode: ${testEquinixNetworkDevice.metroCode}\n dstMetroCode: ${testEquinixNetworkDevice.secondaryDevice[0].metroCode}\n throughput: '50'\n throughputUnit: Mbps\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/deviceLink:DeviceLink example {existing_id}\n```\n\n\n{{% /examples %}}", "properties": { "devices": { "type": "array", @@ -18321,7 +18320,7 @@ } }, "equinix:networkedge/networkFile:NetworkFile": { - "description": "Resource `equinix.networkedge.NetworkFile` allows creation and management of Equinix Network Edge files.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as fs from \"fs\";\n\nconst config = new pulumi.Config();\nconst metro = config.get(\"metro\") || \"SV\";\nconst networkFile = new equinix.networkedge.NetworkFile(\"networkFile\", {\n fileName: \"Aviatrix-ZTP-file\",\n content: fs.readFileSync(\"./../assets/aviatrix-cloud-init.txt\"),\n metroCode: metro,\n deviceTypeCode: \"AVIATRIX_EDGE\",\n processType: \"CLOUD_INIT\",\n selfManaged: true,\n byol: true,\n});\nexport const networkFileId = networkFile.id;\nexport const networkFileStatus = networkFile.status;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\nmetro = config.get(\"metro\")\nif metro is None:\n metro = \"SV\"\nnetwork_file = equinix.networkedge.NetworkFile(\"networkFile\",\n file_name=\"Aviatrix-ZTP-file\",\n content=(lambda path: open(path).read())(\"./../assets/aviatrix-cloud-init.txt\"),\n metro_code=metro,\n device_type_code=\"AVIATRIX_EDGE\",\n process_type=\"CLOUD_INIT\",\n self_managed=True,\n byol=True)\npulumi.export(\"networkFileId\", network_file.id)\npulumi.export(\"networkFileStatus\", network_file.status)\n```\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc readFileOrPanic(path string) pulumi.StringPtrInput {\n\tdata, err := os.ReadFile(path)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn pulumi.String(string(data))\n}\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tmetro := \"SV\"\n\t\tif param := cfg.Get(\"metro\"); param != \"\" {\n\t\t\tmetro = param\n\t\t}\n\t\tnetworkFile, err := networkedge.NewNetworkFile(ctx, \"networkFile\", \u0026networkedge.NetworkFileArgs{\n\t\t\tFileName: pulumi.String(\"Aviatrix-ZTP-file\"),\n\t\t\tContent: readFileOrPanic(\"./../assets/aviatrix-cloud-init.txt\"),\n\t\t\tMetroCode: pulumi.String(metro),\n\t\t\tDeviceTypeCode: pulumi.String(\"AVIATRIX_EDGE\"),\n\t\t\tProcessType: pulumi.String(\"CLOUD_INIT\"),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"networkFileId\", networkFile.ID())\n\t\tctx.Export(\"networkFileStatus\", networkFile.Status)\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.IO;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var metro = config.Get(\"metro\") ?? \"SV\";\n var networkFile = new Equinix.NetworkEdge.NetworkFile(\"networkFile\", new()\n {\n FileName = \"Aviatrix-ZTP-file\",\n Content = File.ReadAllText(\"./../assets/aviatrix-cloud-init.txt\"),\n MetroCode = metro,\n DeviceTypeCode = \"AVIATRIX_EDGE\",\n ProcessType = \"CLOUD_INIT\",\n SelfManaged = true,\n Byol = true,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"networkFileId\"] = networkFile.Id,\n [\"networkFileStatus\"] = networkFile.Status,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.networkedge.NetworkFile;\nimport com.equinix.pulumi.networkedge.NetworkFileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.IOException;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var metro = config.get(\"metro\").orElse(\"SV\");\n\n String content = null;\n try {\n content = Files.readString(Paths.get(\"./../assets/aviatrix-cloud-init.txt\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n var networkFile = new NetworkFile(\"networkFile\", NetworkFileArgs.builder() \n .fileName(\"Aviatrix-ZTP-file\")\n .content(content)\n .metroCode(metro)\n .deviceTypeCode(\"AVIATRIX_EDGE\")\n .processType(\"CLOUD_INIT\")\n .selfManaged(true)\n .byol(true)\n .build());\n\n ctx.export(\"networkFileId\", networkFile.id());\n ctx.export(\"networkFileStatus\", networkFile.status());\n }\n}\n```\n```yaml\nconfig:\n metro:\n type: string\n default: SV\nresources:\n networkFile:\n type: equinix:networkedge:NetworkFile\n properties:\n fileName: Aviatrix-ZTP-file\n content:\n fn::readFile: ./../assets/aviatrix-cloud-init.txt\n metroCode: ${metro}\n deviceTypeCode: AVIATRIX_EDGE\n processType: CLOUD_INIT\n selfManaged: true\n byol: true\noutputs:\n networkFileId: ${networkFile.id}\n networkFileStatus: ${networkFile.status}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/networkFile:NetworkFile example {existing_id}\n```\n\nThe `content`, `self_managed` and `byol` fields can not be imported.\n\n\n{{% /examples %}}", + "description": "Resource `equinix.networkedge.NetworkFile` allows creation and management of Equinix Network Edge files.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as std from \"@pulumi/std\";\n\nconst config = new pulumi.Config();\nconst filepath = config.get(\"filepath\") || \"fileFolder/fileName.txt\";\nconst testFile = new equinix.networkedge.NetworkFile(\"test-file\", {\n fileName: \"fileName.txt\",\n content: std.fileOutput({\n input: filepath,\n }).apply(invoke =\u003e invoke.result),\n metroCode: equinix.index.Metro.SiliconValley,\n deviceTypeCode: \"AVIATRIX_EDGE\",\n processType: equinix.networkedge.FileType.CloudInit,\n selfManaged: true,\n byol: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\nimport pulumi_std as std\n\nconfig = pulumi.Config()\nfilepath = config.get(\"filepath\")\nif filepath is None:\n filepath = \"fileFolder/fileName.txt\"\ntest_file = equinix.networkedge.NetworkFile(\"test-file\",\n file_name=\"fileName.txt\",\n content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),\n metro_code=equinix.Metro.SILICON_VALLEY,\n device_type_code=\"AVIATRIX_EDGE\",\n process_type=equinix.networkedge.FileType.CLOUD_INIT,\n self_managed=True,\n byol=True)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix\"\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tfilepath := \"fileFolder/fileName.txt\"\n\t\tif param := cfg.Get(\"filepath\"); param != \"\" {\n\t\t\tfilepath = param\n\t\t}\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: filepath,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = networkedge.NewNetworkFile(ctx, \"test-file\", \u0026networkedge.NetworkFileArgs{\n\t\t\tFileName: pulumi.String(\"fileName.txt\"),\n\t\t\tContent: invokeFile.Result,\n\t\t\tMetroCode: pulumi.String(equinix.MetroSiliconValley),\n\t\t\tDeviceTypeCode: pulumi.String(\"AVIATRIX_EDGE\"),\n\t\t\tProcessType: pulumi.String(networkedge.FileTypeCloudInit),\n\t\t\tSelfManaged: pulumi.Bool(true),\n\t\t\tByol: pulumi.Bool(true),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var filepath = config.Get(\"filepath\") ?? \"fileFolder/fileName.txt\";\n var testFile = new Equinix.NetworkEdge.NetworkFile(\"test-file\", new()\n {\n FileName = \"fileName.txt\",\n Content = Std.File.Invoke(new()\n {\n Input = filepath,\n }).Apply(invoke =\u003e invoke.Result),\n MetroCode = Equinix.Metro.SiliconValley,\n DeviceTypeCode = \"AVIATRIX_EDGE\",\n ProcessType = Equinix.NetworkEdge.FileType.CloudInit,\n SelfManaged = true,\n Byol = true,\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.NetworkFile;\nimport com.pulumi.equinix.networkedge.NetworkFileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var filepath = config.get(\"filepath\").orElse(\"fileFolder/fileName.txt\");\n var testFile = new NetworkFile(\"testFile\", NetworkFileArgs.builder()\n .fileName(\"fileName.txt\")\n .content(StdFunctions.file(FileArgs.builder()\n .input(filepath)\n .build()).result())\n .metroCode(\"SV\")\n .deviceTypeCode(\"AVIATRIX_EDGE\")\n .processType(\"CLOUD_INIT\")\n .selfManaged(true)\n .byol(true)\n .build());\n\n }\n}\n```\n```yaml\n filepath:\n type: string\n default: fileFolder/fileName.txt\nresources:\n test-file:\n type: equinix:networkedge:NetworkFile\n properties:\n fileName: fileName.txt\n content:\n fn::invoke:\n Function: std:file\n Arguments:\n input: ${filepath}\n Return: result\n metroCode: SV\n deviceTypeCode: AVIATRIX_EDGE\n processType: CLOUD_INIT\n selfManaged: true\n byol: true\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/networkFile:NetworkFile example {existing_id}\n```\n\nThe `content`, `self_managed` and `byol` fields can not be imported.\n\n\n{{% /examples %}}", "properties": { "byol": { "type": "boolean", @@ -18507,7 +18506,7 @@ } }, "equinix:networkedge/sshKey:SshKey": { - "description": "Resource `equinix.networkedge.SshKey` allows creation and management of Equinix Network Edge SSH keys.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\nimport * as fs from \"fs\";\n\nconst sshKey = new equinix.networkedge.SshKey(\"sshKey\", {\n name: \"johnKent\",\n publicKey: fs.readFileSync(\"/Users/John/.ssh/ne_rsa.pub\"),\n});\nexport const sshKeyId = sshKey.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nssh_key = equinix.networkedge.SshKey(\"sshKey\",\n name=\"johnKent\",\n public_key=(lambda path: open(path).read())(\"/Users/John/.ssh/ne_rsa.pub\"))\npulumi.export(\"sshKeyId\", ssh_key.id)\n```\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc readFileOrPanic(path string) pulumi.StringPtrInput {\n\tdata, err := os.ReadFile(path)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn pulumi.String(string(data))\n}\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsshKey, err := networkedge.NewSshKey(ctx, \"sshKey\", \u0026networkedge.SshKeyArgs{\n\t\t\tName: pulumi.String(\"johnKent\"),\n\t\t\tPublicKey: readFileOrPanic(\"/Users/John/.ssh/ne_rsa.pub\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"sshKeyId\", sshKey.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing System.IO;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sshKey = new Equinix.NetworkEdge.SshKey(\"sshKey\", new()\n {\n Name = \"johnKent\",\n PublicKey = File.ReadAllText(\"/Users/John/.ssh/ne_rsa.pub\"),\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"sshKeyId\"] = sshKey.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.networkedge.SshKey;\nimport com.equinix.pulumi.networkedge.SshKeyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.IOException;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n String key = null;\n try {\n key = Files.readString(Paths.get(\"/Users/John/.ssh/ne_rsa.pub\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n var sshKey = new SshKey(\"sshKey\", SshKeyArgs.builder() \n .name(\"johnKent\")\n .publicKey(key)\n .build());\n\n ctx.export(\"sshKeyId\", sshKey.id());\n }\n}\n```\n```yaml\nresources:\n sshKey:\n type: equinix:networkedge:SshKey\n properties:\n name: johnKent\n publicKey:\n fn::readFile: /Users/John/.ssh/ne_rsa.pub\noutputs:\n sshKeyId: ${sshKey.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/sshKey:SshKey example {existing_id}\n```\n\n\n{{% /examples %}}", + "description": "Resource `equinix.networkedge.SshKey` allows creation and management of Equinix Network Edge SSH keys.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst john = new equinix.networkedge.SshKey(\"john\", {\n name: \"johnKent\",\n publicKey: ` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX\n 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu\n iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS\n qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl\n mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N\n w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM\n 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5\n SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW\n WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F\n jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com\n`,\n type: \"RSA\",\n projectId: \"a86d7112-d740-4758-9c9c-31e66373746b\",\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\njohn = equinix.networkedge.SshKey(\"john\",\n name=\"johnKent\",\n public_key=\"\"\" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX\n 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu\n iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS\n qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl\n mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N\n w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM\n 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5\n SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW\n WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F\n jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com\n\"\"\",\n type=\"RSA\",\n project_id=\"a86d7112-d740-4758-9c9c-31e66373746b\")\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\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 := networkedge.NewSshKey(ctx, \"john\", \u0026networkedge.SshKeyArgs{\n\t\t\tName: pulumi.String(\"johnKent\"),\n\t\t\tPublicKey: pulumi.String(` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX\n 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu\n iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS\n qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl\n mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N\n w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM\n 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5\n SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW\n WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F\n jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com\n`),\n\t\t\tType: pulumi.String(\"RSA\"),\n\t\t\tProjectId: pulumi.String(\"a86d7112-d740-4758-9c9c-31e66373746b\"),\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var john = new Equinix.NetworkEdge.SshKey(\"john\", new()\n {\n Name = \"johnKent\",\n PublicKey = @\" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX\n 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu\n iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS\n qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl\n mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N\n w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM\n 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5\n SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW\n WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F\n jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com\n\",\n Type = \"RSA\",\n ProjectId = \"a86d7112-d740-4758-9c9c-31e66373746b\",\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.SshKey;\nimport com.pulumi.equinix.networkedge.SshKeyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var john = new SshKey(\"john\", SshKeyArgs.builder()\n .name(\"johnKent\")\n .publicKey(\"\"\"\n ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX\n 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu\n iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS\n qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl\n mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N\n w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM\n 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5\n SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW\n WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F\n jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com\n \"\"\")\n .type(\"RSA\")\n .projectId(\"a86d7112-d740-4758-9c9c-31e66373746b\")\n .build());\n\n }\n}\n```\n```yaml\n john:\n type: equinix:networkedge:SshKey\n properties:\n name: johnKent\n publicKey: |2\n ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX\n 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu\n iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS\n qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl\n mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N\n w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM\n 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5\n SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW\n WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F\n jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com\n type: RSA\n projectId: a86d7112-d740-4758-9c9c-31e66373746b\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/sshKey:SshKey example {existing_id}\n```\n\n\n{{% /examples %}}", "properties": { "name": { "type": "string", @@ -18593,7 +18592,7 @@ } }, "equinix:networkedge/sshUser:SshUser": { - "description": "Resource `equinix.networkedge.SshUser` allows creation and management of Equinix Network Edge SSH users.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst config = new pulumi.Config();\nconst device1Id = config.require(\"device1Id\");\nconst device2Id = config.require(\"device2Id\");\nconst sshUser = new equinix.networkedge.SshUser(\"sshUser\", {\n username: \"johnKent\",\n deviceIds: [\n device1Id,\n device2Id,\n ],\n});\nexport const sshUserId = sshUser.id;\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\nconfig = pulumi.Config()\ndevice1_id = config.require(\"device1Id\")\ndevice2_id = config.require(\"device2Id\")\nssh_user = equinix.networkedge.SshUser(\"sshUser\",\n username=\"johnKent\",\n device_ids=[\n device1_id,\n device2_id,\n ])\npulumi.export(\"sshUserId\", ssh_user.id)\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdevice1Id := cfg.Require(\"device1Id\")\n\t\tdevice2Id := cfg.Require(\"device2Id\")\n\t\tsshUser, err := networkedge.NewSshUser(ctx, \"sshUser\", \u0026networkedge.SshUserArgs{\n\t\t\tUsername: pulumi.String(\"johnKent\"),\n\t\t\tDeviceIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(device1Id),\n\t\t\t\tpulumi.String(device2Id),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"sshUserId\", sshUser.ID())\n\t\treturn nil\n\t})\n}\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var device1Id = config.Require(\"device1Id\");\n var device2Id = config.Require(\"device2Id\");\n var sshUser = new Equinix.NetworkEdge.SshUser(\"sshUser\", new()\n {\n Username = \"johnKent\",\n DeviceIds = new[]\n {\n device1Id,\n device2Id,\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"sshUserId\"] = sshUser.Id,\n };\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.equinix.pulumi.networkedge.SshUser;\nimport com.equinix.pulumi.networkedge.SshUserArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var device1Id = config.get(\"device1Id\").get();\n final var device2Id = config.get(\"device2Id\").get();\n var sshUser = new SshUser(\"sshUser\", SshUserArgs.builder() \n .username(\"johnKent\")\n .deviceIds( \n device1Id,\n device2Id)\n .build());\n\n ctx.export(\"sshUserId\", sshUser.id());\n }\n}\n```\n```yaml\nconfig:\n device1Id:\n type: string\n device2Id:\n type: string\nresources:\n sshUser:\n type: equinix:networkedge:SshUser\n properties:\n username: johnKent\n deviceIds:\n - ${device1Id}\n - ${device2Id}\noutputs:\n sshUserId: ${sshUser.id}\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/sshUser:SshUser example {existing_id}\n```\n\n\n{{% /examples %}}", + "description": "Resource `equinix.networkedge.SshUser` allows creation and management of Equinix Network Edge SSH users.\n\n{{% examples %}}\n## Example Usage\n\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as equinix from \"@equinix-labs/pulumi-equinix\";\n\nconst john = new equinix.networkedge.SshUser(\"john\", {\n username: \"john\",\n password: \"secret\",\n deviceIds: [\n \"csr1000v-ha-uuid\",\n \"csr1000v-ha-redundant-uuid\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_equinix as equinix\n\njohn = equinix.networkedge.SshUser(\"john\",\n username=\"john\",\n password=\"secret\",\n device_ids=[\n \"csr1000v-ha-uuid\",\n \"csr1000v-ha-redundant-uuid\",\n ])\n```\n```go\npackage main\n\nimport (\n\t\"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge\"\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 := networkedge.NewSshUser(ctx, \"john\", \u0026networkedge.SshUserArgs{\n\t\t\tUsername: pulumi.String(\"john\"),\n\t\t\tPassword: pulumi.String(\"secret\"),\n\t\t\tDeviceIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"csr1000v-ha-uuid\"),\n\t\t\t\tpulumi.String(\"csr1000v-ha-redundant-uuid\"),\n\t\t\t},\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```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Equinix = Pulumi.Equinix;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var john = new Equinix.NetworkEdge.SshUser(\"john\", new()\n {\n Username = \"john\",\n Password = \"secret\",\n DeviceIds = new[]\n {\n \"csr1000v-ha-uuid\",\n \"csr1000v-ha-redundant-uuid\",\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.equinix.networkedge.SshUser;\nimport com.pulumi.equinix.networkedge.SshUserArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var john = new SshUser(\"john\", SshUserArgs.builder()\n .username(\"john\")\n .password(\"secret\")\n .deviceIds( \n \"csr1000v-ha-uuid\",\n \"csr1000v-ha-redundant-uuid\")\n .build());\n\n }\n}\n```\n```yaml\n # Create SSH user with password auth method and associate it with\n # two virtual network devices\n john:\n type: equinix:networkedge:SshUser\n properties:\n username: john\n password: secret\n deviceIds:\n - csr1000v-ha-uuid\n - csr1000v-ha-redundant-uuid\n```\n{{% /example %}}\n\n## Import\n\nThis resource can be imported using an existing ID:\n\n```sh\n$ pulumi import equinix:networkedge/sshUser:SshUser example {existing_id}\n```\n\n\n{{% /examples %}}", "properties": { "deviceIds": { "type": "array", diff --git a/provider/go.mod b/provider/go.mod index 4c35857d..9d7e2f35 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -91,7 +91,7 @@ require ( github.com/go-jose/go-jose/v3 v3.0.3 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect + github.com/go-resty/resty/v2 v2.3.0 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect diff --git a/provider/go.sum b/provider/go.sum index 5918eb74..d6268b3c 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1429,9 +1429,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-resty/resty/v2 v2.3.0 h1:JOOeAvjSlapTT92p8xiS19Zxev1neGikoHsXJeOq8So= github.com/go-resty/resty/v2 v2.3.0/go.mod h1:UpN9CgLZNsv4e9XG50UU8xdI0F43UQ4HmxLBDwaroHU= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= @@ -2272,7 +2271,6 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= diff --git a/scripts/generate_examples.sh b/scripts/generate_examples.sh new file mode 100755 index 00000000..b1242ce5 --- /dev/null +++ b/scripts/generate_examples.sh @@ -0,0 +1,298 @@ +#!/bin/bash +set -e + +# List of files to exclude +EXCLUDE_FILES=("metal_connection/example_1.tf metal_connection/example_2.tf metal_connection/example_3.tf metal_bgp_session/example_1.tf") +EXCLUDED_FILES=() +# this script current directory +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# Examples directory +EXAMPLES_DIR="${SCRIPT_DIR}/../examples/" +# Docs directory +OUTPUT_DIR="${SCRIPT_DIR}/../docs/resource" +# Pulumi Equinix plugin version installed +VERSION=$(pulumictl get version --language generic) + +increment_patch() { + local version="$1" + local major_minor=$(echo "$version" | sed -E 's/^([0-9]+\.[0-9]+)\.[0-9]+.*$/\1/') + local patch=$(echo "$version" | sed -E 's/^[0-9]+\.[0-9]+\.([0-9]+).*$/\1/') + local new_patch=$((patch + 1)) + local new_version="$major_minor.$new_patch" + echo "$new_version" +} + +GOLANG_MIN_NEXT_VERSION=$(increment_patch "$VERSION") + +mappings() { + local tf_file=$1 + # Remove occurrences of ${path.module}/ + sed -i.bak 's/\${path\.module}\///g' "$tf_file" + # Replace one function with index 0 + sed -i.bak 's/one(equinix_fabric_connection.vd2azure_primary.redundancy).group/equinix_fabric_connection.vd2azure_primary.redundancy.0.group/g' "$tf_file" + # Fix invalid strings + sed -i.bak 's//""/g' "$tf_file" + sed -i.bak 's//""/g' "$tf_file" + # Replace public_key with EOF format + sed -i.bak '/public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX/,/John.Kent@company.com"/ { + s/public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX/public_key = < 0 ? equinix_network_device\.test\.asn : 22111/22111/g' "$tf_file" + sed -i.bak 's/equinix_network_device\.test\.secondary_device\[0\]\.asn > 0 ? equinix_network_device\.test\.secondary_device\[0\]\.asn : 22333/22333/g' "$tf_file" + # Replace references to not declared resources or variables + sed -i.bak 's/equinix_network_device\.csr1000v-ha\.uuid,/"csr1000v-ha-uuid",/g' "$tf_file" + sed -i.bak 's/equinix_network_device\.csr1000v-ha\.redundant_uuid/"csr1000v-ha-redundant-uuid"/g' "$tf_file" + # Replace duplicate resource name + sed -i.bak '1,/resource "equinix_metal_reserved_ip_block" "test"/ s/resource "equinix_metal_reserved_ip_block" "test"/resource "equinix_metal_reserved_ip_block" "test1"/g' "$tf_file" + # Replace - with _ in resource names + sed -i.bak 's/test-public-key/test_public_key/g' "$tf_file" + sed -i.bak 's/"csr1000v-ha"/"csr1000v_ha"/g' "$tf_file" + sed -i.bak 's/"panw-cluster"/"panw_cluster"/g' "$tf_file" + sed -i.bak 's/"aviatrix-single"/"aviatrix_single"/g' "$tf_file" + sed -i.bak 's/aviatrix-cloudinit-file/aviatrix_cloudinit_file/g' "$tf_file" + sed -i.bak 's/bluecat-edge-service-point-cloudinit-primary-file/bluecat_edge_service_point_cloudinit_primary_file/g' "$tf_file" + sed -i.bak 's/bluecat-edge-service-point-cloudinit-secondary-file/bluecat_edge_service_point_cloudinit_secondary_file/g' "$tf_file" + sed -i.bak 's/"bluecat-edge-service-point-ha"/"bluecat_edge_service_point_ha"/g' "$tf_file" + sed -i.bak 's/"bluecat-bdds-ha"/"bluecat_bdds_ha"/g' "$tf_file" + sed -i.bak 's/"arista-ha"/"arista_ha"/g' "$tf_file" + sed -i.bak 's/"vsrx-single"/"vsrx_single"/g' "$tf_file" + sed -i.bak 's/"c8kv-single"/"c8kv_single"/g' "$tf_file" + + rm ${tf_file}.bak +} + +# generate pululmi yaml from terraform examples +generate_pulumi_yaml() { + local SOURCE_DIR="${SCRIPT_DIR}/../upstream/examples/resources/" + local DEST_DIR="${SCRIPT_DIR}/../examples/" + + # Loop through subdirectories in the source directory + for example in $(find $SOURCE_DIR -mindepth 1 -maxdepth 1 -type d); do + local example_name=$(basename $example) + IFS='_' read -r -a parts <<< "$example_name" + + # Create the destination directory structure + local service_part=${parts[0]} + local resource_part=$(IFS='_'; echo "${parts[*]:1}") + local target_dir="$DEST_DIR$service_part/$resource_part" + mkdir -p $target_dir + + # Find .tf files and convert them + local tf_files=($example/*.tf) + local tf_count=${#tf_files[@]} + if [ $tf_count -eq 1 ]; then + local tf_file="${tf_files[0]}" + # If there's only one .tf file, the resource_dir is the target_dir + local resource_dir="$target_dir" + local tf_destination_file="$resource_dir/main.tf" + local example_relative_path="${tf_file#$SOURCE_DIR}" + + # Check if the file is in the exclude list + normalized_path="${example_relative_path#/}" + echo "Check if ${normalized_path} should be excluded" + if [[ " ${EXCLUDE_FILES[@]} " =~ " ${normalized_path} " ]]; then + EXCLUDED_FILES+=("$normalized_path") + continue + fi + + # Patch terraform template + cp $tf_file $tf_destination_file + mappings $tf_destination_file + + # Generate Pulumi template + echo -e "\033[0;34m CONVERTING $normalized_path" + pulumi convert --cwd "$resource_dir" --from terraform --language yaml --out $resource_dir --generate-only "${tf_files[0]}" + rm $tf_destination_file + + # Combine Main.yaml and Pulumi.yaml into a single file + if [ -f "$resource_dir/Main.yaml" ] && [ -f "$resource_dir/Pulumi.yaml" ]; then + cat "$resource_dir/Main.yaml" >> "$resource_dir/Pulumi.yaml" + rm $resource_dir/Main.yaml + fi + + # Update the name field in Pulumi.yaml + sed -i.bak "s/^name: \(.*\)/name: equinix-${service_part}-\1/" "$resource_dir/Pulumi.yaml" + rm $resource_dir/Pulumi.yaml.bak + else + # If there are multiple .tf files, process them individually + for tf_file in "${tf_files[@]}"; do + local example_relative_path="${tf_file#$SOURCE_DIR}" + local example_name=$(basename -s .tf $example_relative_path) + echo $example_name + + # Check if the file is in the exclude list + normalized_path="${example_relative_path#/}" + echo "Check if ${normalized_path} should be excluded" + if [[ " ${EXCLUDE_FILES[@]} " =~ " ${normalized_path} " ]]; then + EXCLUDED_FILES+=("$normalized_path") + continue + fi + + if [ -n "$example_name" ]; then + local resource_dir="$target_dir/$example_name" + local tf_destination_file="$resource_dir/main.tf" + + # Patch terraform template + mkdir -p $resource_dir + cp $tf_file $tf_destination_file + mappings $tf_destination_file + + # Execute the Terraform to YAML conversion + echo -e "\033[0;34m CONVERTING $normalized_path" + pulumi convert --cwd "$resource_dir" --from terraform --language yaml --out $resource_dir --generate-only $tf_file + rm $tf_destination_file + + # Combine Main.yaml and Pulumi.yaml into a single file + if [ -f "$resource_dir/Main.yaml" ] && [ -f "$resource_dir/Pulumi.yaml" ]; then + cat "$resource_dir/Main.yaml" >> "$resource_dir/Pulumi.yaml" + rm "$resource_dir/Main.yaml" + fi + + # Update the name field in Pulumi.yaml + sed -i.bak "s/^name: \(.*\)/name: equinix-${service_part}-${resource_part}-\1/" "$resource_dir/Pulumi.yaml" + rm $resource_dir/Pulumi.yaml.bak + fi + done + fi + done +} + +generate_examples_and_docs() { + # Find all Pulumi.yaml files within the examples directory structure + find "$EXAMPLES_DIR" \( -name "go" -o -name "java" -o -name "python" -o -name "typescript" -o -name "csharp" \) -prune -o -name "Pulumi.yaml" -print0 | while IFS= read -r -d '' yaml_file; do + NAME="$(head -n 1 "$yaml_file" | cut -d ' ' -f 2)" + echo "Generating examples and docs for: $NAME" + + # Normalize the NAME by replacing spaces and hyphens with underscores + NORMALIZED_NAME="${NAME// /_}" + NORMALIZED_NAME="${NORMALIZED_NAME//-/_}" + + # Set the directory containing the Pulumi.yaml file + PULUMI_DIR=$(dirname "$yaml_file") + + # Generate the output file name + OUTPUT_FILE="${OUTPUT_DIR}/${NORMALIZED_NAME}.examples.md" + + # Convert Pulumi configurations to all languages + pulumi convert --cwd "$PULUMI_DIR" --language python --out python --generate-only || true + pulumi convert --cwd "$PULUMI_DIR" --language typescript --out typescript --generate-only || true + pulumi convert --cwd "$PULUMI_DIR" --language java --out java --generate-only || true + pulumi convert --cwd "$PULUMI_DIR" --language go --out go || true + pulumi convert --cwd "$PULUMI_DIR" --language csharp --out csharp --generate-only || true + + # Fix version constraints + ## csharp + for file in "$PULUMI_DIR/csharp"/*.csproj; do + echo $file + sed -i.bak "s|$VERSION|(, 1.0.0)|g" "$file" + done + rm $PULUMI_DIR/csharp/*.csproj.bak + + ## java + sed -i.bak "s|$VERSION|(,1.0)|g" $PULUMI_DIR/java/pom.xml + rm $PULUMI_DIR/java/pom.xml.bak + ## python + sed -i.bak "s|$VERSION|<1.0.0|g" $PULUMI_DIR/python/requirements.txt + rm $PULUMI_DIR/python/requirements.txt.bak + ## typescript + sed -i.bak "s|$VERSION|<1.0.0|g" $PULUMI_DIR/typescript/package.json + rm $PULUMI_DIR/typescript/package.json.bak + ## go + sed -i.bak "s|github.com/equinix/pulumi-equinix/sdk [^ ]*|github.com/equinix/pulumi-equinix/sdk $GOLANG_MIN_NEXT_VERSION|g" "$PULUMI_DIR/go/go.mod" + rm $PULUMI_DIR/go/go.sum $PULUMI_DIR/go/go.mod.bak + + # Read each source file + TS_SRC=$(cat "$PULUMI_DIR/typescript/index.ts") + PY_SRC=$(cat "$PULUMI_DIR/python/__main__.py") + GO_SRC=$(cat "$PULUMI_DIR/go/main.go") + CS_SRC=$(cat "$PULUMI_DIR/csharp/Program.cs") + JAVA_SRC=$(cat "$PULUMI_DIR/java/src/main/java/generated_program/App.java") + # Skip first 3 lines of Pulumi.yaml from the specified directory + YAML_SRC=$(tail -n +4 "$PULUMI_DIR/Pulumi.yaml") + + # Generate the markdown in the desired format + OUTPUT=$(cat < "$OUTPUT_FILE" + + echo "Output file generated: $OUTPUT_FILE" + done +} + +# Merge specific example files +merge_example_files() { + local RESULT_FILE_NAME="${1}.examples.md" + local MERGED_FILE="${OUTPUT_DIR}/${RESULT_FILE_NAME}" + + echo "Generating merged example: $RESULT_FILE_NAME" + # Find all example files with the specified prefix in OUTPUT_DIR + local EXAMPLES_TO_MERGE=($(find "$OUTPUT_DIR" -maxdepth 1 -name "${1}_example*.examples.md")) + + local CONTENTS="" + for FILE in "${EXAMPLES_TO_MERGE[@]}"; do + if [[ -f "$FILE" ]]; then + # Read the content of the individual files + local NAME=$(basename "$FILE" .examples.md) + local SHORT_NAME="${NAME##${1}_}" + local FILE_CONTENT=$(sed '1,2d;$d' "$FILE") # Remove header and footer lines + CONTENTS+="{{% example %}}\n### ${SHORT_NAME//_/ }\n$FILE_CONTENT\n{{% /example %}}\n\n" + rm "$FILE" # Remove the individual example file after merging its content + fi + done + + # Write the merged content to the output file + echo -e "## Example Usage\n\n$CONTENTS" > "$MERGED_FILE" + echo "Merged file generated: $MERGED_FILE" +} + +## main +generate_pulumi_yaml +generate_examples_and_docs + +merge_example_files "equinix_network_device" +merge_example_files "equinix_fabric_connection" +merge_example_files "equinix_fabric_routing_protocol" +merge_example_files "equinix_metal_device" +merge_example_files "equinix_metal_project" +merge_example_files "equinix_metal_organization_member" +merge_example_files "equinix_metal_connection" +merge_example_files "equinix_metal_gateway" +merge_example_files "equinix_metal_port_vlan_attachment" +merge_example_files "equinix_metal_port" +merge_example_files "equinix_metal_reserved_ip_block" +merge_example_files "equinix_metal_vrf" + +# warning message for excluded files +if [ ${#EXCLUDED_FILES[@]} -gt 0 ]; then + echo -e "\n\033[0;33m Warning:\033[0m The following examples were not converted due to their complexity:" + for excluded_file in "${EXCLUDED_FILES[@]}"; do + echo " - $excluded_file" + done + echo "Please manually update the Pulumi.yaml file for these resources in their respective directories in the examples section if any updates are expected." +fi \ No newline at end of file diff --git a/sdk/dotnet/Fabric/CloudRouter.cs b/sdk/dotnet/Fabric/CloudRouter.cs index 453896b2..68c057b5 100644 --- a/sdk/dotnet/Fabric/CloudRouter.cs +++ b/sdk/dotnet/Fabric/CloudRouter.cs @@ -25,21 +25,10 @@ namespace Pulumi.Equinix.Fabric /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var metro = config.Get("metro") ?? "FR"; - /// var accountNum = config.RequireInt32("accountNum"); - /// var router = new Equinix.Fabric.CloudRouter("router", new() + /// var newCloudRouter = new Equinix.Fabric.CloudRouter("newCloudRouter", new() /// { - /// Name = "My-Fabric-Cloud-Router", + /// Name = "Router-SV", /// Type = "XF_ROUTER", - /// Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs - /// { - /// MetroCode = metro, - /// }, - /// Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs - /// { - /// Code = "BASIC", - /// }, /// Notifications = new[] /// { /// new Equinix.Fabric.Inputs.CloudRouterNotificationArgs @@ -48,23 +37,32 @@ namespace Pulumi.Equinix.Fabric /// Emails = new[] /// { /// "example@equinix.com", + /// "test1@equinix.com", /// }, /// }, /// }, - /// Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs + /// Order = new Equinix.Fabric.Inputs.CloudRouterOrderArgs /// { - /// AccountNumber = 272010, + /// PurchaseOrderNumber = "1-323292", + /// }, + /// Location = new Equinix.Fabric.Inputs.CloudRouterLocationArgs + /// { + /// MetroCode = "SV", + /// }, + /// Package = new Equinix.Fabric.Inputs.CloudRouterPackageArgs + /// { + /// Code = "STANDARD", /// }, /// Project = new Equinix.Fabric.Inputs.CloudRouterProjectArgs /// { - /// ProjectId = "995072000433550", + /// ProjectId = "776847000642406", + /// }, + /// Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs + /// { + /// AccountNumber = 203612, /// }, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["routerId"] = router.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Fabric/Connection.cs b/sdk/dotnet/Fabric/Connection.cs index 87b9c186..23f3132c 100644 --- a/sdk/dotnet/Fabric/Connection.cs +++ b/sdk/dotnet/Fabric/Connection.cs @@ -11,73 +11,959 @@ namespace Pulumi.Equinix.Fabric { /// /// ## Example Usage + /// ### example 9 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var metro = config.Get("metro") ?? "FR"; - /// var speedInMbps = config.GetNumber("speedInMbps") ?? 50; - /// var fabricPortName = config.Require("fabricPortName"); - /// var awsRegion = config.Get("awsRegion") ?? "eu-central-1"; - /// var awsAccountId = config.Require("awsAccountId"); - /// var serviceProfileId = Equinix.Fabric.GetServiceProfiles.Invoke(new() + /// var fcr2Azure = new Equinix.Fabric.Connection("fcr2azure", new() /// { - /// Filter = new Equinix.Fabric.Inputs.GetServiceProfilesFilterInputArgs + /// Name = "ConnectionName", + /// Type = "IP_VC", + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = "CLOUD_ROUTER", + /// Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + /// { + /// Uuid = "<cloud_router_uuid>", + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.SP, + /// AuthenticationKey = "<Azure_ExpressRouter_Auth_Key>", + /// PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + /// Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + /// { + /// Type = Equinix.Fabric.ProfileType.L2Profile, + /// Uuid = "<Azure_Service_Profile_UUID>", + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 5 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vd2Port = new Equinix.Fabric.Connection("vd2port", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.VD, + /// VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + /// { + /// Type = "EDGE", + /// Uuid = "<device_uuid>", + /// }, + /// Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + /// { + /// Type = "NETWORK", + /// Id = 7, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + /// { + /// Uuid = "<zside_port_uuid>", + /// }, + /// LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + /// { + /// Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + /// VlanSTag = 3711, + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 12 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var fcr2Network = new Equinix.Fabric.Connection("fcr2network", new() + /// { + /// Name = "ConnectionName", + /// Type = "IPWAN_VC", + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = "CLOUD_ROUTER", + /// Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + /// { + /// Uuid = "<cloud_router_uuid>", + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Network, + /// Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + /// { + /// Uuid = "<network_uuid>", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 11 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vd2AzurePrimary = new Equinix.Fabric.Connection("vd2azurePrimary", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, + /// Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + /// { + /// Priority = "PRIMARY", + /// }, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.VD, + /// VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + /// { + /// Type = "EDGE", + /// Uuid = "<device_uuid>", + /// }, + /// Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + /// { + /// Type = "CLOUD", + /// Id = 7, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.SP, + /// AuthenticationKey = "<Azure_ExpressRouter_Auth_Key>", + /// PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + /// Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + /// { + /// Type = Equinix.Fabric.ProfileType.L2Profile, + /// Uuid = "<Azure_Service_Profile_UUID>", + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// }); + /// + /// var vd2AzureSecondary = new Equinix.Fabric.Connection("vd2azureSecondary", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, + /// Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs + /// { + /// Priority = "SECONDARY", + /// Group = vd2AzurePrimary.Redundancy.Apply(redundancy => redundancy?.Group), + /// }, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.VD, + /// VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + /// { + /// Type = "EDGE", + /// Uuid = "<device_uuid>", + /// }, + /// Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + /// { + /// Type = "CLOUD", + /// Id = 5, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.SP, + /// AuthenticationKey = "<Azure_ExpressRouter_Auth_Key>", + /// PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, + /// Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + /// { + /// Type = Equinix.Fabric.ProfileType.L2Profile, + /// Uuid = "<Azure_Service_Profile_UUID>", + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 6 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vd2Token = new Equinix.Fabric.Connection("vd2token", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.VD, + /// VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + /// { + /// Type = "EDGE", + /// Uuid = "<device_uuid>", + /// }, + /// Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + /// { + /// Type = "NETWORK", + /// Id = 7, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// ServiceToken = new Equinix.Fabric.Inputs.ConnectionZSideServiceTokenArgs + /// { + /// Uuid = "<service_token_uuid>", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 3 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var epl = new Equinix.Fabric.Connection("epl", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EPL, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + /// { + /// Uuid = "<aside_port_uuid>", + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + /// { + /// Uuid = "<zside_port_uuid>", + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 14 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var epl = new Equinix.Fabric.Connection("epl", new() + /// { + /// Name = "ConnectionName", + /// Type = "EPLAN_VC", + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + /// { + /// Uuid = "<aside_port_uuid>", + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Network, + /// Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + /// { + /// Uuid = "<network_uuid>", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 4 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var accessEplVc = new Equinix.Fabric.Connection("accessEplVc", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.AccessEPL, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + /// { + /// Uuid = "<aside_port_uuid>", + /// }, + /// LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + /// { + /// Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + /// VlanSTag = 1976, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + /// { + /// Uuid = "<zside_port_uuid>", + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 13 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vd2Token = new Equinix.Fabric.Connection("vd2token", new() + /// { + /// Name = "ConnectionName", + /// Type = "EVPLAN_VC", + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.VD, + /// VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + /// { + /// Type = "EDGE", + /// Uuid = "<device_uuid>", + /// }, + /// Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + /// { + /// Type = "CLOUD", + /// Id = 7, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Network, + /// Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + /// { + /// Uuid = "<network_uuid>", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 1 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var port2Port = new Equinix.Fabric.Connection("port2port", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + /// { + /// Uuid = "<aside_port_uuid>", + /// }, + /// LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + /// { + /// Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + /// VlanSTag = 1976, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs /// { - /// Property = "/name", - /// Operator = "=", - /// Values = new[] + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs /// { - /// "AWS Direct Connect", + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + /// { + /// Uuid = "<zside_port_uuid>", + /// }, + /// LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + /// { + /// Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + /// VlanSTag = 3711, + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, /// }, /// }, - /// }).Apply(invoke => invoke.Data[0]?.Uuid); + /// }); + /// + /// }); + /// ``` + /// ### example 8 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; /// - /// var portId = Equinix.Fabric.GetPorts.Invoke(new() + /// return await Deployment.RunAsync(() => + /// { + /// var fcr2Port = new Equinix.Fabric.Connection("fcr2port", new() /// { - /// Filter = new Equinix.Fabric.Inputs.GetPortsFilterInputArgs + /// Name = "ConnectionName", + /// Type = "IP_VC", + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = "CLOUD_ROUTER", + /// Router = new Equinix.Fabric.Inputs.ConnectionASideAccessPointRouterArgs + /// { + /// Uuid = "<cloud_router_uuid>", + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs /// { - /// Name = fabricPortName, + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointPortArgs + /// { + /// Uuid = "<port_uuid>", + /// }, + /// LinkProtocol = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLinkProtocolArgs + /// { + /// Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + /// VlanTag = 2711, + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, /// }, - /// }).Apply(invoke => invoke.Data[0]?.Uuid); + /// }); + /// + /// }); + /// ``` + /// ### example 2 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; /// - /// var colo2Aws = new Equinix.Fabric.Connection("colo2Aws", new() + /// return await Deployment.RunAsync(() => + /// { + /// var port2Aws = new Equinix.Fabric.Connection("port2aws", new() /// { - /// Name = "Pulumi-colo2Aws", - /// Type = "EVPL_VC", + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, /// Notifications = new[] /// { /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs /// { - /// Type = "ALL", + /// Type = Equinix.Fabric.NotificationsType.All, /// Emails = new[] /// { /// "example@equinix.com", + /// "test1@equinix.com", /// }, /// }, /// }, - /// Bandwidth = speedInMbps, + /// Bandwidth = 50, /// Redundancy = new Equinix.Fabric.Inputs.ConnectionRedundancyArgs /// { /// Priority = "PRIMARY", /// }, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323929", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Colo, + /// Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs + /// { + /// Uuid = "<aside_port_uuid>", + /// }, + /// LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs + /// { + /// Type = Equinix.Fabric.AccessPointLinkProtocolType.QinQ, + /// VlanSTag = 2019, + /// VlanCTag = 2112, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.SP, + /// AuthenticationKey = "<aws_account_id>", + /// SellerRegion = "us-west-1", + /// Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + /// { + /// Type = Equinix.Fabric.ProfileType.L2Profile, + /// Uuid = "<service_profile_uuid>", + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// AdditionalInfo = new[] + /// { + /// + /// { + /// { "key", "accessKey" }, + /// { "value", "<aws_access_key>" }, + /// }, + /// + /// { + /// { "key", "secretKey" }, + /// { "value", "<aws_secret_key>" }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 15 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var epl = new Equinix.Fabric.Connection("epl", new() + /// { + /// Name = "ConnectionName", + /// Type = "EVPLAN_VC", + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs /// { /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs /// { - /// Type = "COLO", + /// Type = Equinix.Fabric.AccessPointType.Colo, /// Port = new Equinix.Fabric.Inputs.ConnectionASideAccessPointPortArgs /// { - /// Uuid = portId, + /// Uuid = "<aside_port_uuid>", /// }, /// LinkProtocol = new Equinix.Fabric.Inputs.ConnectionASideAccessPointLinkProtocolArgs /// { - /// Type = "DOT1Q", - /// VlanTag = 1234, + /// Type = Equinix.Fabric.AccessPointLinkProtocolType.Dot1q, + /// VlanSTag = 1976, + /// }, + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.Network, + /// Network = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointNetworkArgs + /// { + /// Uuid = "<network_uuid>", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 10 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vd2Azure = new Equinix.Fabric.Connection("vd2azure", new() + /// { + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionASideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.VD, + /// VirtualDevice = new Equinix.Fabric.Inputs.ConnectionASideAccessPointVirtualDeviceArgs + /// { + /// Type = "EDGE", + /// Uuid = "<device_uuid>", + /// }, + /// Interface = new Equinix.Fabric.Inputs.ConnectionASideAccessPointInterfaceArgs + /// { + /// Type = "CLOUD", + /// Id = 7, /// }, /// }, /// }, @@ -85,29 +971,81 @@ namespace Pulumi.Equinix.Fabric /// { /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs /// { - /// Type = "SP", - /// AuthenticationKey = awsAccountId, - /// SellerRegion = awsRegion, + /// Type = Equinix.Fabric.AccessPointType.SP, + /// AuthenticationKey = "<Azure_ExpressRouter_Auth_Key>", + /// PeeringType = Equinix.Fabric.AccessPointPeeringType.Private, /// Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs /// { - /// Type = "L2_PROFILE", - /// Uuid = serviceProfileId, + /// Type = Equinix.Fabric.ProfileType.L2Profile, + /// Uuid = "<Azure_Service_Profile_UUID>", /// }, /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs /// { - /// MetroCode = metro, + /// MetroCode = Equinix.Metro.SiliconValley, /// }, /// }, /// }, /// }); /// - /// return new Dictionary<string, object?> + /// }); + /// ``` + /// ### example 7 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var token2Aws = new Equinix.Fabric.Connection("token2aws", new() /// { - /// ["connectionId"] = colo2Aws.Id, - /// ["connectionStatus"] = colo2Aws.Operation.Apply(operation => operation.EquinixStatus), - /// ["connectionProviderStatus"] = colo2Aws.Operation.Apply(operation => operation.ProviderStatus), - /// ["awsDirectConnectId"] = colo2Aws.ZSide.Apply(zSide => zSide.AccessPoint?.ProviderConnectionId), - /// }; + /// Name = "ConnectionName", + /// Type = Equinix.Fabric.ConnectionType.EVPL, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ConnectionNotificationArgs + /// { + /// Type = Equinix.Fabric.NotificationsType.All, + /// Emails = new[] + /// { + /// "example@equinix.com", + /// "test1@equinix.com", + /// }, + /// }, + /// }, + /// Bandwidth = 50, + /// Order = new Equinix.Fabric.Inputs.ConnectionOrderArgs + /// { + /// PurchaseOrderNumber = "1-323292", + /// }, + /// ASide = new Equinix.Fabric.Inputs.ConnectionASideArgs + /// { + /// ServiceToken = new Equinix.Fabric.Inputs.ConnectionASideServiceTokenArgs + /// { + /// Uuid = "<service_token_uuid>", + /// }, + /// }, + /// ZSide = new Equinix.Fabric.Inputs.ConnectionZSideArgs + /// { + /// AccessPoint = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointArgs + /// { + /// Type = Equinix.Fabric.AccessPointType.SP, + /// AuthenticationKey = "<aws_account_id>", + /// SellerRegion = "us-west-1", + /// Profile = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointProfileArgs + /// { + /// Type = Equinix.Fabric.ProfileType.L2Profile, + /// Uuid = "<service_profile_uuid>", + /// }, + /// Location = new Equinix.Fabric.Inputs.ConnectionZSideAccessPointLocationArgs + /// { + /// MetroCode = Equinix.Metro.SiliconValley, + /// }, + /// }, + /// }, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Fabric/RoutingProtocol.cs b/sdk/dotnet/Fabric/RoutingProtocol.cs index d357fd1e..69dc937b 100644 --- a/sdk/dotnet/Fabric/RoutingProtocol.cs +++ b/sdk/dotnet/Fabric/RoutingProtocol.cs @@ -17,6 +17,7 @@ namespace Pulumi.Equinix.Fabric /// * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols /// /// ## Example Usage + /// ### example 3 /// ```csharp /// using System.Collections.Generic; /// using System.Linq; @@ -25,25 +26,100 @@ namespace Pulumi.Equinix.Fabric /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var connectionId = config.Require("connectionId"); - /// var routingProtocol = new Equinix.Fabric.RoutingProtocol("RoutingProtocol", new() + /// var direct = new Equinix.Fabric.RoutingProtocol("direct", new() /// { - /// ConnectionUuid = connectionId, - /// Name = "My-Direct-route-1", + /// ConnectionUuid = "<some_id>", /// Type = "DIRECT", + /// Name = "direct_rp", /// DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args /// { - /// EquinixIfaceIp = "192.168.100.1/30", + /// EquinixIfaceIp = "190.1.1.1/30", + /// }, + /// DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args + /// { + /// EquinixIfaceIp = "190::1:1/126", + /// }, + /// }); + /// + /// var bgp = new Equinix.Fabric.RoutingProtocol("bgp", new() + /// { + /// ConnectionUuid = "<same_connection_id_as_first_equinix_fabric_routing_protocol>", + /// Type = "BGP", + /// Name = "bgp_rp", + /// BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args + /// { + /// CustomerPeerIp = "190.1.1.2", + /// Enabled = true, + /// }, + /// BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args + /// { + /// CustomerPeerIp = "190::1:2", + /// Enabled = true, + /// }, + /// CustomerAsn = 4532, + /// }, new CustomResourceOptions + /// { + /// DependsOn = + /// { + /// direct, /// }, /// }); /// - /// return new Dictionary<string, object?> + /// }); + /// ``` + /// ### example 1 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var direct = new Equinix.Fabric.RoutingProtocol("direct", new() /// { - /// ["routingProtocolId"] = routingProtocol.Id, - /// ["routingProtocolState"] = routingProtocol.State, - /// ["routingProtocolEquinixAsn"] = routingProtocol.EquinixAsn, - /// }; + /// ConnectionUuid = "<some_id>", + /// Type = "DIRECT", + /// Name = "direct_rp", + /// DirectIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv4Args + /// { + /// EquinixIfaceIp = "190.1.1.1/30", + /// }, + /// DirectIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolDirectIpv6Args + /// { + /// EquinixIfaceIp = "190::1:1/126", + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 2 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var bgp = new Equinix.Fabric.RoutingProtocol("bgp", new() + /// { + /// ConnectionUuid = "<same_connection_id_as_first_equinix_fabric_routing_protocol>", + /// Type = "BGP", + /// Name = "bgp_rp", + /// BgpIpv4 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv4Args + /// { + /// CustomerPeerIp = "190.1.1.2", + /// Enabled = true, + /// }, + /// BgpIpv6 = new Equinix.Fabric.Inputs.RoutingProtocolBgpIpv6Args + /// { + /// CustomerPeerIp = "190::1:2", + /// Enabled = true, + /// }, + /// CustomerAsn = 4532, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Fabric/ServiceProfile.cs b/sdk/dotnet/Fabric/ServiceProfile.cs index 47bd1eff..69490807 100644 --- a/sdk/dotnet/Fabric/ServiceProfile.cs +++ b/sdk/dotnet/Fabric/ServiceProfile.cs @@ -19,70 +19,62 @@ namespace Pulumi.Equinix.Fabric /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var profile = new Equinix.Fabric.ServiceProfile("profile", new() + /// var newServiceProfile = new Equinix.Fabric.ServiceProfile("newServiceProfile", new() /// { - /// Name = "Example Cloud Provider", - /// Description = "50 to 500 Mbps Hosted Connection to Example Cloud", - /// Type = "L2_PROFILE", + /// Description = "Service Profile for Receiving Connections", + /// Name = "Name Of Business + Use Case Tag", + /// Type = Equinix.Fabric.ProfileType.L2Profile, + /// Visibility = Equinix.Fabric.ProfileVisibility.Public, + /// Notifications = new[] + /// { + /// new Equinix.Fabric.Inputs.ServiceProfileNotificationArgs + /// { + /// Emails = new[] + /// { + /// "someone@sample.com", + /// }, + /// Type = "BANDWIDTH_ALERT", + /// }, + /// }, + /// AllowedEmails = new[] + /// { + /// "test@equinix.com", + /// "testagain@equinix.com", + /// }, + /// Ports = new[] + /// { + /// new Equinix.Fabric.Inputs.ServiceProfilePortArgs + /// { + /// Uuid = "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee", + /// Type = "XF_PORT", + /// }, + /// }, /// AccessPointTypeConfigs = new[] /// { /// new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigArgs /// { - /// Type = "COLO", + /// Type = Equinix.Fabric.ProfileAccessPointType.Colo, + /// AllowRemoteConnections = true, + /// AllowCustomBandwidth = true, + /// AllowBandwidthAutoApproval = false, + /// ConnectionRedundancyRequired = false, + /// ConnectionLabel = "Service Profile Tag1", + /// BandwidthAlertThreshold = 10, /// SupportedBandwidths = new[] /// { - /// 50, /// 100, - /// 200, /// 500, /// }, - /// AllowRemoteConnections = true, - /// AllowCustomBandwidth = false, - /// AllowBandwidthAutoApproval = false, - /// LinkProtocolConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs - /// { - /// EncapsulationStrategy = "CTAGED", - /// ReuseVlanSTag = false, - /// Encapsulation = "DOT1Q", - /// }, - /// EnableAutoGenerateServiceKey = "false,", - /// ConnectionRedundancyRequired = "false,", - /// ApiConfig = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs - /// { - /// ApiAvailable = true, - /// IntegrationId = "Example-Connect-01", - /// BandwidthFromApi = false, - /// }, - /// ConnectionLabel = "Virtual Circuit Name", - /// AuthenticationKey = new Equinix.Fabric.Inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs - /// { - /// Required = true, - /// Label = "Example ACCOUNT ID", - /// }, /// }, /// }, - /// Account = new Equinix.Fabric.Inputs.ServiceProfileAccountArgs - /// { - /// OrganizationName = "Example Cloud", - /// GlobalOrganizationName = "Example Global", - /// }, - /// Metros = null, - /// Visibility = "PUBLIC", - /// MarketingInfo = new Equinix.Fabric.Inputs.ServiceProfileMarketingInfoArgs - /// { - /// Promotion = true, - /// }, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["profileId"] = profile.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/BgpSession.cs b/sdk/dotnet/Metal/BgpSession.cs index 49e3c74a..c8c367af 100644 --- a/sdk/dotnet/Metal/BgpSession.cs +++ b/sdk/dotnet/Metal/BgpSession.cs @@ -19,23 +19,91 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; + /// using Null = Pulumi.Null; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var deviceId = config.Require("deviceId"); - /// var bgp = new Equinix.Metal.BgpSession("bgp", new() + /// var bgpPassword = "955dB0b81Ef"; + /// + /// var projectId = "<UUID_of_your_project>"; + /// + /// var addr = new Equinix.Metal.ReservedIpBlock("addr", new() + /// { + /// ProjectId = projectId, + /// Metro = "ny", + /// Quantity = 1, + /// }); + /// + /// var interfaceLo0 = Output.Tuple(addr.Address, addr.Netmask).Apply(values => + /// { + /// var address = values.Item1; + /// var netmask = values.Item2; + /// return @$"auto lo:0 + /// iface lo:0 inet static + /// address {address} + /// netmask {netmask} + /// "; + /// }); + /// + /// var test = new Equinix.Metal.Device("test", new() /// { - /// DeviceId = deviceId, + /// Hostname = "terraform-test-bgp-sesh", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "ny", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, + /// }); + /// + /// var birdConf = Output.Tuple(addr.Address, addr.Cidr, test.Network, test.Network).Apply(values => + /// { + /// var address = values.Item1; + /// var cidr = values.Item2; + /// var testNetwork = values.Item3; + /// var testNetwork1 = values.Item4; + /// return @$"filter equinix_metal_bgp {{ + /// if net = {address}/{cidr} then accept; + /// }} + /// router id {testNetwork[2].Address}; + /// protocol direct {{ + /// interface ""lo""; + /// }} + /// protocol kernel {{ + /// scan time 10; + /// persist; + /// import all; + /// export all; + /// }} + /// protocol device {{ + /// scan time 10; + /// }} + /// protocol bgp {{ + /// export filter equinix_metal_bgp; + /// local as 65000; + /// neighbor {testNetwork1[2].Gateway} as 65530; + /// password ""{bgpPassword}""; + /// }} + /// "; + /// }); + /// + /// var testBgpSession = new Equinix.Metal.BgpSession("testBgpSession", new() + /// { + /// DeviceId = test.Id, /// AddressFamily = "ipv4", /// }); /// - /// return new Dictionary<string, object?> + /// var configureBird = new Null.Resource("configureBird", new() /// { - /// ["bgpSessionStatus"] = bgp.Status, - /// }; + /// Triggers = + /// { + /// { "bird_conf", birdConf }, + /// { "interface", interfaceLo0 }, + /// }, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/Device.cs b/sdk/dotnet/Metal/Device.cs index d57307a6..af73283e 100644 --- a/sdk/dotnet/Metal/Device.cs +++ b/sdk/dotnet/Metal/Device.cs @@ -15,29 +15,187 @@ namespace Pulumi.Equinix.Metal /// > **NOTE:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. Read more about sensitive data in state. /// /// ## Example Usage + /// ### example 1 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var web = new Equinix.Metal.Device("web", new() + /// var web1 = new Equinix.Metal.Device("web1", new() /// { - /// Hostname = "webserver1", - /// Plan = "c3.small.x86", - /// OperatingSystem = "ubuntu_20_04", + /// Hostname = "tf.coreos2", + /// Plan = Equinix.Metal.Plan.C3SmallX86, /// Metro = "sv", - /// BillingCycle = "hourly", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, /// ProjectId = projectId, /// }); /// - /// return new Dictionary<string, object?> + /// }); + /// ``` + /// ### example 4 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var web1 = new Equinix.Metal.Device("web1", new() + /// { + /// Hostname = "tftest", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "ny", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, + /// HardwareReservationId = "next-available", + /// Storage = @"{ + /// ""disks"": [ + /// { + /// ""device"": ""/dev/sda"", + /// ""wipeTable"": true, + /// ""partitions"": [ + /// { + /// ""label"": ""BIOS"", + /// ""number"": 1, + /// ""size"": ""4096"" + /// }, + /// { + /// ""label"": ""SWAP"", + /// ""number"": 2, + /// ""size"": ""3993600"" + /// }, + /// { + /// ""label"": ""ROOT"", + /// ""number"": 3, + /// ""size"": ""0"" + /// } + /// ] + /// } + /// ], + /// ""filesystems"": [ + /// { + /// ""mount"": { + /// ""device"": ""/dev/sda3"", + /// ""format"": ""ext4"", + /// ""point"": ""/"", + /// ""create"": { + /// ""options"": [ + /// ""-L"", + /// ""ROOT"" + /// ] + /// } + /// } + /// }, + /// { + /// ""mount"": { + /// ""device"": ""/dev/sda2"", + /// ""format"": ""swap"", + /// ""point"": ""none"", + /// ""create"": { + /// ""options"": [ + /// ""-L"", + /// ""SWAP"" + /// ] + /// } + /// } + /// } + /// ] + /// } + /// ", + /// }); + /// + /// }); + /// ``` + /// ### example 2 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var pxe1 = new Equinix.Metal.Device("pxe1", new() + /// { + /// Hostname = "tf.coreos2-pxe", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "sv", + /// OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, + /// IpxeScriptUrl = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + /// AlwaysPxe = false, + /// UserData = example.Rendered, + /// }); + /// + /// }); + /// ``` + /// ### example 5 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var pxe1 = new Equinix.Metal.Device("pxe1", new() + /// { + /// Hostname = "tf.coreos2-pxe", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "sv", + /// OperatingSystem = Equinix.Metal.OperatingSystem.CustomIPXE, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, + /// IpxeScriptUrl = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe", + /// AlwaysPxe = false, + /// UserData = userData, + /// CustomData = customData, + /// Behavior = new Equinix.Metal.Inputs.DeviceBehaviorArgs + /// { + /// AllowChanges = new[] + /// { + /// "custom_data", + /// "user_data", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 3 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var web1 = new Equinix.Metal.Device("web1", new() /// { - /// ["webPublicIp"] = web.AccessPublicIpv4.Apply(accessPublicIpv4 => $"http://{accessPublicIpv4}"), - /// }; + /// Hostname = "tf.coreos2", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "ny", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, + /// IpAddresses = new[] + /// { + /// new Equinix.Metal.Inputs.DeviceIpAddressArgs + /// { + /// Type = "private_ipv4", + /// Cidr = 30, + /// }, + /// }, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/DeviceNetworkType.cs b/sdk/dotnet/Metal/DeviceNetworkType.cs index 76118f98..9d409b80 100644 --- a/sdk/dotnet/Metal/DeviceNetworkType.cs +++ b/sdk/dotnet/Metal/DeviceNetworkType.cs @@ -13,6 +13,7 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// diff --git a/sdk/dotnet/Metal/Gateway.cs b/sdk/dotnet/Metal/Gateway.cs index 6bcbd309..145c2ef3 100644 --- a/sdk/dotnet/Metal/Gateway.cs +++ b/sdk/dotnet/Metal/Gateway.cs @@ -15,27 +15,61 @@ namespace Pulumi.Equinix.Metal /// See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. /// /// ## Example Usage + /// ### example 1 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var vlanId = config.Require("vlanId"); - /// var gateway = new Equinix.Metal.Gateway("gateway", new() + /// var test = new Equinix.Metal.Vlan("test", new() /// { + /// Description = "test VLAN in SV", + /// Metro = "sv", /// ProjectId = projectId, - /// VlanId = vlanId, + /// }); + /// + /// var testGateway = new Equinix.Metal.Gateway("testGateway", new() + /// { + /// ProjectId = projectId, + /// VlanId = test.Id, /// PrivateIpv4SubnetSize = 8, /// }); /// - /// return new Dictionary<string, object?> + /// }); + /// ``` + /// ### example 2 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new Equinix.Metal.Vlan("test", new() + /// { + /// Description = "test VLAN in SV", + /// Metro = "sv", + /// ProjectId = projectId, + /// }); + /// + /// var test1 = new Equinix.Metal.ReservedIpBlock("test1", new() + /// { + /// ProjectId = projectId, + /// Metro = "sv", + /// Quantity = 8, + /// }); + /// + /// var testGateway = new Equinix.Metal.Gateway("testGateway", new() /// { - /// ["gatewayState"] = gateway.State, - /// }; + /// ProjectId = projectId, + /// VlanId = test.Id, + /// IpReservationId = testEquinixMetalReservedIpBlock.Id, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/Interconnection.cs b/sdk/dotnet/Metal/Interconnection.cs index e0b5e4bf..c11ef3ec 100644 --- a/sdk/dotnet/Metal/Interconnection.cs +++ b/sdk/dotnet/Metal/Interconnection.cs @@ -15,8 +15,10 @@ namespace Pulumi.Equinix.Metal /// > Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization. /// /// ## Example Usage + /// ### example metal billed token /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// @@ -25,7 +27,38 @@ namespace Pulumi.Equinix.Metal /// var config = new Config(); /// var projectId = config.Require("projectId"); /// var metro = config.Get("metro") ?? "SV"; - /// var speedInMbps = config.GetNumber("speedInMbps") ?? 200; + /// var speedInMbps = config.GetInt32("speedInMbps") ?? 1000; + /// var connection = new Equinix.Metal.Interconnection("connection", new() + /// { + /// Name = "metal-to-cloudprovider", + /// ProjectId = projectId, + /// Type = "shared", + /// Redundancy = "primary", + /// Metro = metro, + /// Speed = $"{speedInMbps}Mbps", + /// ServiceTokenType = "a_side", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["connectionStatus"] = connection.Status, + /// ["connectionTokens"] = connection.ServiceTokens, + /// }; + /// }); + /// ``` + /// ### example fabric billed token + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var projectId = config.Require("projectId"); + /// var metro = config.Get("metro") ?? "SV"; + /// var speedInMbps = config.GetInt32("speedInMbps") ?? 200; /// var connection = new Equinix.Metal.Interconnection("connection", new() /// { /// Name = "fabric-port-to-metal", diff --git a/sdk/dotnet/Metal/IpAttachment.cs b/sdk/dotnet/Metal/IpAttachment.cs index eb4a892a..9466b7d4 100644 --- a/sdk/dotnet/Metal/IpAttachment.cs +++ b/sdk/dotnet/Metal/IpAttachment.cs @@ -21,25 +21,38 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; + /// using Std = Pulumi.Std; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var deviceId = config.Require("deviceId"); - /// var subnetCidr = config.Get("subnetCidr") ?? "147.229.10.152/31"; - /// var ipAttachResource = new Equinix.Metal.IpAttachment("ipAttach", new() + /// var myblock = new Equinix.Metal.ReservedIpBlock("myblock", new() /// { - /// DeviceId = deviceId, - /// CidrNotation = subnetCidr, + /// ProjectId = projectId, + /// Metro = "ny", + /// Quantity = 2, /// }); /// - /// return new Dictionary<string, object?> + /// var firstAddressAssignment = new Equinix.Metal.IpAttachment("firstAddressAssignment", new() /// { - /// ["ipAttach"] = ipAttachResource.Id, - /// ["ipNetmask"] = ipAttachResource.Netmask, - /// }; + /// DeviceId = mydevice.Id, + /// CidrNotation = Std.Cidrhost.Invoke(new() + /// { + /// Input = myblockMetalReservedIpBlock.CidrNotation, + /// Host = 0, + /// }).Apply(invoke => Std.Join.Invoke(new() + /// { + /// Separator = "/", + /// Input = new[] + /// { + /// invoke.Result, + /// "32", + /// }, + /// })).Apply(invoke => invoke.Result), + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/Organization.cs b/sdk/dotnet/Metal/Organization.cs index eb405f61..e7c7f49b 100644 --- a/sdk/dotnet/Metal/Organization.cs +++ b/sdk/dotnet/Metal/Organization.cs @@ -15,28 +15,18 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var orgResource = new Equinix.Metal.Organization("org", new() + /// var tfOrganization1 = new Equinix.Metal.Organization("tfOrganization1", new() /// { - /// Name = "Foo Organization", - /// Address = new Equinix.Metal.Inputs.OrganizationAddressArgs - /// { - /// Address = "org street", - /// City = "london", - /// Country = "GB", - /// ZipCode = "12345", - /// }, - /// Description = "An organization", + /// Name = "foobar", + /// Description = "quux", /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["org"] = orgResource.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/OrganizationMember.cs b/sdk/dotnet/Metal/OrganizationMember.cs index 64660507..a4ebf1ed 100644 --- a/sdk/dotnet/Metal/OrganizationMember.cs +++ b/sdk/dotnet/Metal/OrganizationMember.cs @@ -13,20 +13,40 @@ namespace Pulumi.Equinix.Metal /// Manage the membership of existing and new invitees within an Equinix Metal organization and its projects. /// /// ## Example Usage + /// ### example 2 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var owner = new Equinix.Metal.OrganizationMember("owner", new() + /// { + /// Invitee = "admin@example.com", + /// Roles = new[] + /// { + /// "owner", + /// }, + /// ProjectsIds = new[] {}, + /// OrganizationId = organizationId, + /// }); + /// + /// }); + /// ``` + /// ### example 1 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var organizationId = config.Require("organizationId"); - /// var projectId = config.Require("projectId"); - /// var userEmailAddress = config.Require("userEmailAddress"); /// var member = new Equinix.Metal.OrganizationMember("member", new() /// { - /// Invitee = userEmailAddress, + /// Invitee = "member@example.com", /// Roles = new[] /// { /// "limited_collaborator", @@ -38,11 +58,6 @@ namespace Pulumi.Equinix.Metal /// OrganizationId = organizationId, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["memberId"] = member.Id, - /// ["memberState"] = member.State, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/Port.cs b/sdk/dotnet/Metal/Port.cs index 9db1c0bd..f0e634b0 100644 --- a/sdk/dotnet/Metal/Port.cs +++ b/sdk/dotnet/Metal/Port.cs @@ -9,32 +9,6 @@ namespace Pulumi.Equinix.Metal { - /// - /// ## Example Usage - /// ```csharp - /// using System.Collections.Generic; - /// using Pulumi; - /// using Equinix = Pulumi.Equinix; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var config = new Config(); - /// var portId = config.Require("portId"); - /// var org = new Equinix.Metal.Port("org", new() - /// { - /// PortId = portId, - /// Bonded = true, - /// Layer2 = true, - /// }); - /// - /// return new Dictionary<string, object?> - /// { - /// ["portType"] = port.Type, - /// ["portBondedNetworkType"] = port.NetworkType, - /// }; - /// }); - /// ``` - /// [EquinixResourceType("equinix:metal/port:Port")] public partial class Port : global::Pulumi.CustomResource { diff --git a/sdk/dotnet/Metal/PortVlanAttachment.cs b/sdk/dotnet/Metal/PortVlanAttachment.cs index c9262f1b..6e0c35b7 100644 --- a/sdk/dotnet/Metal/PortVlanAttachment.cs +++ b/sdk/dotnet/Metal/PortVlanAttachment.cs @@ -30,29 +30,107 @@ namespace Pulumi.Equinix.Metal /// * `port_id` - UUID of device port. /// /// ## Example Usage + /// ### example 2 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var deviceId = config.Require("deviceId"); - /// var portName = config.Get("portName") ?? "eth1"; - /// var vxlanId = config.GetNumber("vxlanId") ?? 1004; - /// var attach = new Equinix.Metal.PortVlanAttachment("attach", new() + /// var test = new Equinix.Metal.Device("test", new() /// { - /// DeviceId = deviceId, - /// PortName = portName, - /// VlanVnid = vxlanId, + /// Hostname = "test", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "ny", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, /// }); /// - /// return new Dictionary<string, object?> + /// var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new() /// { - /// ["attachId"] = attach.Id, - /// ["portId"] = attach.PortId, - /// }; + /// DeviceId = test.Id, + /// Type = "layer2-individual", + /// }); + /// + /// var test1 = new Equinix.Metal.Vlan("test1", new() + /// { + /// Description = "VLAN in New York", + /// Metro = "ny", + /// ProjectId = projectId, + /// }); + /// + /// var test2 = new Equinix.Metal.Vlan("test2", new() + /// { + /// Description = "VLAN in New Jersey", + /// Metro = "ny", + /// ProjectId = projectId, + /// }); + /// + /// var test1PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test1PortVlanAttachment", new() + /// { + /// DeviceId = testDeviceNetworkType.Id, + /// VlanVnid = test1.Vxlan, + /// PortName = "eth1", + /// }); + /// + /// var test2PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test2PortVlanAttachment", new() + /// { + /// DeviceId = testDeviceNetworkType.Id, + /// VlanVnid = test2.Vxlan, + /// PortName = "eth1", + /// Native = true, + /// }, new CustomResourceOptions + /// { + /// DependsOn = + /// { + /// test1PortVlanAttachment, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 1 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new Equinix.Metal.Vlan("test", new() + /// { + /// Description = "VLAN in New York", + /// Metro = "ny", + /// ProjectId = projectId, + /// }); + /// + /// var testDevice = new Equinix.Metal.Device("testDevice", new() + /// { + /// Hostname = "test", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "ny", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, + /// }); + /// + /// var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new() + /// { + /// DeviceId = testDevice.Id, + /// Type = "hybrid", + /// }); + /// + /// var testPortVlanAttachment = new Equinix.Metal.PortVlanAttachment("testPortVlanAttachment", new() + /// { + /// DeviceId = testDeviceNetworkType.Id, + /// PortName = "eth1", + /// VlanVnid = test.Vxlan, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/Project.cs b/sdk/dotnet/Metal/Project.cs index 955d3ada..2c36cc73 100644 --- a/sdk/dotnet/Metal/Project.cs +++ b/sdk/dotnet/Metal/Project.cs @@ -15,26 +15,64 @@ namespace Pulumi.Equinix.Metal /// > **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix.metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects. /// /// ## Example Usage + /// ### example 3 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var organizationId = config.Require("organizationId"); - /// var name = config.Get("name") ?? "Default Project"; - /// var projectResource = new Equinix.Metal.Project("project", new() + /// var existingProject = new Equinix.Metal.Project("existingProject", new() /// { - /// Name = name, - /// OrganizationId = organizationId, + /// Name = "The name of the project (if different, will rewrite)", + /// BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs + /// { + /// DeploymentType = "local", + /// Md5 = "C179c28c41a85b", + /// Asn = 65000, + /// }, /// }); /// - /// return new Dictionary<string, object?> + /// }); + /// ``` + /// ### example 2 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var tfProject1 = new Equinix.Metal.Project("tfProject1", new() /// { - /// ["projectId"] = projectResource.Id, - /// }; + /// Name = "tftest", + /// BgpConfig = new Equinix.Metal.Inputs.ProjectBgpConfigArgs + /// { + /// DeploymentType = "local", + /// Md5 = "C179c28c41a85b", + /// Asn = 65000, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 1 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var tfProject1 = new Equinix.Metal.Project("tfProject1", new() + /// { + /// Name = "Terraform Fun", + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/ProjectApiKey.cs b/sdk/dotnet/Metal/ProjectApiKey.cs index 6d6ce543..b4bdb8a7 100644 --- a/sdk/dotnet/Metal/ProjectApiKey.cs +++ b/sdk/dotnet/Metal/ProjectApiKey.cs @@ -17,25 +17,19 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var readOnly = config.GetBoolean("readOnly") ?? false; - /// var apiKey = new Equinix.Metal.ProjectApiKey("apiKey", new() + /// var test = new Equinix.Metal.ProjectApiKey("test", new() /// { - /// ProjectId = projectId, - /// Description = "A project level API Key", - /// ReadOnly = readOnly, + /// ProjectId = existingProjectId, + /// Description = "Read-only key scoped to a projct", + /// ReadOnly = true, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["apiKeyToken"] = apiKey.Token, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/ProjectSshKey.cs b/sdk/dotnet/Metal/ProjectSshKey.cs index d1ea41c7..fce57634 100644 --- a/sdk/dotnet/Metal/ProjectSshKey.cs +++ b/sdk/dotnet/Metal/ProjectSshKey.cs @@ -15,25 +15,35 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; - /// using System.IO; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var sshKey = new Equinix.Metal.ProjectSshKey("sshKey", new() + /// var projectId = "<UUID_of_your_project>"; + /// + /// var test = new Equinix.Metal.ProjectSshKey("test", new() /// { + /// Name = "test", + /// PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", /// ProjectId = projectId, - /// Name = "johnKent", - /// PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), /// }); /// - /// return new Dictionary<string, object?> + /// var testDevice = new Equinix.Metal.Device("testDevice", new() /// { - /// ["sshKeyId"] = sshKey.Id, - /// }; + /// Hostname = "test", + /// Plan = Equinix.Metal.Plan.C3MediumX86, + /// Metro = "ny", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectSshKeyIds = new[] + /// { + /// test.Id, + /// }, + /// ProjectId = projectId, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/ReservedIpBlock.cs b/sdk/dotnet/Metal/ReservedIpBlock.cs index 34af6e2f..79551ea4 100644 --- a/sdk/dotnet/Metal/ReservedIpBlock.cs +++ b/sdk/dotnet/Metal/ReservedIpBlock.cs @@ -23,31 +23,81 @@ namespace Pulumi.Equinix.Metal /// See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. /// /// ## Example Usage + /// ### example 1 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var metro = config.Get("metro") ?? "FR"; - /// var type = config.Get("type") ?? "public_ipv4"; - /// var quantity = config.GetNumber("quantity") ?? 1; - /// var ipBlock = new Equinix.Metal.ReservedIpBlock("ipBlock", new() + /// var twoElasticAddresses = new Equinix.Metal.ReservedIpBlock("twoElasticAddresses", new() /// { /// ProjectId = projectId, - /// Type = "public_ipv4", - /// Quantity = quantity, - /// Metro = metro, + /// Metro = "sv", + /// Quantity = 2, /// }); /// - /// return new Dictionary<string, object?> + /// var test1 = new Equinix.Metal.ReservedIpBlock("test1", new() /// { - /// ["ipBlockId"] = ipBlock.Id, - /// ["ipBlockSubent"] = ipBlock.CidrNotation, - /// }; + /// ProjectId = projectId, + /// Type = Equinix.Metal.IpBlockType.PublicIPv4, + /// Metro = "sv", + /// Quantity = 1, + /// }); + /// + /// var test = new Equinix.Metal.ReservedIpBlock("test", new() + /// { + /// ProjectId = projectId, + /// Type = Equinix.Metal.IpBlockType.GlobalIPv4, + /// Quantity = 1, + /// }); + /// + /// }); + /// ``` + /// ### example 2 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new Equinix.Metal.ReservedIpBlock("example", new() + /// { + /// ProjectId = projectId, + /// Metro = "sv", + /// Quantity = 2, + /// }); + /// + /// var nodes = new Equinix.Metal.Device("nodes", new() + /// { + /// ProjectId = projectId, + /// Metro = "sv", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// Hostname = "test", + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// IpAddresses = new[] + /// { + /// new Equinix.Metal.Inputs.DeviceIpAddressArgs + /// { + /// Type = "public_ipv4", + /// Cidr = 31, + /// ReservationIds = new[] + /// { + /// example.Id, + /// }, + /// }, + /// new Equinix.Metal.Inputs.DeviceIpAddressArgs + /// { + /// Type = "private_ipv4", + /// }, + /// }, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/SpotMarketRequest.cs b/sdk/dotnet/Metal/SpotMarketRequest.cs index 3c35e9fe..ef4e9418 100644 --- a/sdk/dotnet/Metal/SpotMarketRequest.cs +++ b/sdk/dotnet/Metal/SpotMarketRequest.cs @@ -15,19 +15,17 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var metro = config.Get("metro") ?? "FR"; - /// var request = new Equinix.Metal.SpotMarketRequest("request", new() + /// var req = new Equinix.Metal.SpotMarketRequest("req", new() /// { /// ProjectId = projectId, - /// Metro = metro, - /// MaxBidPrice = 0.75, + /// MaxBidPrice = 0.03, + /// Metro = "ny", /// DevicesMin = 1, /// DevicesMax = 1, /// InstanceParameters = new Equinix.Metal.Inputs.SpotMarketRequestInstanceParametersArgs @@ -39,10 +37,6 @@ namespace Pulumi.Equinix.Metal /// }, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["requestId"] = request.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/SshKey.cs b/sdk/dotnet/Metal/SshKey.cs index 7a19dceb..2c997aa7 100644 --- a/sdk/dotnet/Metal/SshKey.cs +++ b/sdk/dotnet/Metal/SshKey.cs @@ -17,22 +17,38 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; - /// using System.IO; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; + /// using Std = Pulumi.Std; /// /// return await Deployment.RunAsync(() => /// { - /// var sshKey = new Equinix.Metal.SshKey("sshKey", new() + /// var key1 = new Equinix.Metal.SshKey("key1", new() /// { - /// Name = "johnKent", - /// PublicKey = File.ReadAllText("/Users/John/.ssh/metal_rsa.pub"), + /// Name = "terraform-1", + /// PublicKey = Std.File.Invoke(new() + /// { + /// Input = "/home/terraform/.ssh/id_rsa.pub", + /// }).Apply(invoke => invoke.Result), /// }); /// - /// return new Dictionary<string, object?> + /// var test = new Equinix.Metal.Device("test", new() /// { - /// ["sshKeyId"] = sshKey.Id, - /// }; + /// Hostname = "test-device", + /// Plan = Equinix.Metal.Plan.C3SmallX86, + /// Metro = "sv", + /// OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04, + /// BillingCycle = Equinix.Metal.BillingCycle.Hourly, + /// ProjectId = projectId, + /// }, new CustomResourceOptions + /// { + /// DependsOn = + /// { + /// key1, + /// }, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/UserApiKey.cs b/sdk/dotnet/Metal/UserApiKey.cs index 8b1fa020..b5820763 100644 --- a/sdk/dotnet/Metal/UserApiKey.cs +++ b/sdk/dotnet/Metal/UserApiKey.cs @@ -17,24 +17,18 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var description = config.Get("description") ?? "An user level API Key"; - /// var readOnly = config.GetBoolean("readOnly") ?? false; - /// var apiKey = new Equinix.Metal.UserApiKey("apiKey", new() + /// var test = new Equinix.Metal.UserApiKey("test", new() /// { - /// Description = description, - /// ReadOnly = readOnly, + /// Description = "Read-only user key", + /// ReadOnly = true, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["apiKeyToken"] = apiKey.Token, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/VirtualCircuit.cs b/sdk/dotnet/Metal/VirtualCircuit.cs index f926f507..7ef16001 100644 --- a/sdk/dotnet/Metal/VirtualCircuit.cs +++ b/sdk/dotnet/Metal/VirtualCircuit.cs @@ -17,34 +17,36 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var connectionId = config.Require("connectionId"); - /// var vlanId = config.Require("vlanId"); - /// var portId = Equinix.Metal.GetInterconnection.Invoke(new() + /// var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c"; + /// + /// var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0"; + /// + /// var test = Equinix.Metal.GetInterconnection.Invoke(new() /// { - /// ConnectionId = connectionId, - /// }).Apply(invoke => invoke.Ports[0]?.Id); + /// ConnectionId = connId, + /// }); /// - /// var vc = new Equinix.Metal.VirtualCircuit("vc", new() + /// var testVlan = new Equinix.Metal.Vlan("testVlan", new() /// { - /// ConnectionId = connectionId, /// ProjectId = projectId, - /// PortId = portId, - /// VlanId = vlanId, - /// NniVlan = 1056, + /// Metro = test.Apply(getInterconnectionResult => getInterconnectionResult.Metro), /// }); /// - /// return new Dictionary<string, object?> + /// var testVirtualCircuit = new Equinix.Metal.VirtualCircuit("testVirtualCircuit", new() /// { - /// ["vcStatus"] = vc.Status, - /// ["vcVnid"] = vc.Vnid, - /// }; + /// ConnectionId = connId, + /// ProjectId = projectId, + /// PortId = test.Apply(getInterconnectionResult => getInterconnectionResult.Ports[0]?.Id), + /// VlanId = testVlan.Id, + /// NniVlan = 1056, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/Vlan.cs b/sdk/dotnet/Metal/Vlan.cs index 13657fb1..e3ba0949 100644 --- a/sdk/dotnet/Metal/Vlan.cs +++ b/sdk/dotnet/Metal/Vlan.cs @@ -20,27 +20,20 @@ namespace Pulumi.Equinix.Metal /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var metro = config.Get("metro") ?? "DA"; - /// var vxlan = config.RequireNumber("vxlan"); - /// var vlan = new Equinix.Metal.Vlan("vlan", new() + /// var vlan1 = new Equinix.Metal.Vlan("vlan1", new() /// { - /// Description = "VLAN in Dallas", + /// Description = "VLAN in New Jersey", + /// Metro = "sv", /// ProjectId = projectId, - /// Metro = metro, - /// Vxlan = vxlan, + /// Vxlan = 1040, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["vlanId"] = vlan.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/Metal/Vrf.cs b/sdk/dotnet/Metal/Vrf.cs index 0ca7d183..62d3e812 100644 --- a/sdk/dotnet/Metal/Vrf.cs +++ b/sdk/dotnet/Metal/Vrf.cs @@ -15,34 +15,96 @@ namespace Pulumi.Equinix.Metal /// See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. /// /// ## Example Usage + /// ### example 2 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var projectId = config.Require("projectId"); - /// var metro = config.Get("metro") ?? "DA"; - /// var vrf = new Equinix.Metal.Vrf("vrf", new() + /// var example = new Equinix.Metal.ReservedIpBlock("example", new() /// { - /// Description = "VRF with ASN 65000 and a pool of address space", + /// Description = "Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.", + /// ProjectId = exampleEquinixMetalProject.Id, + /// Metro = exampleEquinixMetalVrf.Metro, + /// Type = "vrf", + /// VrfId = exampleEquinixMetalVrf.Id, + /// Cidr = 29, + /// Network = "192.168.100.0", + /// }); + /// + /// var exampleVlan = new Equinix.Metal.Vlan("exampleVlan", new() + /// { + /// Description = "A VLAN for Layer2 and Hybrid Metal devices", + /// Metro = exampleEquinixMetalVrf.Metro, + /// ProjectId = exampleEquinixMetalProject.Id, + /// }); + /// + /// var exampleGateway = new Equinix.Metal.Gateway("exampleGateway", new() + /// { + /// ProjectId = exampleEquinixMetalProject.Id, + /// VlanId = exampleVlan.Id, + /// IpReservationId = example.Id, + /// }); + /// + /// }); + /// ``` + /// ### example 1 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new Equinix.Metal.Project("example", new() + /// { + /// Name = "example", + /// }); + /// + /// var exampleVrf = new Equinix.Metal.Vrf("exampleVrf", new() + /// { + /// Description = "VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25", /// Name = "example-vrf", - /// Metro = metro, + /// Metro = "da", /// LocalAsn = 65000, /// IpRanges = new[] /// { /// "192.168.100.0/25", /// "192.168.200.0/25", /// }, - /// ProjectId = projectId, + /// ProjectId = example.Id, /// }); /// - /// return new Dictionary<string, object?> + /// }); + /// ``` + /// ### example 3 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleVirtualCircuit = new Equinix.Metal.VirtualCircuit("exampleVirtualCircuit", new() /// { - /// ["vrfId"] = vrf.Id, - /// }; + /// Name = "example-vc", + /// Description = "Virtual Circuit", + /// ConnectionId = example.Id, + /// ProjectId = exampleEquinixMetalProject.Id, + /// PortId = example.Ports[0].Id, + /// NniVlan = 1024, + /// VrfId = exampleEquinixMetalVrf.Id, + /// PeerAsn = 65530, + /// Subnet = "192.168.100.16/31", + /// MetalIp = "192.168.100.16", + /// CustomerIp = "192.168.100.17", + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/NetworkEdge/AclTemplate.cs b/sdk/dotnet/NetworkEdge/AclTemplate.cs index 51c00522..2b0b1f96 100644 --- a/sdk/dotnet/NetworkEdge/AclTemplate.cs +++ b/sdk/dotnet/NetworkEdge/AclTemplate.cs @@ -17,40 +17,37 @@ namespace Pulumi.Equinix.NetworkEdge /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var aclTemplate = new Equinix.NetworkEdge.AclTemplate("aclTemplate", new() + /// var myacl = new Equinix.NetworkEdge.AclTemplate("myacl", new() /// { /// Name = "test", /// Description = "Test ACL template", + /// ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", /// InboundRules = new[] /// { /// new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs /// { /// Subnet = "1.1.1.1/32", - /// Protocol = "IP", + /// Protocol = Equinix.NetworkEdge.AclRuleProtocolType.IP, /// SrcPort = "any", /// DstPort = "any", /// Description = "inbound rule description", /// }, /// new Equinix.NetworkEdge.Inputs.AclTemplateInboundRuleArgs /// { - /// Subnet = "2.2.2.2/28", - /// Protocol = "TCP", + /// Subnet = "172.16.25.0/24", + /// Protocol = Equinix.NetworkEdge.AclRuleProtocolType.UDP, /// SrcPort = "any", - /// DstPort = "any", - /// Description = "inbound rule description", + /// DstPort = "53,1045,2041", /// }, /// }, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["templateId"] = aclTemplate.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/NetworkEdge/Bgp.cs b/sdk/dotnet/NetworkEdge/Bgp.cs index 1d5b352f..b63addb7 100644 --- a/sdk/dotnet/NetworkEdge/Bgp.cs +++ b/sdk/dotnet/NetworkEdge/Bgp.cs @@ -15,12 +15,13 @@ namespace Pulumi.Equinix.NetworkEdge /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var bgp = new Equinix.NetworkEdge.Bgp("bgp", new() + /// var test = new Equinix.NetworkEdge.Bgp("test", new() /// { /// ConnectionId = "54014acf-9730-4b55-a791-459283d05fb1", /// LocalIpAddress = "10.1.1.1/30", @@ -30,11 +31,6 @@ namespace Pulumi.Equinix.NetworkEdge /// AuthenticationKey = "secret", /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["state"] = bgp.State, - /// ["provisioningStatus"] = bgp.ProvisioningStatus, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/NetworkEdge/Device.cs b/sdk/dotnet/NetworkEdge/Device.cs index fae8132c..cf772dc9 100644 --- a/sdk/dotnet/NetworkEdge/Device.cs +++ b/sdk/dotnet/NetworkEdge/Device.cs @@ -23,65 +23,482 @@ namespace Pulumi.Equinix.NetworkEdge /// * **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices. /// /// ## Example Usage + /// ### example 8 /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; + /// using Std = Pulumi.Std; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var accountName = config.Require("accountName"); - /// var licenseToken = config.Require("licenseToken"); - /// var sshUserName = config.Require("sshUserName"); - /// var sshKeyName = config.Require("sshKeyName"); - /// var aclTemplateId = config.Require("aclTemplateId"); - /// var metro = config.Get("metro") ?? "SV"; - /// var devicePackageCode = config.Get("devicePackageCode") ?? "network-essentials"; - /// var deviceVersion = config.Get("deviceVersion") ?? "17.06.01a"; - /// var sizeInCores = config.GetNumber("sizeInCores") ?? 2; - /// var termLength = config.GetNumber("termLength") ?? 6; - /// var additionalBandwidth = config.GetNumber("additionalBandwidth") ?? 5; - /// var accountNum = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// Name = "account-name", + /// MetroCode = "SV", + /// }); + /// + /// var bluecatEdgeServicePointCloudinitPrimaryFile = new Equinix.NetworkEdge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", new() + /// { + /// FileName = "TF-BLUECAT-ESP-cloud-init-file.txt", + /// Content = Std.File.Invoke(new() + /// { + /// Input = filepath, + /// }).Apply(invoke => invoke.Result), + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse<Equinix.Metro>), + /// DeviceTypeCode = "BLUECAT-EDGE-SERVICE-POINT", + /// ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + /// SelfManaged = true, + /// Byol = true, + /// }); + /// + /// var bluecatEdgeServicePointCloudinitSecondaryFile = new Equinix.NetworkEdge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", new() + /// { + /// FileName = "TF-BLUECAT-ESP-cloud-init-file.txt", + /// Content = Std.File.Invoke(new() + /// { + /// Input = filepath, + /// }).Apply(invoke => invoke.Result), + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse<Equinix.Metro>), + /// DeviceTypeCode = "BLUECAT-EDGE-SERVICE-POINT", + /// ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + /// SelfManaged = true, + /// Byol = true, + /// }); + /// + /// var bluecatEdgeServicePointHa = new Equinix.NetworkEdge.Device("bluecatEdgeServicePointHa", new() + /// { + /// Name = "tf-bluecat-edge-service-point-p", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// TypeCode = "BLUECAT-EDGE-SERVICE-POINT", + /// SelfManaged = true, + /// Connectivity = "PRIVATE", + /// Byol = true, + /// PackageCode = "STD", + /// Notifications = new[] + /// { + /// "test@equinix.com", + /// }, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// CloudInitFileId = bluecatEdgeServicePointCloudinitPrimaryFile.Uuid, + /// Version = "4.6.3", + /// CoreCount = 4, + /// TermLength = 12, + /// SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + /// { + /// Name = "tf-bluecat-edge-service-point-s", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// Notifications = new[] + /// { + /// "test@eq.com", + /// }, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// CloudInitFileId = bluecatEdgeServicePointCloudinitSecondaryFile.Uuid, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 1 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var dc = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// MetroCode = "DC", + /// }); + /// + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// MetroCode = "SV", + /// }); + /// + /// var csr1000VHa = new Equinix.NetworkEdge.Device("csr1000vHa", new() + /// { + /// Name = "tf-csr1000v-p", + /// Throughput = 500, + /// ThroughputUnit = Equinix.NetworkEdge.ThroughputUnit.Mbps, + /// MetroCode = dc.Apply(getAccountResult => getAccountResult.MetroCode), + /// TypeCode = "CSR1000V", + /// SelfManaged = false, + /// Connectivity = "INTERNET-ACCESS", + /// Byol = false, + /// PackageCode = "SEC", + /// Notifications = new[] + /// { + /// "john@equinix.com", + /// "marry@equinix.com", + /// "fred@equinix.com", + /// }, + /// Hostname = "csr1000v-p", + /// TermLength = 12, + /// AccountNumber = dc.Apply(getAccountResult => getAccountResult.Number), + /// Version = "16.09.05", + /// CoreCount = 2, + /// SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + /// { + /// Name = "tf-csr1000v-s", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// Hostname = "csr1000v-s", + /// Notifications = new[] + /// { + /// "john@equinix.com", + /// "marry@equinix.com", + /// }, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 4 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() /// { - /// Name = accountName, - /// MetroCode = metro, - /// }).Apply(invoke => invoke.Number); + /// Name = "account-name", + /// MetroCode = "SV", + /// }); /// - /// var c8KRouter = new Equinix.NetworkEdge.Device("c8kRouter", new() + /// var c8KvSingle = new Equinix.NetworkEdge.Device("c8kvSingle", new() /// { - /// Name = "catalystRouter", - /// MetroCode = metro, + /// Name = "tf-c8kv", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), /// TypeCode = "C8000V", /// SelfManaged = true, /// Byol = true, - /// PackageCode = devicePackageCode, + /// PackageCode = "network-essentials", /// Notifications = new[] /// { - /// "example@equinix.com", + /// "test@equinix.com", /// }, /// Hostname = "C8KV", - /// AccountNumber = accountNum, - /// Version = deviceVersion, - /// CoreCount = sizeInCores, - /// TermLength = termLength, - /// LicenseToken = licenseToken, - /// AdditionalBandwidth = additionalBandwidth, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// Version = "17.06.01a", + /// CoreCount = 2, + /// TermLength = 12, + /// LicenseToken = "valid-license-token", + /// AdditionalBandwidth = 5, /// SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs /// { - /// Username = sshUserName, - /// KeyName = sshKeyName, + /// Username = "test-username", + /// KeyName = "valid-key-name", /// }, - /// AclTemplateId = aclTemplateId, + /// AclTemplateId = "3e548c02-9164-4197-aa23-05b1f644883c", + /// }); + /// + /// }); + /// ``` + /// ### example 7 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// Name = "account-name", + /// MetroCode = "SV", + /// }); + /// + /// var testPublicKey = new Equinix.NetworkEdge.SshKey("testPublicKey", new() + /// { + /// Name = "key-name", + /// PublicKey = "ssh-dss key-value", + /// Type = "DSA", /// }); /// - /// return new Dictionary<string, object?> + /// var bluecatBddsHa = new Equinix.NetworkEdge.Device("bluecatBddsHa", new() /// { - /// ["routerId"] = c8KRouter.Id, - /// ["provisionStatus"] = c8KRouter.Status, - /// ["licenseStatus"] = c8KRouter.LicenseStatus, - /// ["sshIpAddress"] = c8KRouter.SshIpAddress, - /// }; + /// Name = "tf-bluecat-bdds-p", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// TypeCode = "BLUECAT", + /// SelfManaged = true, + /// Connectivity = "PRIVATE", + /// Byol = true, + /// PackageCode = "STD", + /// Notifications = new[] + /// { + /// "test@equinix.com", + /// }, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// Version = "9.6.0", + /// CoreCount = 2, + /// TermLength = 12, + /// VendorConfiguration = + /// { + /// { "hostname", "test" }, + /// { "privateAddress", "x.x.x.x" }, + /// { "privateCidrMask", "24" }, + /// { "privateGateway", "x.x.x.x" }, + /// { "licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" }, + /// { "licenseId", "xxxxxxxxxxxxxxx" }, + /// }, + /// SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + /// { + /// Username = "test-username", + /// KeyName = testPublicKey.Name, + /// }, + /// SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + /// { + /// Name = "tf-bluecat-bdds-s", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// Notifications = new[] + /// { + /// "test@eq.com", + /// }, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// VendorConfiguration = + /// { + /// { "hostname", "test" }, + /// { "privateAddress", "x.x.x.x" }, + /// { "privateCidrMask", "24" }, + /// { "privateGateway", "x.x.x.x" }, + /// { "licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" }, + /// { "licenseId", "xxxxxxxxxxxxxxx" }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 2 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// MetroCode = "SV", + /// }); + /// + /// var panwCluster = new Equinix.NetworkEdge.Device("panwCluster", new() + /// { + /// Name = "tf-panw", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// TypeCode = "PA-VM", + /// SelfManaged = true, + /// Byol = true, + /// PackageCode = "VM100", + /// Notifications = new[] + /// { + /// "john@equinix.com", + /// "marry@equinix.com", + /// "fred@equinix.com", + /// }, + /// TermLength = 12, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// Version = "10.1.3", + /// InterfaceCount = 10, + /// CoreCount = 2, + /// SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + /// { + /// Username = "test", + /// KeyName = "test-key", + /// }, + /// AclTemplateId = "0bff6e05-f0e7-44cd-804a-25b92b835f8b", + /// ClusterDetails = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsArgs + /// { + /// ClusterName = "tf-panw-cluster", + /// Node0 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0Args + /// { + /// VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode0VendorConfigurationArgs + /// { + /// Hostname = "panw-node0", + /// }, + /// LicenseToken = "licenseToken", + /// }, + /// Node1 = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1Args + /// { + /// VendorConfiguration = new Equinix.NetworkEdge.Inputs.DeviceClusterDetailsNode1VendorConfigurationArgs + /// { + /// Hostname = "panw-node1", + /// }, + /// LicenseToken = "licenseToken", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// ### example 5 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// Name = "account-name", + /// MetroCode = "SV", + /// }); + /// + /// var vsrxSingle = new Equinix.NetworkEdge.Device("vsrxSingle", new() + /// { + /// Name = "tf-c8kv-sdwan", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// TypeCode = "VSRX", + /// SelfManaged = true, + /// Byol = true, + /// PackageCode = "STD", + /// Notifications = new[] + /// { + /// "test@equinix.com", + /// }, + /// Hostname = "VSRX", + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// Version = "23.2R1.13", + /// CoreCount = 2, + /// TermLength = 12, + /// AdditionalBandwidth = 5, + /// ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", + /// DiverseDeviceId = "ed7891bd-15b4-4f72-ac56-d96cfdacddcc", + /// SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + /// { + /// Username = "test-username", + /// KeyName = "valid-key-name", + /// }, + /// AclTemplateId = "3e548c02-9164-4197-aa23-05b1f644883c", + /// }); + /// + /// }); + /// ``` + /// ### example 3 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// using Std = Pulumi.Std; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var filepath = config.Get("filepath") ?? "cloudInitFileFolder/TF-AVX-cloud-init-file.txt"; + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// MetroCode = "SV", + /// }); + /// + /// var aviatrixCloudinitFile = new Equinix.NetworkEdge.NetworkFile("aviatrixCloudinitFile", new() + /// { + /// FileName = "TF-AVX-cloud-init-file.txt", + /// Content = Std.File.Invoke(new() + /// { + /// Input = filepath, + /// }).Apply(invoke => invoke.Result), + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode).Apply(System.Enum.Parse<Equinix.Metro>), + /// DeviceTypeCode = "AVIATRIX_EDGE", + /// ProcessType = Equinix.NetworkEdge.FileType.CloudInit, + /// SelfManaged = true, + /// Byol = true, + /// }); + /// + /// var aviatrixSingle = new Equinix.NetworkEdge.Device("aviatrixSingle", new() + /// { + /// Name = "tf-aviatrix", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// TypeCode = "AVIATRIX_EDGE", + /// SelfManaged = true, + /// Byol = true, + /// PackageCode = "STD", + /// Notifications = new[] + /// { + /// "john@equinix.com", + /// }, + /// TermLength = 12, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// Version = "6.9", + /// CoreCount = 2, + /// CloudInitFileId = aviatrixCloudinitFile.Uuid, + /// AclTemplateId = "c06150ea-b604-4ad1-832a-d63936e9b938", + /// }); + /// + /// }); + /// ``` + /// ### example 6 + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Equinix = Pulumi.Equinix; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var sv = Equinix.NetworkEdge.GetAccount.Invoke(new() + /// { + /// Name = "account-name", + /// MetroCode = "SV", + /// }); + /// + /// var testPublicKey = new Equinix.NetworkEdge.SshKey("testPublicKey", new() + /// { + /// Name = "key-name", + /// PublicKey = "ssh-dss key-value", + /// Type = "DSA", + /// }); + /// + /// var aristaHa = new Equinix.NetworkEdge.Device("aristaHa", new() + /// { + /// Name = "tf-arista-p", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// TypeCode = "ARISTA-ROUTER", + /// SelfManaged = true, + /// Connectivity = "PRIVATE", + /// Byol = true, + /// PackageCode = "CloudEOS", + /// Notifications = new[] + /// { + /// "test@equinix.com", + /// }, + /// Hostname = "arista-p", + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// Version = "4.29.0", + /// CoreCount = 4, + /// TermLength = 12, + /// AdditionalBandwidth = 5, + /// SshKey = new Equinix.NetworkEdge.Inputs.DeviceSshKeyArgs + /// { + /// Username = "test-username", + /// KeyName = testPublicKey.Name, + /// }, + /// AclTemplateId = "c637a17b-7a6a-4486-924b-30e6c36904b0", + /// SecondaryDevice = new Equinix.NetworkEdge.Inputs.DeviceSecondaryDeviceArgs + /// { + /// Name = "tf-arista-s", + /// MetroCode = sv.Apply(getAccountResult => getAccountResult.MetroCode), + /// Hostname = "arista-s", + /// Notifications = new[] + /// { + /// "test@eq.com", + /// }, + /// AccountNumber = sv.Apply(getAccountResult => getAccountResult.Number), + /// AclTemplateId = "fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138", + /// }, + /// }); + /// /// }); /// ``` /// diff --git a/sdk/dotnet/NetworkEdge/DeviceLink.cs b/sdk/dotnet/NetworkEdge/DeviceLink.cs index d3e2247e..be9d28ed 100644 --- a/sdk/dotnet/NetworkEdge/DeviceLink.cs +++ b/sdk/dotnet/NetworkEdge/DeviceLink.cs @@ -15,47 +15,28 @@ namespace Pulumi.Equinix.NetworkEdge /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var accountName = config.Require("accountName"); - /// var accountMetro = config.Require("accountMetro"); - /// var device1Id = config.Require("device1Id"); - /// var device2Id = config.Require("device2Id"); - /// var accountfNum = Equinix.NetworkEdge.GetAccount.Invoke(new() - /// { - /// Name = accountName, - /// MetroCode = accountMetro, - /// }).Apply(invoke => invoke.Number); - /// - /// var device1Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - /// { - /// Uuid = device1Id, - /// }).Apply(invoke => invoke.MetroCode); - /// - /// var device2Metro = Equinix.NetworkEdge.GetDevice.Invoke(new() - /// { - /// Uuid = device2Id, - /// }).Apply(invoke => invoke.MetroCode); - /// - /// var deviceLink = new Equinix.NetworkEdge.DeviceLink("deviceLink", new() + /// var test = new Equinix.NetworkEdge.DeviceLink("test", new() /// { /// Name = "test-link", /// Subnet = "192.168.40.64/27", + /// ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", /// Devices = new[] /// { /// new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs /// { - /// Id = "device1Id", + /// Id = testEquinixNetworkDevice.Uuid, /// Asn = 22111, /// InterfaceId = 6, /// }, /// new Equinix.NetworkEdge.Inputs.DeviceLinkDeviceArgs /// { - /// Id = "device2Id", + /// Id = testEquinixNetworkDevice.SecondaryDevice[0].Uuid, /// Asn = 22333, /// InterfaceId = 7, /// }, @@ -64,20 +45,15 @@ namespace Pulumi.Equinix.NetworkEdge /// { /// new Equinix.NetworkEdge.Inputs.DeviceLinkLinkArgs /// { - /// AccountNumber = accountfNum, - /// SrcMetroCode = device1Metro, - /// DstMetroCode = device2Metro, + /// AccountNumber = testEquinixNetworkDevice.AccountNumber, + /// SrcMetroCode = testEquinixNetworkDevice.MetroCode, + /// DstMetroCode = testEquinixNetworkDevice.SecondaryDevice[0].MetroCode, /// Throughput = "50", /// ThroughputUnit = "Mbps", /// }, /// }, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["status"] = deviceLink.Status, - /// ["devices"] = deviceLink.Devices, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/NetworkEdge/NetworkFile.cs b/sdk/dotnet/NetworkEdge/NetworkFile.cs index be77df3f..673de074 100644 --- a/sdk/dotnet/NetworkEdge/NetworkFile.cs +++ b/sdk/dotnet/NetworkEdge/NetworkFile.cs @@ -15,30 +15,29 @@ namespace Pulumi.Equinix.NetworkEdge /// ## Example Usage /// ```csharp /// using System.Collections.Generic; - /// using System.IO; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; + /// using Std = Pulumi.Std; /// /// return await Deployment.RunAsync(() => /// { /// var config = new Config(); - /// var metro = config.Get("metro") ?? "SV"; - /// var networkFile = new Equinix.NetworkEdge.NetworkFile("networkFile", new() + /// var filepath = config.Get("filepath") ?? "fileFolder/fileName.txt"; + /// var testFile = new Equinix.NetworkEdge.NetworkFile("test-file", new() /// { - /// FileName = "Aviatrix-ZTP-file", - /// Content = File.ReadAllText("./../assets/aviatrix-cloud-init.txt"), - /// MetroCode = metro, + /// FileName = "fileName.txt", + /// Content = Std.File.Invoke(new() + /// { + /// Input = filepath, + /// }).Apply(invoke => invoke.Result), + /// MetroCode = Equinix.Metro.SiliconValley, /// DeviceTypeCode = "AVIATRIX_EDGE", - /// ProcessType = "CLOUD_INIT", + /// ProcessType = Equinix.NetworkEdge.FileType.CloudInit, /// SelfManaged = true, /// Byol = true, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["networkFileId"] = networkFile.Id, - /// ["networkFileStatus"] = networkFile.Status, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/NetworkEdge/SshKey.cs b/sdk/dotnet/NetworkEdge/SshKey.cs index 86117b78..77acb0e9 100644 --- a/sdk/dotnet/NetworkEdge/SshKey.cs +++ b/sdk/dotnet/NetworkEdge/SshKey.cs @@ -15,22 +15,30 @@ namespace Pulumi.Equinix.NetworkEdge /// ## Example Usage /// ```csharp /// using System.Collections.Generic; - /// using System.IO; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var sshKey = new Equinix.NetworkEdge.SshKey("sshKey", new() + /// var john = new Equinix.NetworkEdge.SshKey("john", new() /// { /// Name = "johnKent", - /// PublicKey = File.ReadAllText("/Users/John/.ssh/ne_rsa.pub"), + /// PublicKey = @" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + /// 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + /// iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + /// qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + /// mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + /// w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + /// 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + /// SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + /// WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + /// jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com + /// ", + /// Type = "RSA", + /// ProjectId = "a86d7112-d740-4758-9c9c-31e66373746b", /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["sshKeyId"] = sshKey.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/dotnet/NetworkEdge/SshUser.cs b/sdk/dotnet/NetworkEdge/SshUser.cs index abbd2f4b..dbda97c3 100644 --- a/sdk/dotnet/NetworkEdge/SshUser.cs +++ b/sdk/dotnet/NetworkEdge/SshUser.cs @@ -15,28 +15,23 @@ namespace Pulumi.Equinix.NetworkEdge /// ## Example Usage /// ```csharp /// using System.Collections.Generic; + /// using System.Linq; /// using Pulumi; /// using Equinix = Pulumi.Equinix; /// /// return await Deployment.RunAsync(() => /// { - /// var config = new Config(); - /// var device1Id = config.Require("device1Id"); - /// var device2Id = config.Require("device2Id"); - /// var sshUser = new Equinix.NetworkEdge.SshUser("sshUser", new() + /// var john = new Equinix.NetworkEdge.SshUser("john", new() /// { - /// Username = "johnKent", + /// Username = "john", + /// Password = "secret", /// DeviceIds = new[] /// { - /// device1Id, - /// device2Id, + /// "csr1000v-ha-uuid", + /// "csr1000v-ha-redundant-uuid", /// }, /// }); /// - /// return new Dictionary<string, object?> - /// { - /// ["sshUserId"] = sshUser.Id, - /// }; /// }); /// ``` /// diff --git a/sdk/go.mod b/sdk/go.mod index b9e52292..f3782878 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -39,7 +39,7 @@ require ( github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // 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.0 // 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 v1.2.0 // indirect diff --git a/sdk/go.sum b/sdk/go.sum index 536f50a8..85801fd7 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -87,8 +87,7 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= -github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= +github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= diff --git a/sdk/go/equinix/fabric/cloudRouter.go b/sdk/go/equinix/fabric/cloudRouter.go index 653f6b08..86385dab 100644 --- a/sdk/go/equinix/fabric/cloudRouter.go +++ b/sdk/go/equinix/fabric/cloudRouter.go @@ -27,46 +27,42 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// metro := "FR" -// if param := cfg.Get("metro"); param != "" { -// metro = param -// } -// accountNum := cfg.RequireInt("accountNum") -// router, err := fabric.NewCloudRouter(ctx, "router", &fabric.CloudRouterArgs{ -// Name: pulumi.String("My-Fabric-Cloud-Router"), +// _, err := fabric.NewCloudRouter(ctx, "newCloudRouter", &fabric.CloudRouterArgs{ +// Name: pulumi.String("Router-SV"), // Type: pulumi.String("XF_ROUTER"), -// Location: &fabric.CloudRouterLocationArgs{ -// MetroCode: pulumi.String(metro), -// }, -// Package: &fabric.CloudRouterPackageArgs{ -// Code: pulumi.String("BASIC"), -// }, // Notifications: fabric.CloudRouterNotificationArray{ // &fabric.CloudRouterNotificationArgs{ // Type: pulumi.String("ALL"), // Emails: pulumi.StringArray{ // pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), // }, // }, // }, -// Account: &fabric.CloudRouterAccountArgs{ -// AccountNumber: pulumi.Int(272010), +// Order: &fabric.CloudRouterOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// Location: &fabric.CloudRouterLocationArgs{ +// MetroCode: pulumi.String("SV"), +// }, +// Package: &fabric.CloudRouterPackageArgs{ +// Code: pulumi.String("STANDARD"), // }, // Project: &fabric.CloudRouterProjectArgs{ -// ProjectId: pulumi.String("995072000433550"), -// }, +// ProjectId: pulumi.String("776847000642406"), +// }, +// Account: &fabric.CloudRouterAccountArgs{ +// AccountNumber: pulumi.Int(203612), +// }, // }) // if err != nil { // return err // } -// ctx.Export("routerId", router.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/fabric/connection.go b/sdk/go/equinix/fabric/connection.go index cb24f2e3..9d26ea44 100644 --- a/sdk/go/equinix/fabric/connection.go +++ b/sdk/go/equinix/fabric/connection.go @@ -14,86 +14,976 @@ import ( ) // ## Example Usage +// ### example 9 // ```go // package main // // import ( // +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" // "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// metro := "FR" -// if param := cfg.Get("metro"); param != "" { -// metro = param +// _, err := fabric.NewConnection(ctx, "fcr2azure", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String("IP_VC"), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String("CLOUD_ROUTER"), +// Router: &fabric.ConnectionASideAccessPointRouterArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeSP), +// AuthenticationKey: pulumi.String(""), +// PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), +// Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ +// Type: pulumi.String(fabric.ProfileTypeL2Profile), +// Uuid: pulumi.String(""), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 5 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "vd2port", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeVD), +// VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ +// Type: pulumi.String("EDGE"), +// Uuid: pulumi.String(""), +// }, +// Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ +// Type: pulumi.String("NETWORK"), +// Id: pulumi.Int(7), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionZSideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ +// Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), +// VlanSTag: pulumi.Int(3711), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 12 +// ```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 { +// _, err := fabric.NewConnection(ctx, "fcr2network", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String("IPWAN_VC"), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String("CLOUD_ROUTER"), +// Router: &fabric.ConnectionASideAccessPointRouterArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeNetwork), +// Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 11 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// vd2AzurePrimary, err := fabric.NewConnection(ctx, "vd2azurePrimary", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), +// Redundancy: &fabric.ConnectionRedundancyArgs{ +// Priority: pulumi.String("PRIMARY"), +// }, +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeVD), +// VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ +// Type: pulumi.String("EDGE"), +// Uuid: pulumi.String(""), +// }, +// Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ +// Type: pulumi.String("CLOUD"), +// Id: pulumi.Int(7), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeSP), +// AuthenticationKey: pulumi.String(""), +// PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), +// Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ +// Type: pulumi.String(fabric.ProfileTypeL2Profile), +// Uuid: pulumi.String(""), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// _, err = fabric.NewConnection(ctx, "vd2azureSecondary", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), +// Redundancy: &fabric.ConnectionRedundancyArgs{ +// Priority: pulumi.String("SECONDARY"), +// Group: vd2AzurePrimary.Redundancy.ApplyT(func(redundancy fabric.ConnectionRedundancy) (*string, error) { +// return &redundancy.Group, nil +// }).(pulumi.StringPtrOutput), +// }, +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeVD), +// VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ +// Type: pulumi.String("EDGE"), +// Uuid: pulumi.String(""), +// }, +// Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ +// Type: pulumi.String("CLOUD"), +// Id: pulumi.Int(5), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeSP), +// AuthenticationKey: pulumi.String(""), +// PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), +// Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ +// Type: pulumi.String(fabric.ProfileTypeL2Profile), +// Uuid: pulumi.String(""), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 6 +// ```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 { +// _, err := fabric.NewConnection(ctx, "vd2token", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeVD), +// VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ +// Type: pulumi.String("EDGE"), +// Uuid: pulumi.String(""), +// }, +// Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ +// Type: pulumi.String("NETWORK"), +// Id: pulumi.Int(7), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// ServiceToken: &fabric.ConnectionZSideServiceTokenArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 3 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEPL), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionASideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionZSideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 14 +// ```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 { +// _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String("EPLAN_VC"), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionASideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeNetwork), +// Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 4 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "accessEplVc", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeAccessEPL), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionASideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ +// Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), +// VlanSTag: pulumi.Int(1976), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionZSideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 13 +// ```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 { +// _, err := fabric.NewConnection(ctx, "vd2token", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String("EVPLAN_VC"), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeVD), +// VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ +// Type: pulumi.String("EDGE"), +// Uuid: pulumi.String(""), +// }, +// Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ +// Type: pulumi.String("CLOUD"), +// Id: pulumi.Int(7), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeNetwork), +// Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// }) +// if err != nil { +// return err // } -// speedInMbps := 50 -// if param := cfg.GetInt("speedInMbps"); param != 0 { -// speedInMbps = param +// return nil +// }) +// } +// +// ``` +// ### example 1 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "port2port", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionASideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ +// Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), +// VlanSTag: pulumi.Int(1976), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionZSideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ +// Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), +// VlanSTag: pulumi.Int(3711), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err // } -// fabricPortName := cfg.Require("fabricPortName") -// awsRegion := "eu-central-1" -// if param := cfg.Get("awsRegion"); param != "" { -// awsRegion = param +// return nil +// }) +// } +// +// ``` +// ### example 8 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "fcr2port", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String("IP_VC"), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String("CLOUD_ROUTER"), +// Router: &fabric.ConnectionASideAccessPointRouterArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionZSideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// LinkProtocol: &fabric.ConnectionZSideAccessPointLinkProtocolArgs{ +// Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), +// VlanTag: pulumi.Int(2711), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err // } -// awsAccountId := cfg.Require("awsAccountId") -// serviceProfileId := fabric.GetServiceProfiles(ctx, &fabric.GetServiceProfilesArgs{ -// Filter: fabric.GetServiceProfilesFilter{ -// Property: pulumi.StringRef("/name"), -// Operator: pulumi.StringRef("="), -// Values: []string{ -// "AWS Direct Connect", -// }, -// }, -// }, nil).Data[0].Uuid -// portId := fabric.GetPorts(ctx, &fabric.GetPortsArgs{ -// Filter: fabric.GetPortsFilter{ -// Name: pulumi.StringRef(fabricPortName), -// }, -// }, nil).Data[0].Uuid -// colo2Aws, err := fabric.NewConnection(ctx, "colo2Aws", &fabric.ConnectionArgs{ -// Name: pulumi.String("Pulumi-colo2Aws"), -// Type: pulumi.String("EVPL_VC"), +// return nil +// }) +// } +// +// ``` +// ### example 2 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "port2aws", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), // Notifications: fabric.ConnectionNotificationArray{ // &fabric.ConnectionNotificationArgs{ -// Type: pulumi.String("ALL"), +// Type: pulumi.String(fabric.NotificationsTypeAll), // Emails: pulumi.StringArray{ // pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), // }, // }, // }, -// Bandwidth: pulumi.Int(speedInMbps), +// Bandwidth: pulumi.Int(50), // Redundancy: &fabric.ConnectionRedundancyArgs{ // Priority: pulumi.String("PRIMARY"), // }, +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323929"), +// }, // ASide: &fabric.ConnectionASideArgs{ // AccessPoint: &fabric.ConnectionASideAccessPointArgs{ -// Type: pulumi.String("COLO"), +// Type: pulumi.String(fabric.AccessPointTypeColo), // Port: &fabric.ConnectionASideAccessPointPortArgs{ -// Uuid: *pulumi.String(portId), +// Uuid: pulumi.String(""), // }, // LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ -// Type: pulumi.String("DOT1Q"), -// VlanTag: pulumi.Int(1234), +// Type: pulumi.String(fabric.AccessPointLinkProtocolTypeQinQ), +// VlanSTag: pulumi.Int(2019), +// VlanCTag: pulumi.Int(2112), // }, // }, // }, // ZSide: &fabric.ConnectionZSideArgs{ // AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ -// Type: pulumi.String("SP"), -// AuthenticationKey: pulumi.String(awsAccountId), -// SellerRegion: pulumi.String(awsRegion), +// Type: pulumi.String(fabric.AccessPointTypeSP), +// AuthenticationKey: pulumi.String(""), +// SellerRegion: pulumi.String("us-west-1"), +// Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ +// Type: pulumi.String(fabric.ProfileTypeL2Profile), +// Uuid: pulumi.String(""), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// AdditionalInfo: pulumi.MapArray{ +// pulumi.Map{ +// "key": pulumi.Any("accessKey"), +// "value": pulumi.Any(""), +// }, +// pulumi.Map{ +// "key": pulumi.Any("secretKey"), +// "value": pulumi.Any(""), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 15 +// ```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 { +// _, err := fabric.NewConnection(ctx, "epl", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String("EVPLAN_VC"), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeColo), +// Port: &fabric.ConnectionASideAccessPointPortArgs{ +// Uuid: pulumi.String(""), +// }, +// LinkProtocol: &fabric.ConnectionASideAccessPointLinkProtocolArgs{ +// Type: pulumi.String(fabric.AccessPointLinkProtocolTypeDot1q), +// VlanSTag: pulumi.Int(1976), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeNetwork), +// Network: &fabric.ConnectionZSideAccessPointNetworkArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 10 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "vd2azure", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// AccessPoint: &fabric.ConnectionASideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeVD), +// VirtualDevice: &fabric.ConnectionASideAccessPointVirtualDeviceArgs{ +// Type: pulumi.String("EDGE"), +// Uuid: pulumi.String(""), +// }, +// Interface: &fabric.ConnectionASideAccessPointInterfaceArgs{ +// Type: pulumi.String("CLOUD"), +// Id: pulumi.Int(7), +// }, +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeSP), +// AuthenticationKey: pulumi.String(""), +// PeeringType: pulumi.String(fabric.AccessPointPeeringTypePrivate), +// Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ +// Type: pulumi.String(fabric.ProfileTypeL2Profile), +// Uuid: pulumi.String(""), +// }, +// Location: &fabric.ConnectionZSideAccessPointLocationArgs{ +// MetroCode: pulumi.String(equinix.MetroSiliconValley), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 7 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "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 { +// _, err := fabric.NewConnection(ctx, "token2aws", &fabric.ConnectionArgs{ +// Name: pulumi.String("ConnectionName"), +// Type: pulumi.String(fabric.ConnectionTypeEVPL), +// Notifications: fabric.ConnectionNotificationArray{ +// &fabric.ConnectionNotificationArgs{ +// Type: pulumi.String(fabric.NotificationsTypeAll), +// Emails: pulumi.StringArray{ +// pulumi.String("example@equinix.com"), +// pulumi.String("test1@equinix.com"), +// }, +// }, +// }, +// Bandwidth: pulumi.Int(50), +// Order: &fabric.ConnectionOrderArgs{ +// PurchaseOrderNumber: pulumi.String("1-323292"), +// }, +// ASide: &fabric.ConnectionASideArgs{ +// ServiceToken: &fabric.ConnectionASideServiceTokenArgs{ +// Uuid: pulumi.String(""), +// }, +// }, +// ZSide: &fabric.ConnectionZSideArgs{ +// AccessPoint: &fabric.ConnectionZSideAccessPointArgs{ +// Type: pulumi.String(fabric.AccessPointTypeSP), +// AuthenticationKey: pulumi.String(""), +// SellerRegion: pulumi.String("us-west-1"), // Profile: &fabric.ConnectionZSideAccessPointProfileArgs{ -// Type: pulumi.String("L2_PROFILE"), -// Uuid: *pulumi.String(serviceProfileId), +// Type: pulumi.String(fabric.ProfileTypeL2Profile), +// Uuid: pulumi.String(""), // }, // Location: &fabric.ConnectionZSideAccessPointLocationArgs{ -// MetroCode: pulumi.String(metro), +// MetroCode: pulumi.String(equinix.MetroSiliconValley), // }, // }, // }, @@ -101,16 +991,6 @@ import ( // if err != nil { // return err // } -// ctx.Export("connectionId", colo2Aws.ID()) -// ctx.Export("connectionStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { -// return &operation.EquinixStatus, nil -// }).(pulumi.StringPtrOutput)) -// ctx.Export("connectionProviderStatus", colo2Aws.Operation.ApplyT(func(operation fabric.ConnectionOperation) (*string, error) { -// return &operation.ProviderStatus, nil -// }).(pulumi.StringPtrOutput)) -// ctx.Export("awsDirectConnectId", colo2Aws.ZSide.ApplyT(func(zSide fabric.ConnectionZSide) (*string, error) { -// return &zSide.AccessPoint.ProviderConnectionId, nil -// }).(pulumi.StringPtrOutput)) // return nil // }) // } diff --git a/sdk/go/equinix/fabric/routingProtocol.go b/sdk/go/equinix/fabric/routingProtocol.go index 5e4564ba..27fc0ba8 100644 --- a/sdk/go/equinix/fabric/routingProtocol.go +++ b/sdk/go/equinix/fabric/routingProtocol.go @@ -20,6 +20,7 @@ import ( // * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols // // ## Example Usage +// ### example 3 // ```go // package main // @@ -27,28 +28,111 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// connectionId := cfg.Require("connectionId") -// routingProtocol, err := fabric.NewRoutingProtocol(ctx, "RoutingProtocol", &fabric.RoutingProtocolArgs{ -// ConnectionUuid: pulumi.String(connectionId), -// Name: pulumi.String("My-Direct-route-1"), +// direct, err := fabric.NewRoutingProtocol(ctx, "direct", &fabric.RoutingProtocolArgs{ +// ConnectionUuid: pulumi.String(""), // Type: pulumi.String("DIRECT"), +// Name: pulumi.String("direct_rp"), // DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ -// EquinixIfaceIp: pulumi.String("192.168.100.1/30"), +// EquinixIfaceIp: pulumi.String("190.1.1.1/30"), // }, +// DirectIpv6: &fabric.RoutingProtocolDirectIpv6Args{ +// EquinixIfaceIp: pulumi.String("190::1:1/126"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = fabric.NewRoutingProtocol(ctx, "bgp", &fabric.RoutingProtocolArgs{ +// ConnectionUuid: pulumi.String(""), +// Type: pulumi.String("BGP"), +// Name: pulumi.String("bgp_rp"), +// BgpIpv4: &fabric.RoutingProtocolBgpIpv4Args{ +// CustomerPeerIp: pulumi.String("190.1.1.2"), +// Enabled: pulumi.Bool(true), +// }, +// BgpIpv6: &fabric.RoutingProtocolBgpIpv6Args{ +// CustomerPeerIp: pulumi.String("190::1:2"), +// Enabled: pulumi.Bool(true), +// }, +// CustomerAsn: pulumi.Int(4532), +// }, pulumi.DependsOn([]pulumi.Resource{ +// direct, +// })) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 1 +// ```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 { +// _, err := fabric.NewRoutingProtocol(ctx, "direct", &fabric.RoutingProtocolArgs{ +// ConnectionUuid: pulumi.String(""), +// Type: pulumi.String("DIRECT"), +// Name: pulumi.String("direct_rp"), +// DirectIpv4: &fabric.RoutingProtocolDirectIpv4Args{ +// EquinixIfaceIp: pulumi.String("190.1.1.1/30"), +// }, +// DirectIpv6: &fabric.RoutingProtocolDirectIpv6Args{ +// EquinixIfaceIp: pulumi.String("190::1:1/126"), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 2 +// ```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 { +// _, err := fabric.NewRoutingProtocol(ctx, "bgp", &fabric.RoutingProtocolArgs{ +// ConnectionUuid: pulumi.String(""), +// Type: pulumi.String("BGP"), +// Name: pulumi.String("bgp_rp"), +// BgpIpv4: &fabric.RoutingProtocolBgpIpv4Args{ +// CustomerPeerIp: pulumi.String("190.1.1.2"), +// Enabled: pulumi.Bool(true), +// }, +// BgpIpv6: &fabric.RoutingProtocolBgpIpv6Args{ +// CustomerPeerIp: pulumi.String("190::1:2"), +// Enabled: pulumi.Bool(true), +// }, +// CustomerAsn: pulumi.Int(4532), // }) // if err != nil { // return err // } -// ctx.Export("routingProtocolId", routingProtocol.ID()) -// ctx.Export("routingProtocolState", routingProtocol.State) -// ctx.Export("routingProtocolEquinixAsn", routingProtocol.EquinixAsn) // return nil // }) // } diff --git a/sdk/go/equinix/fabric/serviceProfile.go b/sdk/go/equinix/fabric/serviceProfile.go index b32925b5..6a0ed87a 100644 --- a/sdk/go/equinix/fabric/serviceProfile.go +++ b/sdk/go/equinix/fabric/serviceProfile.go @@ -32,55 +32,48 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// profile, err := fabric.NewServiceProfile(ctx, "profile", &fabric.ServiceProfileArgs{ -// Name: pulumi.String("Example Cloud Provider"), -// Description: pulumi.String("50 to 500 Mbps Hosted Connection to Example Cloud"), -// Type: pulumi.String("L2_PROFILE"), +// _, err := fabric.NewServiceProfile(ctx, "newServiceProfile", &fabric.ServiceProfileArgs{ +// Description: pulumi.String("Service Profile for Receiving Connections"), +// Name: pulumi.String("Name Of Business + Use Case Tag"), +// Type: pulumi.String(fabric.ProfileTypeL2Profile), +// Visibility: pulumi.String(fabric.ProfileVisibilityPublic), +// Notifications: fabric.ServiceProfileNotificationArray{ +// &fabric.ServiceProfileNotificationArgs{ +// Emails: pulumi.StringArray{ +// pulumi.String("someone@sample.com"), +// }, +// Type: pulumi.String("BANDWIDTH_ALERT"), +// }, +// }, +// AllowedEmails: pulumi.StringArray{ +// pulumi.String("test@equinix.com"), +// pulumi.String("testagain@equinix.com"), +// }, +// Ports: fabric.ServiceProfilePortArray{ +// &fabric.ServiceProfilePortArgs{ +// Uuid: pulumi.String("c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee"), +// Type: pulumi.String("XF_PORT"), +// }, +// }, // AccessPointTypeConfigs: fabric.ServiceProfileAccessPointTypeConfigArray{ // &fabric.ServiceProfileAccessPointTypeConfigArgs{ -// Type: pulumi.String("COLO"), +// Type: pulumi.String(fabric.ProfileAccessPointTypeColo), +// AllowRemoteConnections: pulumi.Bool(true), +// AllowCustomBandwidth: pulumi.Bool(true), +// AllowBandwidthAutoApproval: pulumi.Bool(false), +// ConnectionRedundancyRequired: pulumi.Bool(false), +// ConnectionLabel: pulumi.String("Service Profile Tag1"), +// BandwidthAlertThreshold: pulumi.Float64(10), // SupportedBandwidths: pulumi.IntArray{ -// pulumi.Int(50), // pulumi.Int(100), -// pulumi.Int(200), // pulumi.Int(500), // }, -// AllowRemoteConnections: pulumi.Bool(true), -// AllowCustomBandwidth: pulumi.Bool(false), -// AllowBandwidthAutoApproval: pulumi.Bool(false), -// LinkProtocolConfig: &fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs{ -// EncapsulationStrategy: pulumi.String("CTAGED"), -// ReuseVlanSTag: pulumi.Bool(false), -// Encapsulation: pulumi.String("DOT1Q"), -// }, -// EnableAutoGenerateServiceKey: pulumi.Bool("false,"), -// ConnectionRedundancyRequired: pulumi.Bool("false,"), -// ApiConfig: &fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs{ -// ApiAvailable: pulumi.Bool(true), -// IntegrationId: pulumi.String("Example-Connect-01"), -// BandwidthFromApi: pulumi.Bool(false), -// }, -// ConnectionLabel: pulumi.String("Virtual Circuit Name"), -// AuthenticationKey: &fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs{ -// Required: pulumi.Bool(true), -// Label: pulumi.String("Example ACCOUNT ID"), -// }, // }, // }, -// Account: &fabric.ServiceProfileAccountArgs{ -// OrganizationName: pulumi.String("Example Cloud"), -// GlobalOrganizationName: pulumi.String("Example Global"), -// }, -// Metros: nil, -// Visibility: pulumi.String("PUBLIC"), -// MarketingInfo: &fabric.ServiceProfileMarketingInfoArgs{ -// Promotion: pulumi.Bool(true), -// }, // }) // if err != nil { // return err // } -// ctx.Export("profileId", profile.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/metal/bgpSession.go b/sdk/go/equinix/metal/bgpSession.go index 68153380..07b9cfe9 100644 --- a/sdk/go/equinix/metal/bgpSession.go +++ b/sdk/go/equinix/metal/bgpSession.go @@ -25,24 +25,94 @@ import ( // // import ( // +// "fmt" +// // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi-null/sdk/go/null" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// deviceId := cfg.Require("deviceId") -// bgp, err := metal.NewBgpSession(ctx, "bgp", &metal.BgpSessionArgs{ -// DeviceId: pulumi.String(deviceId), +// bgpPassword := "955dB0b81Ef" +// projectId := "" +// addr, err := metal.NewReservedIpBlock(ctx, "addr", &metal.ReservedIpBlockArgs{ +// ProjectId: pulumi.String(projectId), +// Metro: pulumi.String("ny"), +// Quantity: pulumi.Int(1), +// }) +// if err != nil { +// return err +// } +// interfaceLo0 := pulumi.All(addr.Address, addr.Netmask).ApplyT(func(_args []interface{}) (string, error) { +// address := _args[0].(string) +// netmask := _args[1].(string) +// return fmt.Sprintf("auto lo:0\niface lo:0 inet static\n address %v\n netmask %v\n", address, netmask), nil +// }).(pulumi.StringOutput) +// test, err := metal.NewDevice(ctx, "test", &metal.DeviceArgs{ +// Hostname: pulumi.String("terraform-test-bgp-sesh"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("ny"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.String(projectId), +// }) +// if err != nil { +// return err +// } +// birdConf := pulumi.All(addr.Address, addr.Cidr, test.Network, test.Network).ApplyT(func(_args []interface{}) (string, error) { +// address := _args[0].(string) +// cidr := _args[1].(int) +// testNetwork := _args[2].([]metal.DeviceNetwork) +// testNetwork1 := _args[3].([]metal.DeviceNetwork) +// return fmt.Sprintf(`filter equinix_metal_bgp { +// if net = %v/%v then accept; +// } +// +// router id %v; +// +// protocol direct { +// interface "lo"; +// } +// +// protocol kernel { +// scan time 10; +// persist; +// import all; +// export all; +// } +// +// protocol device { +// scan time 10; +// } +// +// protocol bgp { +// export filter equinix_metal_bgp; +// local as 65000; +// neighbor %v as 65530; +// password "%v"; +// } +// +// `, address, cidr, testNetwork[2].Address, testNetwork1[2].Gateway, bgpPassword), nil +// +// }).(pulumi.StringOutput) +// _, err = metal.NewBgpSession(ctx, "testBgpSession", &metal.BgpSessionArgs{ +// DeviceId: test.ID(), // AddressFamily: pulumi.String("ipv4"), // }) // if err != nil { // return err // } -// ctx.Export("bgpSessionStatus", bgp.Status) +// _, err = null.NewResource(ctx, "configureBird", &null.ResourceArgs{ +// Triggers: pulumi.StringMap{ +// "bird_conf": pulumi.String(birdConf), +// "interface": pulumi.String(interfaceLo0), +// }, +// }) +// if err != nil { +// return err +// } // return nil // }) // } diff --git a/sdk/go/equinix/metal/device.go b/sdk/go/equinix/metal/device.go index 6877e525..8fe89cc1 100644 --- a/sdk/go/equinix/metal/device.go +++ b/sdk/go/equinix/metal/device.go @@ -18,37 +18,222 @@ import ( // > **NOTE:** All arguments including the `rootPassword` and `userData` will be stored in the raw state as plain-text. Read more about sensitive data in state. // // ## Example Usage +// ### example 1 // ```go // package main // // import ( // -// "fmt" +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ +// Hostname: pulumi.String("tf.coreos2"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("sv"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 4 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ +// Hostname: pulumi.String("tftest"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("ny"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// HardwareReservationId: pulumi.String("next-available"), +// Storage: pulumi.String(`{ +// "disks": [ +// { +// "device": "/dev/sda", +// "wipeTable": true, +// "partitions": [ +// { +// "label": "BIOS", +// "number": 1, +// "size": "4096" +// }, +// { +// "label": "SWAP", +// "number": 2, +// "size": "3993600" +// }, +// { +// "label": "ROOT", +// "number": 3, +// "size": "0" +// } +// ] +// } +// ], +// "filesystems": [ +// { +// "mount": { +// "device": "/dev/sda3", +// "format": "ext4", +// "point": "/", +// "create": { +// "options": [ +// "-L", +// "ROOT" +// ] +// } +// } +// }, +// { +// "mount": { +// "device": "/dev/sda2", +// "format": "swap", +// "point": "none", +// "create": { +// "options": [ +// "-L", +// "SWAP" +// ] +// } +// } +// } +// ] +// } +// +// `), +// +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 2 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewDevice(ctx, "pxe1", &metal.DeviceArgs{ +// Hostname: pulumi.String("tf.coreos2-pxe"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("sv"), +// OperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// IpxeScriptUrl: pulumi.String("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe"), +// AlwaysPxe: pulumi.Bool(false), +// UserData: pulumi.Any(example.Rendered), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 5 +// ```go +// package main +// +// import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// web, err := metal.NewDevice(ctx, "web", &metal.DeviceArgs{ -// Hostname: pulumi.String("webserver1"), -// Plan: pulumi.String("c3.small.x86"), -// OperatingSystem: pulumi.String("ubuntu_20_04"), +// _, err := metal.NewDevice(ctx, "pxe1", &metal.DeviceArgs{ +// Hostname: pulumi.String("tf.coreos2-pxe"), +// Plan: pulumi.String(metal.PlanC3SmallX86), // Metro: pulumi.String("sv"), -// BillingCycle: pulumi.String("hourly"), -// ProjectId: pulumi.String(projectId), +// OperatingSystem: pulumi.String(metal.OperatingSystemCustomIPXE), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// IpxeScriptUrl: pulumi.String("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe"), +// AlwaysPxe: pulumi.Bool(false), +// UserData: pulumi.Any(userData), +// CustomData: pulumi.Any(customData), +// Behavior: &metal.DeviceBehaviorArgs{ +// AllowChanges: pulumi.StringArray{ +// pulumi.String("custom_data"), +// pulumi.String("user_data"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 3 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewDevice(ctx, "web1", &metal.DeviceArgs{ +// Hostname: pulumi.String("tf.coreos2"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("ny"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// IpAddresses: metal.DeviceIpAddressArray{ +// &metal.DeviceIpAddressArgs{ +// Type: pulumi.String("private_ipv4"), +// Cidr: pulumi.Int(30), +// }, +// }, // }) // if err != nil { // return err // } -// ctx.Export("webPublicIp", web.AccessPublicIpv4.ApplyT(func(accessPublicIpv4 string) (string, error) { -// return fmt.Sprintf("http://%v", accessPublicIpv4), nil -// }).(pulumi.StringOutput)) // return nil // }) // } diff --git a/sdk/go/equinix/metal/gateway.go b/sdk/go/equinix/metal/gateway.go index d560984c..0d83edcd 100644 --- a/sdk/go/equinix/metal/gateway.go +++ b/sdk/go/equinix/metal/gateway.go @@ -18,6 +18,7 @@ import ( // See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. // // ## Example Usage +// ### example 1 // ```go // package main // @@ -25,24 +26,69 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// vlanId := cfg.Require("vlanId") -// gateway, err := metal.NewGateway(ctx, "gateway", &metal.GatewayArgs{ -// ProjectId: pulumi.String(projectId), -// VlanId: pulumi.String(vlanId), +// test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ +// Description: pulumi.String("test VLAN in SV"), +// Metro: pulumi.String("sv"), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err +// } +// _, err = metal.NewGateway(ctx, "testGateway", &metal.GatewayArgs{ +// ProjectId: pulumi.Any(projectId), +// VlanId: test.ID(), // PrivateIpv4SubnetSize: pulumi.Int(8), // }) // if err != nil { // return err // } -// ctx.Export("gatewayState", gateway.State) +// return nil +// }) +// } +// +// ``` +// ### example 2 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ +// Description: pulumi.String("test VLAN in SV"), +// Metro: pulumi.String("sv"), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err +// } +// _, err = metal.NewReservedIpBlock(ctx, "test1", &metal.ReservedIpBlockArgs{ +// ProjectId: pulumi.Any(projectId), +// Metro: pulumi.String("sv"), +// Quantity: pulumi.Int(8), +// }) +// if err != nil { +// return err +// } +// _, err = metal.NewGateway(ctx, "testGateway", &metal.GatewayArgs{ +// ProjectId: pulumi.Any(projectId), +// VlanId: test.ID(), +// IpReservationId: pulumi.Any(testEquinixMetalReservedIpBlock.Id), +// }) +// if err != nil { +// return err +// } // return nil // }) // } diff --git a/sdk/go/equinix/metal/interconnection.go b/sdk/go/equinix/metal/interconnection.go index 1543daaf..aaec6bef 100644 --- a/sdk/go/equinix/metal/interconnection.go +++ b/sdk/go/equinix/metal/interconnection.go @@ -18,6 +18,52 @@ import ( // > Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization. // // ## Example Usage +// ### example metal billed token +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// projectId := cfg.Require("projectId") +// metro := "SV" +// if param := cfg.Get("metro"); param != "" { +// metro = param +// } +// speedInMbps := 1000 +// if param := cfg.GetInt("speedInMbps"); param != 0 { +// speedInMbps = param +// } +// connection, err := metal.NewInterconnection(ctx, "connection", &metal.InterconnectionArgs{ +// Name: pulumi.String("metal-to-cloudprovider"), +// ProjectId: pulumi.String(projectId), +// Type: pulumi.String("shared"), +// Redundancy: pulumi.String("primary"), +// Metro: pulumi.String(metro), +// Speed: pulumi.String(fmt.Sprintf("%vMbps", speedInMbps)), +// ServiceTokenType: pulumi.String("a_side"), +// }) +// if err != nil { +// return err +// } +// ctx.Export("connectionStatus", connection.Status) +// ctx.Export("connectionTokens", connection.ServiceTokens) +// return nil +// }) +// } +// +// ``` +// ### example fabric billed token // ```go // package main // diff --git a/sdk/go/equinix/metal/ipAttachment.go b/sdk/go/equinix/metal/ipAttachment.go index a66daf59..bc2ae649 100644 --- a/sdk/go/equinix/metal/ipAttachment.go +++ b/sdk/go/equinix/metal/ipAttachment.go @@ -28,32 +28,47 @@ import ( // import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// deviceId := cfg.Require("deviceId") -// subnetCidr := "147.229.10.152/31" -// if param := cfg.Get("subnetCidr"); param != "" { -// subnetCidr = param -// } -// ipAttachResource, err := metal.NewIpAttachment(ctx, "ipAttach", &metal.IpAttachmentArgs{ -// DeviceId: pulumi.String(deviceId), -// CidrNotation: pulumi.String(subnetCidr), -// }) -// if err != nil { -// return err -// } -// ctx.Export("ipAttach", ipAttachResource.ID()) -// ctx.Export("ipNetmask", ipAttachResource.Netmask) -// return nil -// }) -// } -// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewReservedIpBlock(ctx, "myblock", &metal.ReservedIpBlockArgs{ +// ProjectId: pulumi.Any(projectId), +// Metro: pulumi.String("ny"), +// Quantity: pulumi.Int(2), +// }) +// if err != nil { +// return err +// } +// invokeJoin, err := std.Join(ctx, invokeCidrhost1, err := std.Cidrhost(ctx, &std.CidrhostArgs{ +// Input: myblockMetalReservedIpBlock.CidrNotation, +// Host: 0, +// }, nil) +// if err != nil { +// return err +// } +// &std.JoinArgs{ +// Separator: "/", +// Input: []*string{ +// invokeCidrhost1.Result, +// "32", +// }, +// }, nil) +// if err != nil { +// return err +// } +// _, err = metal.NewIpAttachment(ctx, "firstAddressAssignment", &metal.IpAttachmentArgs{ +// DeviceId: pulumi.Any(mydevice.Id), +// CidrNotation: invokeJoin.Result, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } // ``` type IpAttachment struct { pulumi.CustomResourceState diff --git a/sdk/go/equinix/metal/organization.go b/sdk/go/equinix/metal/organization.go index 1206c5cf..2a02b634 100644 --- a/sdk/go/equinix/metal/organization.go +++ b/sdk/go/equinix/metal/organization.go @@ -26,20 +26,13 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// orgResource, err := metal.NewOrganization(ctx, "org", &metal.OrganizationArgs{ -// Name: pulumi.String("Foo Organization"), -// Address: &metal.OrganizationAddressArgs{ -// Address: pulumi.String("org street"), -// City: pulumi.String("london"), -// Country: pulumi.String("GB"), -// ZipCode: pulumi.String("12345"), -// }, -// Description: pulumi.String("An organization"), +// _, err := metal.NewOrganization(ctx, "tfOrganization1", &metal.OrganizationArgs{ +// Name: pulumi.String("foobar"), +// Description: pulumi.String("quux"), // }) // if err != nil { // return err // } -// ctx.Export("org", orgResource.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/metal/organizationMember.go b/sdk/go/equinix/metal/organizationMember.go index 6853ac44..df50fbb2 100644 --- a/sdk/go/equinix/metal/organizationMember.go +++ b/sdk/go/equinix/metal/organizationMember.go @@ -16,6 +16,7 @@ import ( // Manage the membership of existing and new invitees within an Equinix Metal organization and its projects. // // ## Example Usage +// ### example 2 // ```go // package main // @@ -23,31 +24,53 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// organizationId := cfg.Require("organizationId") -// projectId := cfg.Require("projectId") -// userEmailAddress := cfg.Require("userEmailAddress") -// member, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{ -// Invitee: pulumi.String(userEmailAddress), +// _, err := metal.NewOrganizationMember(ctx, "owner", &metal.OrganizationMemberArgs{ +// Invitee: pulumi.String("admin@example.com"), +// Roles: pulumi.StringArray{ +// pulumi.String("owner"), +// }, +// ProjectsIds: pulumi.StringArray{}, +// OrganizationId: pulumi.Any(organizationId), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 1 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{ +// Invitee: pulumi.String("member@example.com"), // Roles: pulumi.StringArray{ // pulumi.String("limited_collaborator"), // }, // ProjectsIds: pulumi.StringArray{ -// pulumi.String(projectId), +// projectId, // }, -// OrganizationId: pulumi.String(organizationId), +// OrganizationId: pulumi.Any(organizationId), // }) // if err != nil { // return err // } -// ctx.Export("memberId", member.ID()) -// ctx.Export("memberState", member.State) // return nil // }) // } diff --git a/sdk/go/equinix/metal/port.go b/sdk/go/equinix/metal/port.go index 52dbc01b..6b816d5e 100644 --- a/sdk/go/equinix/metal/port.go +++ b/sdk/go/equinix/metal/port.go @@ -13,37 +13,6 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -// ## Example Usage -// ```go -// package main -// -// import ( -// -// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// portId := cfg.Require("portId") -// _, err := metal.NewPort(ctx, "org", &metal.PortArgs{ -// PortId: pulumi.String(portId), -// Bonded: pulumi.Bool(true), -// Layer2: pulumi.Bool(true), -// }) -// if err != nil { -// return err -// } -// ctx.Export("portType", port.Type) -// ctx.Export("portBondedNetworkType", port.NetworkType) -// return nil -// }) -// } -// -// ``` type Port struct { pulumi.CustomResourceState diff --git a/sdk/go/equinix/metal/portVlanAttachment.go b/sdk/go/equinix/metal/portVlanAttachment.go index c47bbfb8..afb8b632 100644 --- a/sdk/go/equinix/metal/portVlanAttachment.go +++ b/sdk/go/equinix/metal/portVlanAttachment.go @@ -33,6 +33,7 @@ import ( // * `portId` - UUID of device port. // // ## Example Usage +// ### example 2 // ```go // package main // @@ -40,32 +41,116 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// deviceId := cfg.Require("deviceId") -// portName := "eth1" -// if param := cfg.Get("portName"); param != "" { -// portName = param +// test, err := metal.NewDevice(ctx, "test", &metal.DeviceArgs{ +// Hostname: pulumi.String("test"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("ny"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err +// } +// testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{ +// DeviceId: test.ID(), +// Type: pulumi.String("layer2-individual"), +// }) +// if err != nil { +// return err +// } +// test1, err := metal.NewVlan(ctx, "test1", &metal.VlanArgs{ +// Description: pulumi.String("VLAN in New York"), +// Metro: pulumi.String("ny"), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err +// } +// test2, err := metal.NewVlan(ctx, "test2", &metal.VlanArgs{ +// Description: pulumi.String("VLAN in New Jersey"), +// Metro: pulumi.String("ny"), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err +// } +// test1PortVlanAttachment, err := metal.NewPortVlanAttachment(ctx, "test1PortVlanAttachment", &metal.PortVlanAttachmentArgs{ +// DeviceId: testDeviceNetworkType.ID(), +// VlanVnid: test1.Vxlan, +// PortName: pulumi.String("eth1"), +// }) +// if err != nil { +// return err +// } +// _, err = metal.NewPortVlanAttachment(ctx, "test2PortVlanAttachment", &metal.PortVlanAttachmentArgs{ +// DeviceId: testDeviceNetworkType.ID(), +// VlanVnid: test2.Vxlan, +// PortName: pulumi.String("eth1"), +// Native: pulumi.Bool(true), +// }, pulumi.DependsOn([]pulumi.Resource{ +// test1PortVlanAttachment, +// })) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 1 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{ +// Description: pulumi.String("VLAN in New York"), +// Metro: pulumi.String("ny"), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err +// } +// testDevice, err := metal.NewDevice(ctx, "testDevice", &metal.DeviceArgs{ +// Hostname: pulumi.String("test"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("ny"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// }) +// if err != nil { +// return err // } -// vxlanId := 1004 -// if param := cfg.GetInt("vxlanId"); param != 0 { -// vxlanId = param +// testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{ +// DeviceId: testDevice.ID(), +// Type: pulumi.String("hybrid"), +// }) +// if err != nil { +// return err // } -// attach, err := metal.NewPortVlanAttachment(ctx, "attach", &metal.PortVlanAttachmentArgs{ -// DeviceId: pulumi.String(deviceId), -// PortName: pulumi.String(portName), -// VlanVnid: pulumi.Int(vxlanId), +// _, err = metal.NewPortVlanAttachment(ctx, "testPortVlanAttachment", &metal.PortVlanAttachmentArgs{ +// DeviceId: testDeviceNetworkType.ID(), +// PortName: pulumi.String("eth1"), +// VlanVnid: test.Vxlan, // }) // if err != nil { // return err // } -// ctx.Export("attachId", attach.ID()) -// ctx.Export("portId", attach.PortId) // return nil // }) // } diff --git a/sdk/go/equinix/metal/project.go b/sdk/go/equinix/metal/project.go index 6cbb6cb1..f95b9603 100644 --- a/sdk/go/equinix/metal/project.go +++ b/sdk/go/equinix/metal/project.go @@ -16,6 +16,7 @@ import ( // > **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects. // // ## Example Usage +// ### example 3 // ```go // package main // @@ -23,26 +24,75 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// organizationId := cfg.Require("organizationId") -// name := "Default Project" -// if param := cfg.Get("name"); param != "" { -// name = param +// _, err := metal.NewProject(ctx, "existingProject", &metal.ProjectArgs{ +// Name: pulumi.String("The name of the project (if different, will rewrite)"), +// BgpConfig: &metal.ProjectBgpConfigArgs{ +// DeploymentType: pulumi.String("local"), +// Md5: pulumi.String("C179c28c41a85b"), +// Asn: pulumi.Int(65000), +// }, +// }) +// if err != nil { +// return err // } -// projectResource, err := metal.NewProject(ctx, "project", &metal.ProjectArgs{ -// Name: pulumi.String(name), -// OrganizationId: pulumi.String(organizationId), +// return nil +// }) +// } +// +// ``` +// ### example 2 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewProject(ctx, "tfProject1", &metal.ProjectArgs{ +// Name: pulumi.String("tftest"), +// BgpConfig: &metal.ProjectBgpConfigArgs{ +// DeploymentType: pulumi.String("local"), +// Md5: pulumi.String("C179c28c41a85b"), +// Asn: pulumi.Int(65000), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 1 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewProject(ctx, "tfProject1", &metal.ProjectArgs{ +// Name: pulumi.String("Terraform Fun"), // }) // if err != nil { // return err // } -// ctx.Export("projectId", projectResource.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/metal/projectApiKey.go b/sdk/go/equinix/metal/projectApiKey.go index 2962db1b..a0d8916b 100644 --- a/sdk/go/equinix/metal/projectApiKey.go +++ b/sdk/go/equinix/metal/projectApiKey.go @@ -25,27 +25,19 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// readOnly := false -// if param := cfg.GetBool("readOnly"); param { -// readOnly = param -// } -// apiKey, err := metal.NewProjectApiKey(ctx, "apiKey", &metal.ProjectApiKeyArgs{ -// ProjectId: pulumi.String(projectId), -// Description: pulumi.String("A project level API Key"), -// ReadOnly: pulumi.Bool(readOnly), +// _, err := metal.NewProjectApiKey(ctx, "test", &metal.ProjectApiKeyArgs{ +// ProjectId: pulumi.Any(existingProjectId), +// Description: pulumi.String("Read-only key scoped to a projct"), +// ReadOnly: pulumi.Bool(true), // }) // if err != nil { // return err // } -// ctx.Export("apiKeyToken", apiKey.Token) // return nil // }) // } diff --git a/sdk/go/equinix/metal/projectSshKey.go b/sdk/go/equinix/metal/projectSshKey.go index 3a03c1c6..81f33794 100644 --- a/sdk/go/equinix/metal/projectSshKey.go +++ b/sdk/go/equinix/metal/projectSshKey.go @@ -21,35 +21,36 @@ import ( // // import ( // -// "os" -// // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // -// func readFileOrPanic(path string) pulumi.StringPtrInput { -// data, err := os.ReadFile(path) -// if err != nil { -// panic(err.Error()) -// } -// return pulumi.String(string(data)) -// } -// // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// sshKey, err := metal.NewProjectSshKey(ctx, "sshKey", &metal.ProjectSshKeyArgs{ +// projectId := "" +// test, err := metal.NewProjectSshKey(ctx, "test", &metal.ProjectSshKeyArgs{ +// Name: pulumi.String("test"), +// PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2"), +// ProjectId: pulumi.String(projectId), +// }) +// if err != nil { +// return err +// } +// _, err = metal.NewDevice(ctx, "testDevice", &metal.DeviceArgs{ +// Hostname: pulumi.String("test"), +// Plan: pulumi.String(metal.PlanC3MediumX86), +// Metro: pulumi.String("ny"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectSshKeyIds: pulumi.StringArray{ +// test.ID(), +// }, // ProjectId: pulumi.String(projectId), -// Name: pulumi.String("johnKent"), -// PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), // }) // if err != nil { // return err // } -// ctx.Export("sshKeyId", sshKey.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/metal/reservedIpBlock.go b/sdk/go/equinix/metal/reservedIpBlock.go index 7fc06720..e99b9a13 100644 --- a/sdk/go/equinix/metal/reservedIpBlock.go +++ b/sdk/go/equinix/metal/reservedIpBlock.go @@ -26,6 +26,7 @@ import ( // See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. // // ## Example Usage +// ### example 1 // ```go // package main // @@ -33,37 +34,85 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// metro := "FR" -// if param := cfg.Get("metro"); param != "" { -// metro = param +// _, err := metal.NewReservedIpBlock(ctx, "twoElasticAddresses", &metal.ReservedIpBlockArgs{ +// ProjectId: pulumi.Any(projectId), +// Metro: pulumi.String("sv"), +// Quantity: pulumi.Int(2), +// }) +// if err != nil { +// return err // } -// _type := "public_ipv4" -// if param := cfg.Get("type"); param != "" { -// _type = param +// _, err = metal.NewReservedIpBlock(ctx, "test1", &metal.ReservedIpBlockArgs{ +// ProjectId: pulumi.Any(projectId), +// Type: pulumi.String(metal.IpBlockTypePublicIPv4), +// Metro: pulumi.String("sv"), +// Quantity: pulumi.Int(1), +// }) +// if err != nil { +// return err // } -// quantity := 1 -// if param := cfg.GetInt("quantity"); param != 0 { -// quantity = param +// _, err = metal.NewReservedIpBlock(ctx, "test", &metal.ReservedIpBlockArgs{ +// ProjectId: pulumi.Any(projectId), +// Type: pulumi.String(metal.IpBlockTypeGlobalIPv4), +// Quantity: pulumi.Int(1), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 2 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := metal.NewReservedIpBlock(ctx, "example", &metal.ReservedIpBlockArgs{ +// ProjectId: pulumi.Any(projectId), +// Metro: pulumi.String("sv"), +// Quantity: pulumi.Int(2), +// }) +// if err != nil { +// return err // } -// ipBlock, err := metal.NewReservedIpBlock(ctx, "ipBlock", &metal.ReservedIpBlockArgs{ -// ProjectId: pulumi.String(projectId), -// Type: pulumi.String("public_ipv4"), -// Quantity: pulumi.Int(quantity), -// Metro: pulumi.String(metro), +// _, err = metal.NewDevice(ctx, "nodes", &metal.DeviceArgs{ +// ProjectId: pulumi.Any(projectId), +// Metro: pulumi.String("sv"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// Hostname: pulumi.String("test"), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// IpAddresses: metal.DeviceIpAddressArray{ +// &metal.DeviceIpAddressArgs{ +// Type: pulumi.String("public_ipv4"), +// Cidr: pulumi.Int(31), +// ReservationIds: pulumi.StringArray{ +// example.ID(), +// }, +// }, +// &metal.DeviceIpAddressArgs{ +// Type: pulumi.String("private_ipv4"), +// }, +// }, // }) // if err != nil { // return err // } -// ctx.Export("ipBlockId", ipBlock.ID()) -// ctx.Export("ipBlockSubent", ipBlock.CidrNotation) // return nil // }) // } diff --git a/sdk/go/equinix/metal/spotMarketRequest.go b/sdk/go/equinix/metal/spotMarketRequest.go index e69e9c93..ab3dfd7f 100644 --- a/sdk/go/equinix/metal/spotMarketRequest.go +++ b/sdk/go/equinix/metal/spotMarketRequest.go @@ -23,22 +23,15 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// metro := "FR" -// if param := cfg.Get("metro"); param != "" { -// metro = param -// } -// request, err := metal.NewSpotMarketRequest(ctx, "request", &metal.SpotMarketRequestArgs{ -// ProjectId: pulumi.String(projectId), -// Metro: pulumi.String(metro), -// MaxBidPrice: pulumi.Float64(0.75), +// _, err := metal.NewSpotMarketRequest(ctx, "req", &metal.SpotMarketRequestArgs{ +// ProjectId: pulumi.Any(projectId), +// MaxBidPrice: pulumi.Float64(0.03), +// Metro: pulumi.String("ny"), // DevicesMin: pulumi.Int(1), // DevicesMax: pulumi.Int(1), // InstanceParameters: &metal.SpotMarketRequestInstanceParametersArgs{ @@ -51,7 +44,6 @@ import ( // if err != nil { // return err // } -// ctx.Export("requestId", request.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/metal/sshKey.go b/sdk/go/equinix/metal/sshKey.go index 7fd3a648..4d5f3ff1 100644 --- a/sdk/go/equinix/metal/sshKey.go +++ b/sdk/go/equinix/metal/sshKey.go @@ -23,31 +23,40 @@ import ( // // import ( // -// "os" -// // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // -// func readFileOrPanic(path string) pulumi.StringPtrInput { -// data, err := os.ReadFile(path) -// if err != nil { -// panic(err.Error()) -// } -// return pulumi.String(string(data)) -// } -// // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// sshKey, err := metal.NewSshKey(ctx, "sshKey", &metal.SshKeyArgs{ -// Name: pulumi.String("johnKent"), -// PublicKey: readFileOrPanic("/Users/John/.ssh/metal_rsa.pub"), +// invokeFile, err := std.File(ctx, &std.FileArgs{ +// Input: "/home/terraform/.ssh/id_rsa.pub", +// }, nil) +// if err != nil { +// return err +// } +// key1, err := metal.NewSshKey(ctx, "key1", &metal.SshKeyArgs{ +// Name: pulumi.String("terraform-1"), +// PublicKey: invokeFile.Result, // }) // if err != nil { // return err // } -// ctx.Export("sshKeyId", sshKey.ID()) +// _, err = metal.NewDevice(ctx, "test", &metal.DeviceArgs{ +// Hostname: pulumi.String("test-device"), +// Plan: pulumi.String(metal.PlanC3SmallX86), +// Metro: pulumi.String("sv"), +// OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04), +// BillingCycle: pulumi.String(metal.BillingCycleHourly), +// ProjectId: pulumi.Any(projectId), +// }, pulumi.DependsOn([]pulumi.Resource{ +// key1, +// })) +// if err != nil { +// return err +// } // return nil // }) // } diff --git a/sdk/go/equinix/metal/userApiKey.go b/sdk/go/equinix/metal/userApiKey.go index 7261134b..ed49f22b 100644 --- a/sdk/go/equinix/metal/userApiKey.go +++ b/sdk/go/equinix/metal/userApiKey.go @@ -25,29 +25,18 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// description := "An user level API Key" -// if param := cfg.Get("description"); param != "" { -// description = param -// } -// readOnly := false -// if param := cfg.GetBool("readOnly"); param { -// readOnly = param -// } -// apiKey, err := metal.NewUserApiKey(ctx, "apiKey", &metal.UserApiKeyArgs{ -// Description: pulumi.String(description), -// ReadOnly: pulumi.Bool(readOnly), +// _, err := metal.NewUserApiKey(ctx, "test", &metal.UserApiKeyArgs{ +// Description: pulumi.String("Read-only user key"), +// ReadOnly: pulumi.Bool(true), // }) // if err != nil { // return err // } -// ctx.Export("apiKeyToken", apiKey.Token) // return nil // }) // } diff --git a/sdk/go/equinix/metal/virtualCircuit.go b/sdk/go/equinix/metal/virtualCircuit.go index f1d7f0c0..518b6610 100644 --- a/sdk/go/equinix/metal/virtualCircuit.go +++ b/sdk/go/equinix/metal/virtualCircuit.go @@ -25,31 +25,36 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// connectionId := cfg.Require("connectionId") -// vlanId := cfg.Require("vlanId") -// portId := metal.LookupInterconnection(ctx, &metal.LookupInterconnectionArgs{ -// ConnectionId: connectionId, -// }, nil).Ports[0].Id -// vc, err := metal.NewVirtualCircuit(ctx, "vc", &metal.VirtualCircuitArgs{ -// ConnectionId: pulumi.String(connectionId), +// projectId := "52000fb2-ee46-4673-93a8-de2c2bdba33c" +// connId := "73f12f29-3e19-43a0-8e90-ae81580db1e0" +// test, err := metal.LookupInterconnection(ctx, &metal.LookupInterconnectionArgs{ +// ConnectionId: connId, +// }, nil) +// if err != nil { +// return err +// } +// testVlan, err := metal.NewVlan(ctx, "testVlan", &metal.VlanArgs{ +// ProjectId: pulumi.String(projectId), +// Metro: pulumi.String(test.Metro), +// }) +// if err != nil { +// return err +// } +// _, err = metal.NewVirtualCircuit(ctx, "testVirtualCircuit", &metal.VirtualCircuitArgs{ +// ConnectionId: pulumi.String(connId), // ProjectId: pulumi.String(projectId), -// PortId: *pulumi.String(portId), -// VlanId: pulumi.String(vlanId), +// PortId: pulumi.String(test.Ports[0].Id), +// VlanId: testVlan.ID(), // NniVlan: pulumi.Int(1056), // }) // if err != nil { // return err // } -// ctx.Export("vcStatus", vc.Status) -// ctx.Export("vcVnid", vc.Vnid) // return nil // }) // } diff --git a/sdk/go/equinix/metal/vlan.go b/sdk/go/equinix/metal/vlan.go index f7a67c98..72424781 100644 --- a/sdk/go/equinix/metal/vlan.go +++ b/sdk/go/equinix/metal/vlan.go @@ -28,29 +28,20 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// metro := "DA" -// if param := cfg.Get("metro"); param != "" { -// metro = param -// } -// vxlan := cfg.RequireInt("vxlan") -// vlan, err := metal.NewVlan(ctx, "vlan", &metal.VlanArgs{ -// Description: pulumi.String("VLAN in Dallas"), -// ProjectId: pulumi.String(projectId), -// Metro: pulumi.String(metro), -// Vxlan: pulumi.Int(vxlan), +// _, err := metal.NewVlan(ctx, "vlan1", &metal.VlanArgs{ +// Description: pulumi.String("VLAN in New Jersey"), +// Metro: pulumi.String("sv"), +// ProjectId: pulumi.Any(projectId), +// Vxlan: pulumi.Int(1040), // }) // if err != nil { // return err // } -// ctx.Export("vlanId", vlan.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/metal/vrf.go b/sdk/go/equinix/metal/vrf.go index c80d8ed4..08d30c2b 100644 --- a/sdk/go/equinix/metal/vrf.go +++ b/sdk/go/equinix/metal/vrf.go @@ -18,6 +18,7 @@ import ( // See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. // // ## Example Usage +// ### example 2 // ```go // package main // @@ -25,33 +26,111 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// projectId := cfg.Require("projectId") -// metro := "DA" -// if param := cfg.Get("metro"); param != "" { -// metro = param +// example, err := metal.NewReservedIpBlock(ctx, "example", &metal.ReservedIpBlockArgs{ +// Description: pulumi.String("Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space."), +// ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), +// Metro: pulumi.Any(exampleEquinixMetalVrf.Metro), +// Type: pulumi.String("vrf"), +// VrfId: pulumi.Any(exampleEquinixMetalVrf.Id), +// Cidr: pulumi.Int(29), +// Network: pulumi.String("192.168.100.0"), +// }) +// if err != nil { +// return err +// } +// exampleVlan, err := metal.NewVlan(ctx, "exampleVlan", &metal.VlanArgs{ +// Description: pulumi.String("A VLAN for Layer2 and Hybrid Metal devices"), +// Metro: pulumi.Any(exampleEquinixMetalVrf.Metro), +// ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), +// }) +// if err != nil { +// return err // } -// vrf, err := metal.NewVrf(ctx, "vrf", &metal.VrfArgs{ -// Description: pulumi.String("VRF with ASN 65000 and a pool of address space"), +// _, err = metal.NewGateway(ctx, "exampleGateway", &metal.GatewayArgs{ +// ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), +// VlanId: exampleVlan.ID(), +// IpReservationId: example.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 1 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := metal.NewProject(ctx, "example", &metal.ProjectArgs{ +// Name: pulumi.String("example"), +// }) +// if err != nil { +// return err +// } +// _, err = metal.NewVrf(ctx, "exampleVrf", &metal.VrfArgs{ +// Description: pulumi.String("VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25"), // Name: pulumi.String("example-vrf"), -// Metro: pulumi.String(metro), +// Metro: pulumi.String("da"), // LocalAsn: pulumi.Int(65000), // IpRanges: pulumi.StringArray{ // pulumi.String("192.168.100.0/25"), // pulumi.String("192.168.200.0/25"), // }, -// ProjectId: pulumi.String(projectId), +// ProjectId: example.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 3 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/metal" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := metal.NewVirtualCircuit(ctx, "exampleVirtualCircuit", &metal.VirtualCircuitArgs{ +// Name: pulumi.String("example-vc"), +// Description: pulumi.String("Virtual Circuit"), +// ConnectionId: pulumi.Any(example.Id), +// ProjectId: pulumi.Any(exampleEquinixMetalProject.Id), +// PortId: pulumi.Any(example.Ports[0].Id), +// NniVlan: pulumi.Int(1024), +// VrfId: pulumi.Any(exampleEquinixMetalVrf.Id), +// PeerAsn: pulumi.Int(65530), +// Subnet: pulumi.String("192.168.100.16/31"), +// MetalIp: pulumi.String("192.168.100.16"), +// CustomerIp: pulumi.String("192.168.100.17"), // }) // if err != nil { // return err // } -// ctx.Export("vrfId", vrf.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/networkedge/aclTemplate.go b/sdk/go/equinix/networkedge/aclTemplate.go index 756143cf..4de034bb 100644 --- a/sdk/go/equinix/networkedge/aclTemplate.go +++ b/sdk/go/equinix/networkedge/aclTemplate.go @@ -30,30 +30,29 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// aclTemplate, err := networkedge.NewAclTemplate(ctx, "aclTemplate", &networkedge.AclTemplateArgs{ +// _, err := networkedge.NewAclTemplate(ctx, "myacl", &networkedge.AclTemplateArgs{ // Name: pulumi.String("test"), // Description: pulumi.String("Test ACL template"), +// ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), // InboundRules: networkedge.AclTemplateInboundRuleArray{ // &networkedge.AclTemplateInboundRuleArgs{ // Subnet: pulumi.String("1.1.1.1/32"), -// Protocol: pulumi.String("IP"), +// Protocol: pulumi.String(networkedge.AclRuleProtocolTypeIP), // SrcPort: pulumi.String("any"), // DstPort: pulumi.String("any"), // Description: pulumi.String("inbound rule description"), // }, // &networkedge.AclTemplateInboundRuleArgs{ -// Subnet: pulumi.String("2.2.2.2/28"), -// Protocol: pulumi.String("TCP"), -// SrcPort: pulumi.String("any"), -// DstPort: pulumi.String("any"), -// Description: pulumi.String("inbound rule description"), +// Subnet: pulumi.String("172.16.25.0/24"), +// Protocol: pulumi.String(networkedge.AclRuleProtocolTypeUDP), +// SrcPort: pulumi.String("any"), +// DstPort: pulumi.String("53,1045,2041"), // }, // }, // }) // if err != nil { // return err // } -// ctx.Export("templateId", aclTemplate.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/networkedge/bgp.go b/sdk/go/equinix/networkedge/bgp.go index 76fd5826..9e9827a1 100644 --- a/sdk/go/equinix/networkedge/bgp.go +++ b/sdk/go/equinix/networkedge/bgp.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// bgp, err := networkedge.NewBgp(ctx, "bgp", &networkedge.BgpArgs{ +// _, err := networkedge.NewBgp(ctx, "test", &networkedge.BgpArgs{ // ConnectionId: pulumi.String("54014acf-9730-4b55-a791-459283d05fb1"), // LocalIpAddress: pulumi.String("10.1.1.1/30"), // LocalAsn: pulumi.Int(12345), @@ -39,8 +39,6 @@ import ( // if err != nil { // return err // } -// ctx.Export("state", bgp.State) -// ctx.Export("provisioningStatus", bgp.ProvisioningStatus) // return nil // }) // } diff --git a/sdk/go/equinix/networkedge/device.go b/sdk/go/equinix/networkedge/device.go index 933164a3..e19c8dd5 100644 --- a/sdk/go/equinix/networkedge/device.go +++ b/sdk/go/equinix/networkedge/device.go @@ -26,83 +26,544 @@ import ( // * **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices. // // ## Example Usage +// ### example 8 // ```go // package main // // import ( // +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" // "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// accountName := cfg.Require("accountName") -// licenseToken := cfg.Require("licenseToken") -// sshUserName := cfg.Require("sshUserName") -// sshKeyName := cfg.Require("sshKeyName") -// aclTemplateId := cfg.Require("aclTemplateId") -// metro := "SV" -// if param := cfg.Get("metro"); param != "" { -// metro = param +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// Name: pulumi.StringRef("account-name"), +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err // } -// devicePackageCode := "network-essentials" -// if param := cfg.Get("devicePackageCode"); param != "" { -// devicePackageCode = param +// invokeFile, err := std.File(ctx, &std.FileArgs{ +// Input: filepath, +// }, nil) +// if err != nil { +// return err // } -// deviceVersion := "17.06.01a" -// if param := cfg.Get("deviceVersion"); param != "" { -// deviceVersion = param +// bluecatEdgeServicePointCloudinitPrimaryFile, err := networkedge.NewNetworkFile(ctx, "bluecatEdgeServicePointCloudinitPrimaryFile", &networkedge.NetworkFileArgs{ +// FileName: pulumi.String("TF-BLUECAT-ESP-cloud-init-file.txt"), +// Content: invokeFile.Result, +// MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), +// DeviceTypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), +// ProcessType: pulumi.String(networkedge.FileTypeCloudInit), +// SelfManaged: pulumi.Bool(true), +// Byol: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// invokeFile1, err := std.File(ctx, &std.FileArgs{ +// Input: filepath, +// }, nil) +// if err != nil { +// return err // } -// sizeInCores := 2 -// if param := cfg.GetInt("sizeInCores"); param != 0 { -// sizeInCores = param +// bluecatEdgeServicePointCloudinitSecondaryFile, err := networkedge.NewNetworkFile(ctx, "bluecatEdgeServicePointCloudinitSecondaryFile", &networkedge.NetworkFileArgs{ +// FileName: pulumi.String("TF-BLUECAT-ESP-cloud-init-file.txt"), +// Content: invokeFile1.Result, +// MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), +// DeviceTypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), +// ProcessType: pulumi.String(networkedge.FileTypeCloudInit), +// SelfManaged: pulumi.Bool(true), +// Byol: pulumi.Bool(true), +// }) +// if err != nil { +// return err // } -// termLength := 6 -// if param := cfg.GetInt("termLength"); param != 0 { -// termLength = param +// _, err = networkedge.NewDevice(ctx, "bluecatEdgeServicePointHa", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-bluecat-edge-service-point-p"), +// MetroCode: pulumi.String(sv.MetroCode), +// TypeCode: pulumi.String("BLUECAT-EDGE-SERVICE-POINT"), +// SelfManaged: pulumi.Bool(true), +// Connectivity: pulumi.String("PRIVATE"), +// Byol: pulumi.Bool(true), +// PackageCode: pulumi.String("STD"), +// Notifications: pulumi.StringArray{ +// pulumi.String("test@equinix.com"), +// }, +// AccountNumber: pulumi.String(sv.Number), +// CloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.Uuid, +// Version: pulumi.String("4.6.3"), +// CoreCount: pulumi.Int(4), +// TermLength: pulumi.Int(12), +// SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ +// Name: pulumi.String("tf-bluecat-edge-service-point-s"), +// MetroCode: pulumi.String(sv.MetroCode), +// Notifications: pulumi.StringArray{ +// pulumi.String("test@eq.com"), +// }, +// AccountNumber: pulumi.String(sv.Number), +// CloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.Uuid, +// }, +// }) +// if err != nil { +// return err // } -// additionalBandwidth := 5 -// if param := cfg.GetInt("additionalBandwidth"); param != 0 { -// additionalBandwidth = param +// return nil +// }) +// } +// +// ``` +// ### example 1 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// dc, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// MetroCode: "DC", +// }, nil) +// if err != nil { +// return err +// } +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err +// } +// _, err = networkedge.NewDevice(ctx, "csr1000vHa", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-csr1000v-p"), +// Throughput: pulumi.Int(500), +// ThroughputUnit: pulumi.String(networkedge.ThroughputUnitMbps), +// MetroCode: pulumi.String(dc.MetroCode), +// TypeCode: pulumi.String("CSR1000V"), +// SelfManaged: pulumi.Bool(false), +// Connectivity: pulumi.String("INTERNET-ACCESS"), +// Byol: pulumi.Bool(false), +// PackageCode: pulumi.String("SEC"), +// Notifications: pulumi.StringArray{ +// pulumi.String("john@equinix.com"), +// pulumi.String("marry@equinix.com"), +// pulumi.String("fred@equinix.com"), +// }, +// Hostname: pulumi.String("csr1000v-p"), +// TermLength: pulumi.Int(12), +// AccountNumber: pulumi.String(dc.Number), +// Version: pulumi.String("16.09.05"), +// CoreCount: pulumi.Int(2), +// SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ +// Name: pulumi.String("tf-csr1000v-s"), +// MetroCode: pulumi.String(sv.MetroCode), +// Hostname: pulumi.String("csr1000v-s"), +// Notifications: pulumi.StringArray{ +// pulumi.String("john@equinix.com"), +// pulumi.String("marry@equinix.com"), +// }, +// AccountNumber: pulumi.String(sv.Number), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 4 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// Name: pulumi.StringRef("account-name"), +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err // } -// accountNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ -// Name: pulumi.StringRef(accountName), -// MetroCode: metro, -// }, nil).Number -// c8KRouter, err := networkedge.NewDevice(ctx, "c8kRouter", &networkedge.DeviceArgs{ -// Name: pulumi.String("catalystRouter"), -// MetroCode: pulumi.String(metro), +// _, err = networkedge.NewDevice(ctx, "c8kvSingle", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-c8kv"), +// MetroCode: pulumi.String(sv.MetroCode), // TypeCode: pulumi.String("C8000V"), // SelfManaged: pulumi.Bool(true), // Byol: pulumi.Bool(true), -// PackageCode: pulumi.String(devicePackageCode), +// PackageCode: pulumi.String("network-essentials"), // Notifications: pulumi.StringArray{ -// pulumi.String("example@equinix.com"), +// pulumi.String("test@equinix.com"), // }, // Hostname: pulumi.String("C8KV"), -// AccountNumber: *pulumi.String(accountNum), -// Version: pulumi.Any(deviceVersion), -// CoreCount: pulumi.Int(sizeInCores), -// TermLength: pulumi.Int(termLength), -// LicenseToken: pulumi.String(licenseToken), -// AdditionalBandwidth: pulumi.Int(additionalBandwidth), +// AccountNumber: pulumi.String(sv.Number), +// Version: pulumi.String("17.06.01a"), +// CoreCount: pulumi.Int(2), +// TermLength: pulumi.Int(12), +// LicenseToken: pulumi.String("valid-license-token"), +// AdditionalBandwidth: pulumi.Int(5), +// SshKey: &networkedge.DeviceSshKeyArgs{ +// Username: pulumi.String("test-username"), +// KeyName: pulumi.String("valid-key-name"), +// }, +// AclTemplateId: pulumi.String("3e548c02-9164-4197-aa23-05b1f644883c"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 7 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// Name: pulumi.StringRef("account-name"), +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err +// } +// testPublicKey, err := networkedge.NewSshKey(ctx, "testPublicKey", &networkedge.SshKeyArgs{ +// Name: pulumi.String("key-name"), +// PublicKey: pulumi.String("ssh-dss key-value"), +// Type: pulumi.String("DSA"), +// }) +// if err != nil { +// return err +// } +// _, err = networkedge.NewDevice(ctx, "bluecatBddsHa", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-bluecat-bdds-p"), +// MetroCode: pulumi.String(sv.MetroCode), +// TypeCode: pulumi.String("BLUECAT"), +// SelfManaged: pulumi.Bool(true), +// Connectivity: pulumi.String("PRIVATE"), +// Byol: pulumi.Bool(true), +// PackageCode: pulumi.String("STD"), +// Notifications: pulumi.StringArray{ +// pulumi.String("test@equinix.com"), +// }, +// AccountNumber: pulumi.String(sv.Number), +// Version: pulumi.String("9.6.0"), +// CoreCount: pulumi.Int(2), +// TermLength: pulumi.Int(12), +// VendorConfiguration: pulumi.StringMap{ +// "hostname": pulumi.String("test"), +// "privateAddress": pulumi.String("x.x.x.x"), +// "privateCidrMask": pulumi.String("24"), +// "privateGateway": pulumi.String("x.x.x.x"), +// "licenseKey": pulumi.String("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), +// "licenseId": pulumi.String("xxxxxxxxxxxxxxx"), +// }, +// SshKey: &networkedge.DeviceSshKeyArgs{ +// Username: pulumi.String("test-username"), +// KeyName: testPublicKey.Name, +// }, +// SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ +// Name: pulumi.String("tf-bluecat-bdds-s"), +// MetroCode: pulumi.String(sv.MetroCode), +// Notifications: pulumi.StringArray{ +// pulumi.String("test@eq.com"), +// }, +// AccountNumber: pulumi.String(sv.Number), +// VendorConfiguration: pulumi.StringMap{ +// "hostname": pulumi.String("test"), +// "privateAddress": pulumi.String("x.x.x.x"), +// "privateCidrMask": pulumi.String("24"), +// "privateGateway": pulumi.String("x.x.x.x"), +// "licenseKey": pulumi.String("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"), +// "licenseId": pulumi.String("xxxxxxxxxxxxxxx"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 2 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err +// } +// _, err = networkedge.NewDevice(ctx, "panwCluster", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-panw"), +// MetroCode: pulumi.String(sv.MetroCode), +// TypeCode: pulumi.String("PA-VM"), +// SelfManaged: pulumi.Bool(true), +// Byol: pulumi.Bool(true), +// PackageCode: pulumi.String("VM100"), +// Notifications: pulumi.StringArray{ +// pulumi.String("john@equinix.com"), +// pulumi.String("marry@equinix.com"), +// pulumi.String("fred@equinix.com"), +// }, +// TermLength: pulumi.Int(12), +// AccountNumber: pulumi.String(sv.Number), +// Version: pulumi.String("10.1.3"), +// InterfaceCount: pulumi.Int(10), +// CoreCount: pulumi.Int(2), +// SshKey: &networkedge.DeviceSshKeyArgs{ +// Username: pulumi.String("test"), +// KeyName: pulumi.String("test-key"), +// }, +// AclTemplateId: pulumi.String("0bff6e05-f0e7-44cd-804a-25b92b835f8b"), +// ClusterDetails: &networkedge.DeviceClusterDetailsArgs{ +// ClusterName: pulumi.String("tf-panw-cluster"), +// Node0: &networkedge.DeviceClusterDetailsNode0Args{ +// VendorConfiguration: &networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs{ +// Hostname: pulumi.String("panw-node0"), +// }, +// LicenseToken: pulumi.String("licenseToken"), +// }, +// Node1: &networkedge.DeviceClusterDetailsNode1Args{ +// VendorConfiguration: &networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs{ +// Hostname: pulumi.String("panw-node1"), +// }, +// LicenseToken: pulumi.String("licenseToken"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 5 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// Name: pulumi.StringRef("account-name"), +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err +// } +// _, err = networkedge.NewDevice(ctx, "vsrxSingle", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-c8kv-sdwan"), +// MetroCode: pulumi.String(sv.MetroCode), +// TypeCode: pulumi.String("VSRX"), +// SelfManaged: pulumi.Bool(true), +// Byol: pulumi.Bool(true), +// PackageCode: pulumi.String("STD"), +// Notifications: pulumi.StringArray{ +// pulumi.String("test@equinix.com"), +// }, +// Hostname: pulumi.String("VSRX"), +// AccountNumber: pulumi.String(sv.Number), +// Version: pulumi.String("23.2R1.13"), +// CoreCount: pulumi.Int(2), +// TermLength: pulumi.Int(12), +// AdditionalBandwidth: pulumi.Int(5), +// ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), +// DiverseDeviceId: pulumi.String("ed7891bd-15b4-4f72-ac56-d96cfdacddcc"), +// SshKey: &networkedge.DeviceSshKeyArgs{ +// Username: pulumi.String("test-username"), +// KeyName: pulumi.String("valid-key-name"), +// }, +// AclTemplateId: pulumi.String("3e548c02-9164-4197-aa23-05b1f644883c"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 3 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi-std/sdk/go/std" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// filepath := "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" +// if param := cfg.Get("filepath"); param != "" { +// filepath = param +// } +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err +// } +// invokeFile, err := std.File(ctx, &std.FileArgs{ +// Input: filepath, +// }, nil) +// if err != nil { +// return err +// } +// aviatrixCloudinitFile, err := networkedge.NewNetworkFile(ctx, "aviatrixCloudinitFile", &networkedge.NetworkFileArgs{ +// FileName: pulumi.String("TF-AVX-cloud-init-file.txt"), +// Content: invokeFile.Result, +// MetroCode: sv.MetroCode.ApplyT(func(x *string) equinix.Metro { return equinix.Metro(*x) }).(equinix.MetroOutput), +// DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), +// ProcessType: pulumi.String(networkedge.FileTypeCloudInit), +// SelfManaged: pulumi.Bool(true), +// Byol: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// _, err = networkedge.NewDevice(ctx, "aviatrixSingle", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-aviatrix"), +// MetroCode: pulumi.String(sv.MetroCode), +// TypeCode: pulumi.String("AVIATRIX_EDGE"), +// SelfManaged: pulumi.Bool(true), +// Byol: pulumi.Bool(true), +// PackageCode: pulumi.String("STD"), +// Notifications: pulumi.StringArray{ +// pulumi.String("john@equinix.com"), +// }, +// TermLength: pulumi.Int(12), +// AccountNumber: pulumi.String(sv.Number), +// Version: pulumi.String("6.9"), +// CoreCount: pulumi.Int(2), +// CloudInitFileId: aviatrixCloudinitFile.Uuid, +// AclTemplateId: pulumi.String("c06150ea-b604-4ad1-832a-d63936e9b938"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### example 6 +// ```go +// package main +// +// import ( +// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// sv, err := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ +// Name: pulumi.StringRef("account-name"), +// MetroCode: "SV", +// }, nil) +// if err != nil { +// return err +// } +// testPublicKey, err := networkedge.NewSshKey(ctx, "testPublicKey", &networkedge.SshKeyArgs{ +// Name: pulumi.String("key-name"), +// PublicKey: pulumi.String("ssh-dss key-value"), +// Type: pulumi.String("DSA"), +// }) +// if err != nil { +// return err +// } +// _, err = networkedge.NewDevice(ctx, "aristaHa", &networkedge.DeviceArgs{ +// Name: pulumi.String("tf-arista-p"), +// MetroCode: pulumi.String(sv.MetroCode), +// TypeCode: pulumi.String("ARISTA-ROUTER"), +// SelfManaged: pulumi.Bool(true), +// Connectivity: pulumi.String("PRIVATE"), +// Byol: pulumi.Bool(true), +// PackageCode: pulumi.String("CloudEOS"), +// Notifications: pulumi.StringArray{ +// pulumi.String("test@equinix.com"), +// }, +// Hostname: pulumi.String("arista-p"), +// AccountNumber: pulumi.String(sv.Number), +// Version: pulumi.String("4.29.0"), +// CoreCount: pulumi.Int(4), +// TermLength: pulumi.Int(12), +// AdditionalBandwidth: pulumi.Int(5), // SshKey: &networkedge.DeviceSshKeyArgs{ -// Username: pulumi.String(sshUserName), -// KeyName: pulumi.String(sshKeyName), +// Username: pulumi.String("test-username"), +// KeyName: testPublicKey.Name, +// }, +// AclTemplateId: pulumi.String("c637a17b-7a6a-4486-924b-30e6c36904b0"), +// SecondaryDevice: &networkedge.DeviceSecondaryDeviceArgs{ +// Name: pulumi.String("tf-arista-s"), +// MetroCode: pulumi.String(sv.MetroCode), +// Hostname: pulumi.String("arista-s"), +// Notifications: pulumi.StringArray{ +// pulumi.String("test@eq.com"), +// }, +// AccountNumber: pulumi.String(sv.Number), +// AclTemplateId: pulumi.String("fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138"), // }, -// AclTemplateId: pulumi.String(aclTemplateId), // }) // if err != nil { // return err // } -// ctx.Export("routerId", c8KRouter.ID()) -// ctx.Export("provisionStatus", c8KRouter.Status) -// ctx.Export("licenseStatus", c8KRouter.LicenseStatus) -// ctx.Export("sshIpAddress", c8KRouter.SshIpAddress) // return nil // }) // } diff --git a/sdk/go/equinix/networkedge/deviceLink.go b/sdk/go/equinix/networkedge/deviceLink.go index 1f09d3d3..e728cf3b 100644 --- a/sdk/go/equinix/networkedge/deviceLink.go +++ b/sdk/go/equinix/networkedge/deviceLink.go @@ -23,47 +23,32 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// accountName := cfg.Require("accountName") -// accountMetro := cfg.Require("accountMetro") -// device1Id := cfg.Require("device1Id") -// device2Id := cfg.Require("device2Id") -// accountfNum := networkedge.GetAccount(ctx, &networkedge.GetAccountArgs{ -// Name: pulumi.StringRef(accountName), -// MetroCode: accountMetro, -// }, nil).Number -// device1Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ -// Uuid: pulumi.StringRef(device1Id), -// }, nil).MetroCode -// device2Metro := networkedge.LookupDevice(ctx, &networkedge.LookupDeviceArgs{ -// Uuid: pulumi.StringRef(device2Id), -// }, nil).MetroCode -// deviceLink, err := networkedge.NewDeviceLink(ctx, "deviceLink", &networkedge.DeviceLinkArgs{ -// Name: pulumi.String("test-link"), -// Subnet: pulumi.String("192.168.40.64/27"), +// _, err := networkedge.NewDeviceLink(ctx, "test", &networkedge.DeviceLinkArgs{ +// Name: pulumi.String("test-link"), +// Subnet: pulumi.String("192.168.40.64/27"), +// ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), // Devices: networkedge.DeviceLinkDeviceArray{ // &networkedge.DeviceLinkDeviceArgs{ -// Id: pulumi.String("device1Id"), +// Id: pulumi.Any(testEquinixNetworkDevice.Uuid), // Asn: pulumi.Int(22111), // InterfaceId: pulumi.Int(6), // }, // &networkedge.DeviceLinkDeviceArgs{ -// Id: pulumi.String("device2Id"), +// Id: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].Uuid), // Asn: pulumi.Int(22333), // InterfaceId: pulumi.Int(7), // }, // }, // Links: networkedge.DeviceLinkLinkArray{ // &networkedge.DeviceLinkLinkArgs{ -// AccountNumber: *pulumi.String(accountfNum), -// SrcMetroCode: *pulumi.String(device1Metro), -// DstMetroCode: *pulumi.String(device2Metro), +// AccountNumber: pulumi.Any(testEquinixNetworkDevice.AccountNumber), +// SrcMetroCode: pulumi.Any(testEquinixNetworkDevice.MetroCode), +// DstMetroCode: pulumi.Any(testEquinixNetworkDevice.SecondaryDevice[0].MetroCode), // Throughput: pulumi.String("50"), // ThroughputUnit: pulumi.String("Mbps"), // }, @@ -72,8 +57,6 @@ import ( // if err != nil { // return err // } -// ctx.Export("status", deviceLink.Status) -// ctx.Export("devices", deviceLink.Devices) // return nil // }) // } diff --git a/sdk/go/equinix/networkedge/networkFile.go b/sdk/go/equinix/networkedge/networkFile.go index aace98c2..5d7fa430 100644 --- a/sdk/go/equinix/networkedge/networkFile.go +++ b/sdk/go/equinix/networkedge/networkFile.go @@ -21,43 +21,39 @@ import ( // // import ( // -// "os" -// +// "github.com/equinix/pulumi-equinix/sdk/go/equinix" // "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" +// "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // -// func readFileOrPanic(path string) pulumi.StringPtrInput { -// data, err := os.ReadFile(path) -// if err != nil { -// panic(err.Error()) -// } -// return pulumi.String(string(data)) -// } -// // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // cfg := config.New(ctx, "") -// metro := "SV" -// if param := cfg.Get("metro"); param != "" { -// metro = param +// filepath := "fileFolder/fileName.txt" +// if param := cfg.Get("filepath"); param != "" { +// filepath = param +// } +// invokeFile, err := std.File(ctx, &std.FileArgs{ +// Input: filepath, +// }, nil) +// if err != nil { +// return err // } -// networkFile, err := networkedge.NewNetworkFile(ctx, "networkFile", &networkedge.NetworkFileArgs{ -// FileName: pulumi.String("Aviatrix-ZTP-file"), -// Content: readFileOrPanic("./../assets/aviatrix-cloud-init.txt"), -// MetroCode: pulumi.String(metro), +// _, err = networkedge.NewNetworkFile(ctx, "test-file", &networkedge.NetworkFileArgs{ +// FileName: pulumi.String("fileName.txt"), +// Content: invokeFile.Result, +// MetroCode: pulumi.String(equinix.MetroSiliconValley), // DeviceTypeCode: pulumi.String("AVIATRIX_EDGE"), -// ProcessType: pulumi.String("CLOUD_INIT"), +// ProcessType: pulumi.String(networkedge.FileTypeCloudInit), // SelfManaged: pulumi.Bool(true), // Byol: pulumi.Bool(true), // }) // if err != nil { // return err // } -// ctx.Export("networkFileId", networkFile.ID()) -// ctx.Export("networkFileStatus", networkFile.Status) // return nil // }) // } diff --git a/sdk/go/equinix/networkedge/sshKey.go b/sdk/go/equinix/networkedge/sshKey.go index 3a6e787c..416c6028 100644 --- a/sdk/go/equinix/networkedge/sshKey.go +++ b/sdk/go/equinix/networkedge/sshKey.go @@ -21,31 +21,34 @@ import ( // // import ( // -// "os" -// // "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // -// func readFileOrPanic(path string) pulumi.StringPtrInput { -// data, err := os.ReadFile(path) -// if err != nil { -// panic(err.Error()) -// } -// return pulumi.String(string(data)) -// } -// // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// sshKey, err := networkedge.NewSshKey(ctx, "sshKey", &networkedge.SshKeyArgs{ -// Name: pulumi.String("johnKent"), -// PublicKey: readFileOrPanic("/Users/John/.ssh/ne_rsa.pub"), +// _, err := networkedge.NewSshKey(ctx, "john", &networkedge.SshKeyArgs{ +// Name: pulumi.String("johnKent"), +// PublicKey: pulumi.String(` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX +// 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu +// iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS +// qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl +// mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N +// w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM +// 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 +// SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW +// WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F +// jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com +// +// `), +// +// Type: pulumi.String("RSA"), +// ProjectId: pulumi.String("a86d7112-d740-4758-9c9c-31e66373746b"), // }) // if err != nil { // return err // } -// ctx.Export("sshKeyId", sshKey.ID()) // return nil // }) // } diff --git a/sdk/go/equinix/networkedge/sshUser.go b/sdk/go/equinix/networkedge/sshUser.go index 1ca25423..8e2338b9 100644 --- a/sdk/go/equinix/networkedge/sshUser.go +++ b/sdk/go/equinix/networkedge/sshUser.go @@ -23,26 +23,22 @@ import ( // // "github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// cfg := config.New(ctx, "") -// device1Id := cfg.Require("device1Id") -// device2Id := cfg.Require("device2Id") -// sshUser, err := networkedge.NewSshUser(ctx, "sshUser", &networkedge.SshUserArgs{ -// Username: pulumi.String("johnKent"), +// _, err := networkedge.NewSshUser(ctx, "john", &networkedge.SshUserArgs{ +// Username: pulumi.String("john"), +// Password: pulumi.String("secret"), // DeviceIds: pulumi.StringArray{ -// pulumi.String(device1Id), -// pulumi.String(device2Id), +// pulumi.String("csr1000v-ha-uuid"), +// pulumi.String("csr1000v-ha-redundant-uuid"), // }, // }) // if err != nil { // return err // } -// ctx.Export("sshUserId", sshUser.ID()) // return nil // }) // } diff --git a/sdk/java/src/main/java/com/equinix/pulumi/fabric/CloudRouter.java b/sdk/java/src/main/java/com/equinix/pulumi/fabric/CloudRouter.java index 19823a87..bbc2c192 100644 --- a/sdk/java/src/main/java/com/equinix/pulumi/fabric/CloudRouter.java +++ b/sdk/java/src/main/java/com/equinix/pulumi/fabric/CloudRouter.java @@ -40,9 +40,11 @@ * import com.pulumi.core.Output; * import com.pulumi.equinix.fabric.CloudRouter; * import com.pulumi.equinix.fabric.CloudRouterArgs; + * import com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs; + * import com.pulumi.equinix.fabric.inputs.CloudRouterOrderArgs; * import com.pulumi.equinix.fabric.inputs.CloudRouterLocationArgs; * import com.pulumi.equinix.fabric.inputs.CloudRouterPackageArgs; - * import com.pulumi.equinix.fabric.inputs.CloudRouterNotificationArgs; + * import com.pulumi.equinix.fabric.inputs.CloudRouterProjectArgs; * import com.pulumi.equinix.fabric.inputs.CloudRouterAccountArgs; * import java.util.List; * import java.util.ArrayList; @@ -57,31 +59,32 @@ * } * * public static void stack(Context ctx) { - * final var config = ctx.config(); - * final var metro = config.get("metro").orElse("FR"); - * final var accountNum = config.get("accountNum"); - * var router = new CloudRouter("router", CloudRouterArgs.builder() - * .name("My-Fabric-Cloud-Router") + * var newCloudRouter = new CloudRouter("newCloudRouter", CloudRouterArgs.builder() + * .name("Router-SV") * .type("XF_ROUTER") + * .notifications(CloudRouterNotificationArgs.builder() + * .type("ALL") + * .emails( + * "example{@literal @}equinix.com", + * "test1{@literal @}equinix.com") + * .build()) + * .order(CloudRouterOrderArgs.builder() + * .purchaseOrderNumber("1-323292") + * .build()) * .location(CloudRouterLocationArgs.builder() - * .metroCode(metro) + * .metroCode("SV") * .build()) * .package_(CloudRouterPackageArgs.builder() - * .code("BASIC") + * .code("STANDARD") * .build()) - * .notifications(CloudRouterNotificationArgs.builder() - * .type("ALL") - * .emails("example{@literal @}equinix.com") + * .project(CloudRouterProjectArgs.builder() + * .projectId("776847000642406") * .build()) * .account(CloudRouterAccountArgs.builder() - * .accountNumber(272010) - * .build()) - * .project(CloudRouterProjectArgs.builder() - * .projectId("995072000433550") + * .accountNumber("203612") * .build()) * .build()); * - * ctx.export("routerId", router.id()); * } * } * } diff --git a/sdk/java/src/main/java/com/equinix/pulumi/fabric/Connection.java b/sdk/java/src/main/java/com/equinix/pulumi/fabric/Connection.java index 07292d81..b63a5fa6 100644 --- a/sdk/java/src/main/java/com/equinix/pulumi/fabric/Connection.java +++ b/sdk/java/src/main/java/com/equinix/pulumi/fabric/Connection.java @@ -30,29 +30,31 @@ /** * ## Example Usage + * ### example 9 *
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.fabric.Connection;
- * import com.equinix.pulumi.fabric.ConnectionArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionNotificationArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionRedundancyArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionASideArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointPortArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionZSideArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointProfileArgs;
- * import com.equinix.pulumi.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
- * import com.equinix.pulumi.fabric.inputs.GetServiceProfilesArgs;
- * import com.equinix.pulumi.fabric.inputs.GetServiceProfilesFilterArgs;
- * import com.equinix.pulumi.fabric.inputs.GetPortsArgs;
- * import com.equinix.pulumi.fabric.inputs.GetPortsFilterArgs;
- * import com.equinix.pulumi.fabric.FabricFunctions;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -60,70 +62,1136 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var metro = config.get("metro").orElse("FR");
- *         final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("50"));
- *         final var fabricPortName = config.get("fabricPortName").get().toString();
- *         final var awsRegion = config.get("awsRegion").orElse("eu-central-1");
- *         final var awsAccountId = config.get("awsAccountId").get().toString();
- *         System.out.println(System.getProperty("java.classpath"));
- *         final var serviceProfileId = FabricFunctions.getServiceProfiles(GetServiceProfilesArgs.builder()
- *             .filter(GetServiceProfilesFilterArgs.builder()
- *                 .property("/name")
- *                 .operator("=")
- *                 .values("AWS Direct Connect")
- *                 .build())
- *             .build()).applyValue(data -> data.data().get(0).uuid().get());
- * 
- *         final var portId = FabricFunctions.getPorts(GetPortsArgs.builder()
- *             .filter(GetPortsFilterArgs.builder()
- *                 .name(fabricPortName)
- *                 .build())
- *             .build()).applyValue(data -> data.data().get(0).uuid().get());
- * 
- *         var colo2Aws = new Connection("colo2Aws", ConnectionArgs.builder()        
- *             .name("Pulumi-colo2Aws")
+ *         var fcr2Azure = new Connection("fcr2Azure", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("IP_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("CLOUD_ROUTER")
+ *                     .router(ConnectionASideAccessPointRouterArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("SP")
+ *                     .authenticationKey("")
+ *                     .peeringType("PRIVATE")
+ *                     .profile(ConnectionZSideAccessPointProfileArgs.builder()
+ *                         .type("L2_PROFILE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 5 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var vd2Port = new Connection("vd2Port", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPL_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("VD")
+ *                     .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()
+ *                         .type("EDGE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .interface_(ConnectionASideAccessPointInterfaceArgs.builder()
+ *                         .type("NETWORK")
+ *                         .id(7)
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionZSideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder()
+ *                         .type("DOT1Q")
+ *                         .vlanSTag("3711")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 12 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var fcr2Network = new Connection("fcr2Network", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("IPWAN_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("CLOUD_ROUTER")
+ *                     .router(ConnectionASideAccessPointRouterArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("NETWORK")
+ *                     .network(ConnectionZSideAccessPointNetworkArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 11 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var vd2AzurePrimary = new Connection("vd2AzurePrimary", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPL_VC")
+ *             .redundancy(ConnectionRedundancyArgs.builder()
+ *                 .priority("PRIMARY")
+ *                 .build())
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("VD")
+ *                     .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()
+ *                         .type("EDGE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .interface_(ConnectionASideAccessPointInterfaceArgs.builder()
+ *                         .type("CLOUD")
+ *                         .id(7)
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("SP")
+ *                     .authenticationKey("")
+ *                     .peeringType("PRIVATE")
+ *                     .profile(ConnectionZSideAccessPointProfileArgs.builder()
+ *                         .type("L2_PROFILE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *         var vd2AzureSecondary = new Connection("vd2AzureSecondary", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPL_VC")
+ *             .redundancy(ConnectionRedundancyArgs.builder()
+ *                 .priority("SECONDARY")
+ *                 .group(vd2AzurePrimary.redundancy().applyValue(redundancy -> redundancy.group()))
+ *                 .build())
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("VD")
+ *                     .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()
+ *                         .type("EDGE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .interface_(ConnectionASideAccessPointInterfaceArgs.builder()
+ *                         .type("CLOUD")
+ *                         .id(5)
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("SP")
+ *                     .authenticationKey("")
+ *                     .peeringType("PRIVATE")
+ *                     .profile(ConnectionZSideAccessPointProfileArgs.builder()
+ *                         .type("L2_PROFILE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 6 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideServiceTokenArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var vd2Token = new Connection("vd2Token", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPL_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("VD")
+ *                     .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()
+ *                         .type("EDGE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .interface_(ConnectionASideAccessPointInterfaceArgs.builder()
+ *                         .type("NETWORK")
+ *                         .id(7)
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .serviceToken(ConnectionZSideServiceTokenArgs.builder()
+ *                     .uuid("")
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 3 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var epl = new Connection("epl", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EPL_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionASideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionZSideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 14 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var epl = new Connection("epl", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EPLAN_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionASideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("NETWORK")
+ *                     .network(ConnectionZSideAccessPointNetworkArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 4 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var accessEplVc = new Connection("accessEplVc", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("ACCESS_EPL_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionASideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()
+ *                         .type("QINQ")
+ *                         .vlanSTag("1976")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionZSideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 13 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var vd2Token = new Connection("vd2Token", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPLAN_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("VD")
+ *                     .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()
+ *                         .type("EDGE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .interface_(ConnectionASideAccessPointInterfaceArgs.builder()
+ *                         .type("CLOUD")
+ *                         .id(7)
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("NETWORK")
+ *                     .network(ConnectionZSideAccessPointNetworkArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 1 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var port2Port = new Connection("port2Port", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPL_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionASideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()
+ *                         .type("QINQ")
+ *                         .vlanSTag("1976")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionZSideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder()
+ *                         .type("QINQ")
+ *                         .vlanSTag("3711")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 8 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointRouterArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLinkProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var fcr2Port = new Connection("fcr2Port", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("IP_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("CLOUD_ROUTER")
+ *                     .router(ConnectionASideAccessPointRouterArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionZSideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .linkProtocol(ConnectionZSideAccessPointLinkProtocolArgs.builder()
+ *                         .type("DOT1Q")
+ *                         .vlanTag("2711")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 2 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionRedundancyArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var port2Aws = new Connection("port2Aws", ConnectionArgs.builder()
+ *             .name("ConnectionName")
  *             .type("EVPL_VC")
  *             .notifications(ConnectionNotificationArgs.builder()
  *                 .type("ALL")
- *                 .emails("example{@literal @}equinix.com")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
  *                 .build())
- *             .bandwidth(speedInMbps)
+ *             .bandwidth(50)
  *             .redundancy(ConnectionRedundancyArgs.builder()
  *                 .priority("PRIMARY")
  *                 .build())
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323929")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("COLO")
+ *                     .port(ConnectionASideAccessPointPortArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()
+ *                         .type("QINQ")
+ *                         .vlanSTag("2019")
+ *                         .vlanCTag("2112")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("SP")
+ *                     .authenticationKey("")
+ *                     .sellerRegion("us-west-1")
+ *                     .profile(ConnectionZSideAccessPointProfileArgs.builder()
+ *                         .type("L2_PROFILE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .additionalInfo(            
+ *                 Map.ofEntries(
+ *                     Map.entry("key", "accessKey"),
+ *                     Map.entry("value", "")
+ *                 ),
+ *                 Map.ofEntries(
+ *                     Map.entry("key", "secretKey"),
+ *                     Map.entry("value", "")
+ *                 ))
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 15 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointPortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointLinkProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointNetworkArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var epl = new Connection("epl", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPLAN_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
  *             .aSide(ConnectionASideArgs.builder()
  *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
  *                     .type("COLO")
  *                     .port(ConnectionASideAccessPointPortArgs.builder()
- *                         .uuid(portId)
+ *                         .uuid("")
  *                         .build())
  *                     .linkProtocol(ConnectionASideAccessPointLinkProtocolArgs.builder()
  *                         .type("DOT1Q")
- *                         .vlanTag(1234)
+ *                         .vlanSTag("1976")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("NETWORK")
+ *                     .network(ConnectionZSideAccessPointNetworkArgs.builder()
+ *                         .uuid("")
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 10 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointVirtualDeviceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideAccessPointInterfaceArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var vd2Azure = new Connection("vd2Azure", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPL_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .accessPoint(ConnectionASideAccessPointArgs.builder()
+ *                     .type("VD")
+ *                     .virtualDevice(ConnectionASideAccessPointVirtualDeviceArgs.builder()
+ *                         .type("EDGE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .interface_(ConnectionASideAccessPointInterfaceArgs.builder()
+ *                         .type("CLOUD")
+ *                         .id(7)
+ *                         .build())
+ *                     .build())
+ *                 .build())
+ *             .zSide(ConnectionZSideArgs.builder()
+ *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
+ *                     .type("SP")
+ *                     .authenticationKey("")
+ *                     .peeringType("PRIVATE")
+ *                     .profile(ConnectionZSideAccessPointProfileArgs.builder()
+ *                         .type("L2_PROFILE")
+ *                         .uuid("")
+ *                         .build())
+ *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
+ *                         .metroCode("SV")
  *                         .build())
  *                     .build())
  *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 7 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.Connection;
+ * import com.pulumi.equinix.fabric.ConnectionArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionOrderArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionASideServiceTokenArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointProfileArgs;
+ * import com.pulumi.equinix.fabric.inputs.ConnectionZSideAccessPointLocationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var token2Aws = new Connection("token2Aws", ConnectionArgs.builder()
+ *             .name("ConnectionName")
+ *             .type("EVPL_VC")
+ *             .notifications(ConnectionNotificationArgs.builder()
+ *                 .type("ALL")
+ *                 .emails(                
+ *                     "example{@literal @}equinix.com",
+ *                     "test1{@literal @}equinix.com")
+ *                 .build())
+ *             .bandwidth(50)
+ *             .order(ConnectionOrderArgs.builder()
+ *                 .purchaseOrderNumber("1-323292")
+ *                 .build())
+ *             .aSide(ConnectionASideArgs.builder()
+ *                 .serviceToken(ConnectionASideServiceTokenArgs.builder()
+ *                     .uuid("")
+ *                     .build())
+ *                 .build())
  *             .zSide(ConnectionZSideArgs.builder()
  *                 .accessPoint(ConnectionZSideAccessPointArgs.builder()
  *                     .type("SP")
- *                     .authenticationKey(awsAccountId)
- *                     .sellerRegion(awsRegion)
+ *                     .authenticationKey("")
+ *                     .sellerRegion("us-west-1")
  *                     .profile(ConnectionZSideAccessPointProfileArgs.builder()
  *                         .type("L2_PROFILE")
- *                         .uuid(serviceProfileId)
+ *                         .uuid("")
  *                         .build())
  *                     .location(ConnectionZSideAccessPointLocationArgs.builder()
- *                         .metroCode(metro)
+ *                         .metroCode("SV")
  *                         .build())
  *                     .build())
  *                 .build())
  *             .build());
  * 
- *         ctx.export("connectionId", colo2Aws.id());
- *         ctx.export("connectionStatus", colo2Aws.operation().applyValue(operation -> operation.equinixStatus()));
- *         ctx.export("connectionProviderStatus", colo2Aws.operation().applyValue(operation -> operation.providerStatus()));
- *         ctx.export("awsDirectConnectId", colo2Aws.zSide().applyValue(zSide -> zSide.accessPoint().get().providerConnectionId()));
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/fabric/RoutingProtocol.java b/sdk/java/src/main/java/com/equinix/pulumi/fabric/RoutingProtocol.java
index e500bd2c..360d3bc2 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/fabric/RoutingProtocol.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/fabric/RoutingProtocol.java
@@ -31,6 +31,7 @@
  * * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols
  * 
  * ## Example Usage
+ * ### example 3
  * 
  * {@code
  * package generated_program;
@@ -41,6 +42,10 @@
  * import com.pulumi.equinix.fabric.RoutingProtocol;
  * import com.pulumi.equinix.fabric.RoutingProtocolArgs;
  * import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args;
+ * import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args;
+ * import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args;
+ * import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args;
+ * import com.pulumi.resources.CustomResourceOptions;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -54,20 +59,120 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var connectionId = config.get("connectionId");
- *         var routingProtocol = new RoutingProtocol("routingProtocol", RoutingProtocolArgs.builder()        
- *             .connectionUuid(connectionId)
- *             .name("My-Direct-route-1")
+ *         var direct = new RoutingProtocol("direct", RoutingProtocolArgs.builder()
+ *             .connectionUuid("")
  *             .type("DIRECT")
+ *             .name("direct_rp")
  *             .directIpv4(RoutingProtocolDirectIpv4Args.builder()
- *                 .equinixIfaceIp("192.168.100.1/30")
+ *                 .equinixIfaceIp("190.1.1.1/30")
  *                 .build())
+ *             .directIpv6(RoutingProtocolDirectIpv6Args.builder()
+ *                 .equinixIfaceIp("190::1:1/126")
+ *                 .build())
+ *             .build());
+ * 
+ *         var bgp = new RoutingProtocol("bgp", RoutingProtocolArgs.builder()
+ *             .connectionUuid("")
+ *             .type("BGP")
+ *             .name("bgp_rp")
+ *             .bgpIpv4(RoutingProtocolBgpIpv4Args.builder()
+ *                 .customerPeerIp("190.1.1.2")
+ *                 .enabled(true)
+ *                 .build())
+ *             .bgpIpv6(RoutingProtocolBgpIpv6Args.builder()
+ *                 .customerPeerIp("190::1:2")
+ *                 .enabled(true)
+ *                 .build())
+ *             .customerAsn(4532)
+ *             .build(), CustomResourceOptions.builder()
+ *                 .dependsOn(direct)
+ *                 .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 1 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.RoutingProtocol;
+ * import com.pulumi.equinix.fabric.RoutingProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv4Args;
+ * import com.pulumi.equinix.fabric.inputs.RoutingProtocolDirectIpv6Args;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var direct = new RoutingProtocol("direct", RoutingProtocolArgs.builder()
+ *             .connectionUuid("")
+ *             .type("DIRECT")
+ *             .name("direct_rp")
+ *             .directIpv4(RoutingProtocolDirectIpv4Args.builder()
+ *                 .equinixIfaceIp("190.1.1.1/30")
+ *                 .build())
+ *             .directIpv6(RoutingProtocolDirectIpv6Args.builder()
+ *                 .equinixIfaceIp("190::1:1/126")
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 2 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.RoutingProtocol;
+ * import com.pulumi.equinix.fabric.RoutingProtocolArgs;
+ * import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv4Args;
+ * import com.pulumi.equinix.fabric.inputs.RoutingProtocolBgpIpv6Args;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var bgp = new RoutingProtocol("bgp", RoutingProtocolArgs.builder()
+ *             .connectionUuid("")
+ *             .type("BGP")
+ *             .name("bgp_rp")
+ *             .bgpIpv4(RoutingProtocolBgpIpv4Args.builder()
+ *                 .customerPeerIp("190.1.1.2")
+ *                 .enabled(true)
+ *                 .build())
+ *             .bgpIpv6(RoutingProtocolBgpIpv6Args.builder()
+ *                 .customerPeerIp("190::1:2")
+ *                 .enabled(true)
+ *                 .build())
+ *             .customerAsn(4532)
  *             .build());
  * 
- *         ctx.export("routingProtocolId", routingProtocol.id());
- *         ctx.export("routingProtocolState", routingProtocol.state());
- *         ctx.export("routingProtocolEquinixAsn", routingProtocol.equinixAsn());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/fabric/ServiceProfile.java b/sdk/java/src/main/java/com/equinix/pulumi/fabric/ServiceProfile.java
index f6c84789..f419fba0 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/fabric/ServiceProfile.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/fabric/ServiceProfile.java
@@ -40,14 +40,18 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.fabric.ServiceProfile;
- * import com.equinix.pulumi.fabric.ServiceProfileArgs;
- * import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs;
- * import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs;
- * import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigApiConfigArgs;
- * import com.equinix.pulumi.fabric.inputs.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs;
- * import com.equinix.pulumi.fabric.inputs.ServiceProfileAccountArgs;
- * import com.equinix.pulumi.fabric.inputs.ServiceProfileMarketingInfoArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.fabric.ServiceProfile;
+ * import com.pulumi.equinix.fabric.ServiceProfileArgs;
+ * import com.pulumi.equinix.fabric.inputs.ServiceProfileNotificationArgs;
+ * import com.pulumi.equinix.fabric.inputs.ServiceProfilePortArgs;
+ * import com.pulumi.equinix.fabric.inputs.ServiceProfileAccessPointTypeConfigArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -55,49 +59,36 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         var profile = new ServiceProfile("profile", ServiceProfileArgs.builder()        
- *             .name("Example Cloud Provider")
- *             .description("50 to 500 Mbps Hosted Connection to Example Cloud")
+ *         var newServiceProfile = new ServiceProfile("newServiceProfile", ServiceProfileArgs.builder()
+ *             .description("Service Profile for Receiving Connections")
+ *             .name("Name Of Business + Use Case Tag")
  *             .type("L2_PROFILE")
+ *             .visibility("PUBLIC")
+ *             .notifications(ServiceProfileNotificationArgs.builder()
+ *                 .emails("someone{@literal @}sample.com")
+ *                 .type("BANDWIDTH_ALERT")
+ *                 .build())
+ *             .allowedEmails(            
+ *                 "test{@literal @}equinix.com",
+ *                 "testagain{@literal @}equinix.com")
+ *             .ports(ServiceProfilePortArgs.builder()
+ *                 .uuid("c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee")
+ *                 .type("XF_PORT")
+ *                 .build())
  *             .accessPointTypeConfigs(ServiceProfileAccessPointTypeConfigArgs.builder()
  *                 .type("COLO")
- *                 .supportedBandwidths(                
- *                     50,
- *                     100,
- *                     200,
- *                     500)
  *                 .allowRemoteConnections(true)
- *                 .allowCustomBandwidth(false)
+ *                 .allowCustomBandwidth(true)
  *                 .allowBandwidthAutoApproval(false)
- *                 .linkProtocolConfig(ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs.builder()
- *                     .encapsulationStrategy("CTAGED")
- *                     .reuseVlanSTag(false)
- *                     .encapsulation("DOT1Q")
- *                     .build())
- *                 .enableAutoGenerateServiceKey(false)
  *                 .connectionRedundancyRequired(false)
- *                 .apiConfig(ServiceProfileAccessPointTypeConfigApiConfigArgs.builder()
- *                     .apiAvailable(true)
- *                     .integrationId("Example-Connect-01")
- *                     .bandwidthFromApi(false)
- *                     .build())
- *                 .connectionLabel("Virtual Circuit Name")
- *                 .authenticationKey(ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs.builder()
- *                     .required(true)
- *                     .label("Example ACCOUNT ID")
- *                     .build())
- *                 .build())
- *             .account(ServiceProfileAccountArgs.builder()
- *                 .organizationName("Example Cloud")
- *                 .globalOrganizationName("Example Global")
- *                 .build())
- *             .visibility("PUBLIC")
- *             .marketingInfo(ServiceProfileMarketingInfoArgs.builder()
- *                 .promotion(true)
+ *                 .connectionLabel("Service Profile Tag1")
+ *                 .bandwidthAlertThreshold(10)
+ *                 .supportedBandwidths(                
+ *                     100,
+ *                     500)
  *                 .build())
  *             .build());
  * 
- *         ctx.export("profileId", profile.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/BgpSession.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/BgpSession.java
index 31dcdb16..21dc8fbf 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/BgpSession.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/BgpSession.java
@@ -29,8 +29,21 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.BgpSession;
- * import com.equinix.pulumi.metal.BgpSessionArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.ReservedIpBlock;
+ * import com.pulumi.equinix.metal.ReservedIpBlockArgs;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import com.pulumi.equinix.metal.BgpSession;
+ * import com.pulumi.equinix.metal.BgpSessionArgs;
+ * import com.pulumi.null.Resource;
+ * import com.pulumi.null.ResourceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -38,14 +51,79 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var deviceId = config.get("deviceId").get();
- *         var bgp = new BgpSession("bgp", BgpSessionArgs.builder()        
- *             .deviceId(deviceId)
+ *         final var bgpPassword = "955dB0b81Ef";
+ * 
+ *         final var projectId = "";
+ * 
+ *         var addr = new ReservedIpBlock("addr", ReservedIpBlockArgs.builder()
+ *             .projectId(projectId)
+ *             .metro("ny")
+ *             .quantity(1)
+ *             .build());
+ * 
+ *         final var interfaceLo0 = Output.tuple(addr.address(), addr.netmask()).applyValue(values -> {
+ *             var address = values.t1;
+ *             var netmask = values.t2;
+ *             return """
+ * auto lo:0
+ * iface lo:0 inet static
+ *    address %s
+ *    netmask %s
+ * ", address,netmask);
+ *         });
+ * 
+ *         var test = new Device("test", DeviceArgs.builder()
+ *             .hostname("terraform-test-bgp-sesh")
+ *             .plan("c3.small.x86")
+ *             .metro("ny")
+ *             .operatingSystem("ubuntu_20_04")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *         final var birdConf = Output.tuple(addr.address(), addr.cidr(), test.network(), test.network()).applyValue(values -> {
+ *             var address = values.t1;
+ *             var cidr = values.t2;
+ *             var testNetwork = values.t3;
+ *             var testNetwork1 = values.t4;
+ *             return """
+ * filter equinix_metal_bgp {
+ *     if net = %s/%s then accept;
+ * }
+ * router id %s;
+ * protocol direct {
+ *     interface "lo";
+ * }
+ * protocol kernel {
+ *     scan time 10;
+ *     persist;
+ *     import all;
+ *     export all;
+ * }
+ * protocol device {
+ *     scan time 10;
+ * }
+ * protocol bgp {
+ *     export filter equinix_metal_bgp;
+ *     local as 65000;
+ *     neighbor %s as 65530;
+ *     password "%s";
+ * }
+ * ", address,cidr,testNetwork[2].address(),testNetwork1[2].gateway(),bgpPassword);
+ *         });
+ * 
+ *         var testBgpSession = new BgpSession("testBgpSession", BgpSessionArgs.builder()
+ *             .deviceId(test.id())
  *             .addressFamily("ipv4")
  *             .build());
  * 
- *         ctx.export("bgpSessionStatus", bgp.status());
+ *         var configureBird = new Resource("configureBird", ResourceArgs.builder()
+ *             .triggers(Map.ofEntries(
+ *                 Map.entry("bird_conf", birdConf),
+ *                 Map.entry("interface", interfaceLo0)
+ *             ))
+ *             .build());
+ * 
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Device.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Device.java
index 0ea44552..7c718dd1 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Device.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Device.java
@@ -27,14 +27,22 @@
  * > **NOTE:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. Read more about sensitive data in state.
  * 
  * ## Example Usage
+ * ### example 1
  * 
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.Device;
- * import com.equinix.pulumi.metal.DeviceArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -42,18 +50,233 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         var web = new Device("web", DeviceArgs.builder()        
- *             .hostname("webserver1")
+ *         var web1 = new Device("web1", DeviceArgs.builder()
+ *             .hostname("tf.coreos2")
  *             .plan("c3.small.x86")
+ *             .metro("sv")
+ *             .operatingSystem("ubuntu_20_04")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 4 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var web1 = new Device("web1", DeviceArgs.builder()
+ *             .hostname("tftest")
+ *             .plan("c3.small.x86")
+ *             .metro("ny")
  *             .operatingSystem("ubuntu_20_04")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .hardwareReservationId("next-available")
+ *             .storage("""
+ * {
+ *   "disks": [
+ *     {
+ *       "device": "/dev/sda",
+ *       "wipeTable": true,
+ *       "partitions": [
+ *         {
+ *           "label": "BIOS",
+ *           "number": 1,
+ *           "size": "4096"
+ *         },
+ *         {
+ *           "label": "SWAP",
+ *           "number": 2,
+ *           "size": "3993600"
+ *         },
+ *         {
+ *           "label": "ROOT",
+ *           "number": 3,
+ *           "size": "0"
+ *         }
+ *       ]
+ *     }
+ *   ],
+ *   "filesystems": [
+ *     {
+ *       "mount": {
+ *         "device": "/dev/sda3",
+ *         "format": "ext4",
+ *         "point": "/",
+ *         "create": {
+ *           "options": [
+ *             "-L",
+ *             "ROOT"
+ *           ]
+ *         }
+ *       }
+ *     },
+ *     {
+ *       "mount": {
+ *         "device": "/dev/sda2",
+ *         "format": "swap",
+ *         "point": "none",
+ *         "create": {
+ *           "options": [
+ *             "-L",
+ *             "SWAP"
+ *           ]
+ *         }
+ *       }
+ *     }
+ *   ]
+ * }
+ *             """)
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 2 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var pxe1 = new Device("pxe1", DeviceArgs.builder()
+ *             .hostname("tf.coreos2-pxe")
+ *             .plan("c3.small.x86")
+ *             .metro("sv")
+ *             .operatingSystem("custom_ipxe")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .ipxeScriptUrl("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe")
+ *             .alwaysPxe("false")
+ *             .userData(example.rendered())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 5 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import com.pulumi.equinix.metal.inputs.DeviceBehaviorArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var pxe1 = new Device("pxe1", DeviceArgs.builder()
+ *             .hostname("tf.coreos2-pxe")
+ *             .plan("c3.small.x86")
  *             .metro("sv")
+ *             .operatingSystem("custom_ipxe")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .ipxeScriptUrl("https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe")
+ *             .alwaysPxe("false")
+ *             .userData(userData)
+ *             .customData(customData)
+ *             .behavior(DeviceBehaviorArgs.builder()
+ *                 .allowChanges(                
+ *                     "custom_data",
+ *                     "user_data")
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 3 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var web1 = new Device("web1", DeviceArgs.builder()
+ *             .hostname("tf.coreos2")
+ *             .plan("c3.small.x86")
+ *             .metro("ny")
+ *             .operatingSystem("ubuntu_20_04")
  *             .billingCycle("hourly")
  *             .projectId(projectId)
+ *             .ipAddresses(DeviceIpAddressArgs.builder()
+ *                 .type("private_ipv4")
+ *                 .cidr(30)
+ *                 .build())
  *             .build());
  * 
- *         ctx.export("webPublicIp", web.accessPublicIpv4().applyValue(accessPublicIpv4 -> String.format("http://%s", accessPublicIpv4)));
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/DeviceNetworkType.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/DeviceNetworkType.java
index 25afe087..41a53450 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/DeviceNetworkType.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/DeviceNetworkType.java
@@ -21,8 +21,15 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.DeviceNetworkType;
- * import com.equinix.pulumi.metal.DeviceNetworkTypeArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.DeviceNetworkType;
+ * import com.pulumi.equinix.metal.DeviceNetworkTypeArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -31,9 +38,9 @@
  * 
  *     public static void stack(Context ctx) {
  *         final var config = ctx.config();
- *         final var deviceId = config.get("deviceId").get();
+ *         final var deviceId = config.get("deviceId");
  *         final var networkType = config.get("networkType").orElse("hybrid");
- *         var deviceNetwork = new DeviceNetworkType("deviceNetwork", DeviceNetworkTypeArgs.builder()        
+ *         var deviceNetwork = new DeviceNetworkType("deviceNetwork", DeviceNetworkTypeArgs.builder()
  *             .deviceId(deviceId)
  *             .type(networkType)
  *             .build());
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Gateway.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Gateway.java
index 98b11c0a..f33e3991 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Gateway.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Gateway.java
@@ -22,14 +22,24 @@
  * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
  * 
  * ## Example Usage
+ * ### example 1
  * 
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.Gateway;
- * import com.equinix.pulumi.metal.GatewayArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Vlan;
+ * import com.pulumi.equinix.metal.VlanArgs;
+ * import com.pulumi.equinix.metal.Gateway;
+ * import com.pulumi.equinix.metal.GatewayArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -37,16 +47,67 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         final var vlanId = config.get("vlanId").get();
- *         var gateway = new Gateway("gateway", GatewayArgs.builder()        
+ *         var test = new Vlan("test", VlanArgs.builder()
+ *             .description("test VLAN in SV")
+ *             .metro("sv")
  *             .projectId(projectId)
- *             .vlanId(vlanId)
+ *             .build());
+ * 
+ *         var testGateway = new Gateway("testGateway", GatewayArgs.builder()
+ *             .projectId(projectId)
+ *             .vlanId(test.id())
  *             .privateIpv4SubnetSize(8)
  *             .build());
  * 
- *         ctx.export("gatewayState", gateway.state());
+ *     }
+ * }
+ * }
+ * 
+ * ### example 2 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Vlan;
+ * import com.pulumi.equinix.metal.VlanArgs;
+ * import com.pulumi.equinix.metal.ReservedIpBlock;
+ * import com.pulumi.equinix.metal.ReservedIpBlockArgs;
+ * import com.pulumi.equinix.metal.Gateway;
+ * import com.pulumi.equinix.metal.GatewayArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var test = new Vlan("test", VlanArgs.builder()
+ *             .description("test VLAN in SV")
+ *             .metro("sv")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *         var test1 = new ReservedIpBlock("test1", ReservedIpBlockArgs.builder()
+ *             .projectId(projectId)
+ *             .metro("sv")
+ *             .quantity(8)
+ *             .build());
+ * 
+ *         var testGateway = new Gateway("testGateway", GatewayArgs.builder()
+ *             .projectId(projectId)
+ *             .vlanId(test.id())
+ *             .ipReservationId(testEquinixMetalReservedIpBlock.id())
+ *             .build());
+ * 
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Interconnection.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Interconnection.java
index a627e2a7..2aaf3e14 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Interconnection.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Interconnection.java
@@ -24,6 +24,7 @@
  * > Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization.
  * 
  * ## Example Usage
+ * ### example metal billed token
  * 
  * {@code
  * package generated_program;
@@ -31,8 +32,8 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.metal.Interconnection;
- * import com.equinix.pulumi.metal.InterconnectionArgs;
+ * import com.pulumi.equinix.metal.Interconnection;
+ * import com.pulumi.equinix.metal.InterconnectionArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -47,10 +48,53 @@
  * 
  *     public static void stack(Context ctx) {
  *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
+ *         final var projectId = config.get("projectId");
  *         final var metro = config.get("metro").orElse("SV");
- *         final var speedInMbps = Integer.parseInt(config.get("speedInMbps").orElse("200"));
- *         var connection = new Interconnection("connection", InterconnectionArgs.builder()        
+ *         final var speedInMbps = config.get("speedInMbps").orElse(1000);
+ *         var connection = new Interconnection("connection", InterconnectionArgs.builder()
+ *             .name("metal-to-cloudprovider")
+ *             .projectId(projectId)
+ *             .type("shared")
+ *             .redundancy("primary")
+ *             .metro(metro)
+ *             .speed(String.format("%sMbps", speedInMbps))
+ *             .serviceTokenType("a_side")
+ *             .build());
+ * 
+ *         ctx.export("connectionStatus", connection.status());
+ *         ctx.export("connectionTokens", connection.serviceTokens());
+ *     }
+ * }
+ * }
+ * 
+ * ### example fabric billed token + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Interconnection;
+ * import com.pulumi.equinix.metal.InterconnectionArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var config = ctx.config();
+ *         final var projectId = config.get("projectId");
+ *         final var metro = config.get("metro").orElse("SV");
+ *         final var speedInMbps = config.get("speedInMbps").orElse(200);
+ *         var connection = new Interconnection("connection", InterconnectionArgs.builder()
  *             .name("fabric-port-to-metal")
  *             .projectId(projectId)
  *             .type("shared")
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/IpAttachment.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/IpAttachment.java
index 174ae5e1..3f99603a 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/IpAttachment.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/IpAttachment.java
@@ -31,8 +31,17 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.IpAttachment;
- * import com.equinix.pulumi.metal.IpAttachmentArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.ReservedIpBlock;
+ * import com.pulumi.equinix.metal.ReservedIpBlockArgs;
+ * import com.pulumi.equinix.metal.IpAttachment;
+ * import com.pulumi.equinix.metal.IpAttachmentArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -40,16 +49,25 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var deviceId = config.get("deviceId").get();
- *         final var subnetCidr = config.get("subnetCidr").orElse("147.229.10.152/31");
- *         var ipAttachResource = new IpAttachment("ipAttachResource", IpAttachmentArgs.builder()        
- *             .deviceId(deviceId)
- *             .cidrNotation(subnetCidr)
+ *         var myblock = new ReservedIpBlock("myblock", ReservedIpBlockArgs.builder()
+ *             .projectId(projectId)
+ *             .metro("ny")
+ *             .quantity(2)
+ *             .build());
+ * 
+ *         var firstAddressAssignment = new IpAttachment("firstAddressAssignment", IpAttachmentArgs.builder()
+ *             .deviceId(mydevice.id())
+ *             .cidrNotation(StdFunctions.join(JoinArgs.builder()
+ *                 .separator("/")
+ *                 .input(                
+ *                     StdFunctions.cidrhost(CidrhostArgs.builder()
+ *                         .input(myblockMetalReservedIpBlock.cidrNotation())
+ *                         .host(0)
+ *                         .build()).result(),
+ *                     "32")
+ *                 .build()).result())
  *             .build());
  * 
- *         ctx.export("ipAttach", ipAttachResource.id());
- *         ctx.export("ipNetmask", ipAttachResource.netmask());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Organization.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Organization.java
index 78081def..392fbfef 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Organization.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Organization.java
@@ -26,9 +26,8 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.metal.Organization;
- * import com.equinix.pulumi.metal.OrganizationArgs;
- * import com.equinix.pulumi.metal.inputs.OrganizationAddressArgs;
+ * import com.pulumi.equinix.metal.Organization;
+ * import com.pulumi.equinix.metal.OrganizationArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -42,18 +41,11 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         var orgResource = new Organization("orgResource", OrganizationArgs.builder()        
- *             .name("Foo Organization")
- *             .address(OrganizationAddressArgs.builder()
- *                 .address("org street")
- *                 .city("london")
- *                 .country("GB")
- *                 .zipCode("12345")
- *                 .build())
- *             .description("An organization")
+ *         var tfOrganization1 = new Organization("tfOrganization1", OrganizationArgs.builder()
+ *             .name("foobar")
+ *             .description("quux")
  *             .build());
  * 
- *         ctx.export("org", orgResource.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/OrganizationMember.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/OrganizationMember.java
index 80552188..6a81c4df 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/OrganizationMember.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/OrganizationMember.java
@@ -19,14 +19,22 @@
  * Manage the membership of existing and new invitees within an Equinix Metal organization and its projects.
  * 
  * ## Example Usage
+ * ### example 2
  * 
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.OrganizationMember;
- * import com.equinix.pulumi.metal.OrganizationMemberArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.OrganizationMember;
+ * import com.pulumi.equinix.metal.OrganizationMemberArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -34,19 +42,47 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var organizationId = config.get("organizationId").get();
- *         final var projectId = config.get("projectId").get();
- *         final var userEmailAddress = config.get("userEmailAddress").get();
- *         var member = new OrganizationMember("member", OrganizationMemberArgs.builder()        
- *             .invitee(userEmailAddress)
+ *         var owner = new OrganizationMember("owner", OrganizationMemberArgs.builder()
+ *             .invitee("admin{@literal @}example.com")
+ *             .roles("owner")
+ *             .projectsIds()
+ *             .organizationId(organizationId)
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 1 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.OrganizationMember;
+ * import com.pulumi.equinix.metal.OrganizationMemberArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var member = new OrganizationMember("member", OrganizationMemberArgs.builder()
+ *             .invitee("member{@literal @}example.com")
  *             .roles("limited_collaborator")
  *             .projectsIds(projectId)
  *             .organizationId(organizationId)
  *             .build());
  * 
- *         ctx.export("memberId", member.id());
- *         ctx.export("memberState", member.state());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Port.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Port.java
index f97cb81d..78e82439 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Port.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Port.java
@@ -17,48 +17,6 @@
 import java.util.Optional;
 import javax.annotation.Nullable;
 
-/**
- * ## Example Usage
- * 
- * {@code
- * package generated_program;
- * 
- * import com.pulumi.Context;
- * import com.pulumi.Pulumi;
- * import com.pulumi.core.Output;
- * import com.equinix.pulumi.metal.Port;
- * import com.equinix.pulumi.metal.PortArgs;
- * import java.util.List;
- * import java.util.ArrayList;
- * import java.util.Map;
- * import java.io.File;
- * import java.nio.file.Files;
- * import java.nio.file.Paths;
- * 
- * public class App {
- *     public static void main(String[] args) {
- *         Pulumi.run(App::stack);
- *     }
- * 
- *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var portId = config.get("portId").get();
- *         final var vlanId = config.get("vlanId").get();
- *         var port = new Port("port", PortArgs.builder()        
- *             .portId(portId)
- *             .bonded(true)
- *             .layer2(false)
- *             .vlanIds(vlanId)
- *             .build());
- * 
- *         ctx.export("portType", port.type());
- *         ctx.export("portBondedNetworkType", port.networkType());
- *     }
- * }
- * }
- * 
- * - */ @ResourceType(type="equinix:metal/port:Port") public class Port extends com.pulumi.resources.CustomResource { /** diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/PortVlanAttachment.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/PortVlanAttachment.java index 43f1db1f..f7164dd1 100644 --- a/sdk/java/src/main/java/com/equinix/pulumi/metal/PortVlanAttachment.java +++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/PortVlanAttachment.java @@ -37,14 +37,29 @@ * * `port_id` - UUID of device port. * * ## Example Usage + * ### example 2 *
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.PortVlanAttachment;
- * import com.equinix.pulumi.metal.PortVlanAttachmentArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import com.pulumi.equinix.metal.DeviceNetworkType;
+ * import com.pulumi.equinix.metal.DeviceNetworkTypeArgs;
+ * import com.pulumi.equinix.metal.Vlan;
+ * import com.pulumi.equinix.metal.VlanArgs;
+ * import com.pulumi.equinix.metal.PortVlanAttachment;
+ * import com.pulumi.equinix.metal.PortVlanAttachmentArgs;
+ * import com.pulumi.resources.CustomResourceOptions;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -52,19 +67,106 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var deviceId = config.get("deviceId").get();
- *         final var portName = config.get("portName").orElse("eth1");
- *         final var vxlanId = Integer.parseInt(config.get("vxlanId").orElse("1004"));
- * 
- *         var attach = new PortVlanAttachment("attach", PortVlanAttachmentArgs.builder()        
- *             .deviceId(deviceId)
- *             .portName(portName)
- *             .vlanVnid(vxlanId)
+ *         var test = new Device("test", DeviceArgs.builder()
+ *             .hostname("test")
+ *             .plan("c3.small.x86")
+ *             .metro("ny")
+ *             .operatingSystem("ubuntu_20_04")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *         var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder()
+ *             .deviceId(test.id())
+ *             .type("layer2-individual")
+ *             .build());
+ * 
+ *         var test1 = new Vlan("test1", VlanArgs.builder()
+ *             .description("VLAN in New York")
+ *             .metro("ny")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *         var test2 = new Vlan("test2", VlanArgs.builder()
+ *             .description("VLAN in New Jersey")
+ *             .metro("ny")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *         var test1PortVlanAttachment = new PortVlanAttachment("test1PortVlanAttachment", PortVlanAttachmentArgs.builder()
+ *             .deviceId(testDeviceNetworkType.id())
+ *             .vlanVnid(test1.vxlan())
+ *             .portName("eth1")
+ *             .build());
+ * 
+ *         var test2PortVlanAttachment = new PortVlanAttachment("test2PortVlanAttachment", PortVlanAttachmentArgs.builder()
+ *             .deviceId(testDeviceNetworkType.id())
+ *             .vlanVnid(test2.vxlan())
+ *             .portName("eth1")
+ *             .native_(true)
+ *             .build(), CustomResourceOptions.builder()
+ *                 .dependsOn(test1PortVlanAttachment)
+ *                 .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 1 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Vlan;
+ * import com.pulumi.equinix.metal.VlanArgs;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import com.pulumi.equinix.metal.DeviceNetworkType;
+ * import com.pulumi.equinix.metal.DeviceNetworkTypeArgs;
+ * import com.pulumi.equinix.metal.PortVlanAttachment;
+ * import com.pulumi.equinix.metal.PortVlanAttachmentArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var test = new Vlan("test", VlanArgs.builder()
+ *             .description("VLAN in New York")
+ *             .metro("ny")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *         var testDevice = new Device("testDevice", DeviceArgs.builder()
+ *             .hostname("test")
+ *             .plan("c3.small.x86")
+ *             .metro("ny")
+ *             .operatingSystem("ubuntu_20_04")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .build());
+ * 
+ *         var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder()
+ *             .deviceId(testDevice.id())
+ *             .type("hybrid")
+ *             .build());
+ * 
+ *         var testPortVlanAttachment = new PortVlanAttachment("testPortVlanAttachment", PortVlanAttachmentArgs.builder()
+ *             .deviceId(testDeviceNetworkType.id())
+ *             .portName("eth1")
+ *             .vlanVnid(test.vxlan())
  *             .build());
  * 
- *         ctx.export("attachId", attach.id());
- *         ctx.export("portId", attach.portId());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Project.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Project.java
index 942db9d2..9bda2f7e 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Project.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Project.java
@@ -22,14 +22,23 @@
  * > **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix.metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects.
  * 
  * ## Example Usage
+ * ### example 3
  * 
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.Project;
- * import com.equinix.pulumi.metal.ProjectArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Project;
+ * import com.pulumi.equinix.metal.ProjectArgs;
+ * import com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -37,15 +46,83 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var organizationId = config.get("organizationId").get();
- *         final var name = config.get("name").orElse("Default Project");
- *         var projectResource = new Project("projectResource", ProjectArgs.builder()        
- *             .name(name)
- *             .organizationId(organizationId)
+ *         var existingProject = new Project("existingProject", ProjectArgs.builder()
+ *             .name("The name of the project (if different, will rewrite)")
+ *             .bgpConfig(ProjectBgpConfigArgs.builder()
+ *                 .deploymentType("local")
+ *                 .md5("C179c28c41a85b")
+ *                 .asn(65000)
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 2 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Project;
+ * import com.pulumi.equinix.metal.ProjectArgs;
+ * import com.pulumi.equinix.metal.inputs.ProjectBgpConfigArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var tfProject1 = new Project("tfProject1", ProjectArgs.builder()
+ *             .name("tftest")
+ *             .bgpConfig(ProjectBgpConfigArgs.builder()
+ *                 .deploymentType("local")
+ *                 .md5("C179c28c41a85b")
+ *                 .asn(65000)
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 1 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Project;
+ * import com.pulumi.equinix.metal.ProjectArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var tfProject1 = new Project("tfProject1", ProjectArgs.builder()
+ *             .name("Terraform Fun")
  *             .build());
  * 
- *         ctx.export("projectId", projectResource.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectApiKey.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectApiKey.java
index 716644f6..f19ebf38 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectApiKey.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectApiKey.java
@@ -27,8 +27,15 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.ProjectApiKey;
- * import com.equinix.pulumi.metal.ProjectApiKeyArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.ProjectApiKey;
+ * import com.pulumi.equinix.metal.ProjectApiKeyArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -36,16 +43,12 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         final var readOnly = config.getBoolean("readOnly").orElse(false);
- *         var apiKey = new ProjectApiKey("apiKey", ProjectApiKeyArgs.builder()        
- *             .projectId(projectId)
- *             .description("A project level API Key")
- *             .readOnly(readOnly)
+ *         var test = new ProjectApiKey("test", ProjectApiKeyArgs.builder()
+ *             .projectId(existingProjectId)
+ *             .description("Read-only key scoped to a projct")
+ *             .readOnly(true)
  *             .build());
  * 
- *         ctx.export("apiKeyToken", apiKey.token());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectSshKey.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectSshKey.java
index d6ac3735..fdcb5c54 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectSshKey.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/ProjectSshKey.java
@@ -23,10 +23,15 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.ProjectSshKey;
- * import com.equinix.pulumi.metal.ProjectSshKeyArgs;
- * 
- * import java.io.IOException;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.ProjectSshKey;
+ * import com.pulumi.equinix.metal.ProjectSshKeyArgs;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
  * import java.nio.file.Files;
  * import java.nio.file.Paths;
  * 
@@ -36,23 +41,24 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
+ *         final var projectId = "";
  * 
- *         String content = null;
- *         try {
- *             content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub"));
- *         } catch (IOException e) {
- *             e.printStackTrace();
- *         }
+ *         var test = new ProjectSshKey("test", ProjectSshKeyArgs.builder()
+ *             .name("test")
+ *             .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk{@literal @}hp2")
+ *             .projectId(projectId)
+ *             .build());
  * 
- *         var sshKey = new ProjectSshKey("sshKey", ProjectSshKeyArgs.builder()        
+ *         var testDevice = new Device("testDevice", DeviceArgs.builder()
+ *             .hostname("test")
+ *             .plan("c3.medium.x86")
+ *             .metro("ny")
+ *             .operatingSystem("ubuntu_20_04")
+ *             .billingCycle("hourly")
+ *             .projectSshKeyIds(test.id())
  *             .projectId(projectId)
- *             .name("johnKent")
- *             .publicKey(content)
  *             .build());
  * 
- *         ctx.export("sshKeyId", sshKey.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/ReservedIpBlock.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/ReservedIpBlock.java
index 7b65ec7b..4d3a278d 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/ReservedIpBlock.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/ReservedIpBlock.java
@@ -31,14 +31,22 @@
  * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
  * 
  * ## Example Usage
+ * ### example 1
  * 
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.ReservedIpBlock;
- * import com.equinix.pulumi.metal.ReservedIpBlockArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.ReservedIpBlock;
+ * import com.pulumi.equinix.metal.ReservedIpBlockArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -46,20 +54,79 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         final var metro = config.get("metro").orElse("FR");
- *         final var type = config.get("type").orElse("public_ipv4");
- *         final var quantity = Integer.parseInt(config.get("quantity").orElse("1"));
- *         var ipBlock = new ReservedIpBlock("ipBlock", ReservedIpBlockArgs.builder()        
+ *         var twoElasticAddresses = new ReservedIpBlock("twoElasticAddresses", ReservedIpBlockArgs.builder()
  *             .projectId(projectId)
- *             .type(type)
- *             .quantity(quantity)
- *             .metro(metro)
+ *             .metro("sv")
+ *             .quantity(2)
+ *             .build());
+ * 
+ *         var test1 = new ReservedIpBlock("test1", ReservedIpBlockArgs.builder()
+ *             .projectId(projectId)
+ *             .type("public_ipv4")
+ *             .metro("sv")
+ *             .quantity(1)
+ *             .build());
+ * 
+ *         var test = new ReservedIpBlock("test", ReservedIpBlockArgs.builder()
+ *             .projectId(projectId)
+ *             .type("global_ipv4")
+ *             .quantity(1)
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 2 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.ReservedIpBlock;
+ * import com.pulumi.equinix.metal.ReservedIpBlockArgs;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import com.pulumi.equinix.metal.inputs.DeviceIpAddressArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var example = new ReservedIpBlock("example", ReservedIpBlockArgs.builder()
+ *             .projectId(projectId)
+ *             .metro("sv")
+ *             .quantity(2)
+ *             .build());
+ * 
+ *         var nodes = new Device("nodes", DeviceArgs.builder()
+ *             .projectId(projectId)
+ *             .metro("sv")
+ *             .plan("c3.small.x86")
+ *             .operatingSystem("ubuntu_20_04")
+ *             .hostname("test")
+ *             .billingCycle("hourly")
+ *             .ipAddresses(            
+ *                 DeviceIpAddressArgs.builder()
+ *                     .type("public_ipv4")
+ *                     .cidr(31)
+ *                     .reservationIds(example.id())
+ *                     .build(),
+ *                 DeviceIpAddressArgs.builder()
+ *                     .type("private_ipv4")
+ *                     .build())
  *             .build());
  * 
- *         ctx.export("ipBlockId", ipBlock.id());
- *         ctx.export("ipBlockSubent", ipBlock.cidrNotation());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/SpotMarketRequest.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/SpotMarketRequest.java
index 59b0f99e..ba4383f6 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/SpotMarketRequest.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/SpotMarketRequest.java
@@ -29,9 +29,16 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.SpotMarketRequest;
- * import com.equinix.pulumi.metal.SpotMarketRequestArgs;
- * import com.equinix.pulumi.metal.inputs.SpotMarketRequestInstanceParametersArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.SpotMarketRequest;
+ * import com.pulumi.equinix.metal.SpotMarketRequestArgs;
+ * import com.pulumi.equinix.metal.inputs.SpotMarketRequestInstanceParametersArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -39,13 +46,10 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         final var metro = config.get("metro").orElse("FR");
- *         var request = new SpotMarketRequest("request", SpotMarketRequestArgs.builder()        
+ *         var req = new SpotMarketRequest("req", SpotMarketRequestArgs.builder()
  *             .projectId(projectId)
- *             .metro(metro)
- *             .maxBidPrice(0.75)
+ *             .maxBidPrice(0.03)
+ *             .metro("ny")
  *             .devicesMin(1)
  *             .devicesMax(1)
  *             .instanceParameters(SpotMarketRequestInstanceParametersArgs.builder()
@@ -56,7 +60,6 @@
  *                 .build())
  *             .build());
  * 
- *         ctx.export("requestId", request.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/SshKey.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/SshKey.java
index 8bb67118..d850dae1 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/SshKey.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/SshKey.java
@@ -25,10 +25,16 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.SshKey;
- * import com.equinix.pulumi.metal.SshKeyArgs;
- * 
- * import java.io.IOException;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.SshKey;
+ * import com.pulumi.equinix.metal.SshKeyArgs;
+ * import com.pulumi.equinix.metal.Device;
+ * import com.pulumi.equinix.metal.DeviceArgs;
+ * import com.pulumi.resources.CustomResourceOptions;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
  * import java.nio.file.Files;
  * import java.nio.file.Paths;
  * 
@@ -38,19 +44,24 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         String content = null;
- *         try {
- *             content = Files.readString(Paths.get("/Users/John/.ssh/metal_rsa.pub"));
- *         } catch (IOException e) {
- *             e.printStackTrace();
- *         }
- * 
- *         var sshKey = new SshKey("sshKey", SshKeyArgs.builder()        
- *             .name("johnKent")
- *             .publicKey(content)
+ *         var key1 = new SshKey("key1", SshKeyArgs.builder()
+ *             .name("terraform-1")
+ *             .publicKey(StdFunctions.file(FileArgs.builder()
+ *                 .input("/home/terraform/.ssh/id_rsa.pub")
+ *                 .build()).result())
  *             .build());
  * 
- *         ctx.export("sshKeyId", sshKey.id());
+ *         var test = new Device("test", DeviceArgs.builder()
+ *             .hostname("test-device")
+ *             .plan("c3.small.x86")
+ *             .metro("sv")
+ *             .operatingSystem("ubuntu_20_04")
+ *             .billingCycle("hourly")
+ *             .projectId(projectId)
+ *             .build(), CustomResourceOptions.builder()
+ *                 .dependsOn(key1)
+ *                 .build());
+ * 
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/UserApiKey.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/UserApiKey.java
index 390206e1..7f291273 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/UserApiKey.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/UserApiKey.java
@@ -27,8 +27,15 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.UserApiKey;
- * import com.equinix.pulumi.metal.UserApiKeyArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.UserApiKey;
+ * import com.pulumi.equinix.metal.UserApiKeyArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -36,15 +43,11 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var description = config.get("description").orElse("An user level API Key");
- *         final var readOnly = config.getBoolean("readOnly").orElse(false);
- *         var apiKey = new UserApiKey("apiKey", UserApiKeyArgs.builder()        
- *             .description(description)
- *             .readOnly(readOnly)
+ *         var test = new UserApiKey("test", UserApiKeyArgs.builder()
+ *             .description("Read-only user key")
+ *             .readOnly(true)
  *             .build());
  * 
- *         ctx.export("apiKeyToken", apiKey.token());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/VirtualCircuit.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/VirtualCircuit.java
index 4f2488d2..bb8580b8 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/VirtualCircuit.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/VirtualCircuit.java
@@ -28,10 +28,19 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.inputs.GetInterconnectionArgs;
- * import com.equinix.pulumi.metal.MetalFunctions;
- * import com.equinix.pulumi.metal.VirtualCircuit;
- * import com.equinix.pulumi.metal.VirtualCircuitArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.MetalFunctions;
+ * import com.pulumi.equinix.metal.inputs.GetInterconnectionArgs;
+ * import com.pulumi.equinix.metal.Vlan;
+ * import com.pulumi.equinix.metal.VlanArgs;
+ * import com.pulumi.equinix.metal.VirtualCircuit;
+ * import com.pulumi.equinix.metal.VirtualCircuitArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -39,24 +48,27 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         final var connectionId = config.get("connectionId").get();
- *         final var vlanId = config.get("vlanId").get();
- *         final var portId = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder()
- *             .connectionId(connectionId)
- *             .build()).applyValue(data -> data.ports().get(0).id());
+ *         final var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";
  * 
- *         var vc = new VirtualCircuit("vc", VirtualCircuitArgs.builder()        
- *             .connectionId(connectionId)
+ *         final var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";
+ * 
+ *         final var test = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder()
+ *             .connectionId(connId)
+ *             .build());
+ * 
+ *         var testVlan = new Vlan("testVlan", VlanArgs.builder()
+ *             .projectId(projectId)
+ *             .metro(test.applyValue(getInterconnectionResult -> getInterconnectionResult.metro()))
+ *             .build());
+ * 
+ *         var testVirtualCircuit = new VirtualCircuit("testVirtualCircuit", VirtualCircuitArgs.builder()
+ *             .connectionId(connId)
  *             .projectId(projectId)
- *             .portId(portId)
- *             .vlanId(vlanId)
+ *             .portId(test.applyValue(getInterconnectionResult -> getInterconnectionResult.ports()[0].id()))
+ *             .vlanId(testVlan.id())
  *             .nniVlan(1056)
  *             .build());
  * 
- *         ctx.export("vcStatus", vc.status());
- *         ctx.export("vcVnid", vc.vnid());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Vlan.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Vlan.java
index da75dd90..6acb38f2 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Vlan.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Vlan.java
@@ -30,8 +30,15 @@
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.Vlan;
- * import com.equinix.pulumi.metal.VlanArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Vlan;
+ * import com.pulumi.equinix.metal.VlanArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -39,18 +46,13 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         final var metro = config.get("metro").orElse("DA");
- *         final var vxlan = Integer.parseInt(config.get("vxlan").get());
- *         var vlan = new Vlan("vlan", VlanArgs.builder()        
- *             .description("VLAN in Dallas")
+ *         var vlan1 = new Vlan("vlan1", VlanArgs.builder()
+ *             .description("VLAN in New Jersey")
+ *             .metro("sv")
  *             .projectId(projectId)
- *             .metro(metro)
- *             .vxlan(vxlan)
+ *             .vxlan(1040)
  *             .build());
  * 
- *         ctx.export("vlanId", vlan.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/metal/Vrf.java b/sdk/java/src/main/java/com/equinix/pulumi/metal/Vrf.java
index 64f62721..c4baec3c 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/metal/Vrf.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/metal/Vrf.java
@@ -22,14 +22,26 @@
  * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
  * 
  * ## Example Usage
+ * ### example 2
  * 
  * {@code
  * package generated_program;
  * 
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
- * import com.equinix.pulumi.metal.Vrf;
- * import com.equinix.pulumi.metal.VrfArgs;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.ReservedIpBlock;
+ * import com.pulumi.equinix.metal.ReservedIpBlockArgs;
+ * import com.pulumi.equinix.metal.Vlan;
+ * import com.pulumi.equinix.metal.VlanArgs;
+ * import com.pulumi.equinix.metal.Gateway;
+ * import com.pulumi.equinix.metal.GatewayArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
  * 
  * public class App {
  *     public static void main(String[] args) {
@@ -37,21 +49,113 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var projectId = config.get("projectId").get();
- *         final var metro = config.get("metro").orElse("DA");
- *         var vrf = new Vrf("vrf", VrfArgs.builder()        
- *             .description("VRF with ASN 65000 and a pool of address space")
+ *         var example = new ReservedIpBlock("example", ReservedIpBlockArgs.builder()
+ *             .description("Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.")
+ *             .projectId(exampleEquinixMetalProject.id())
+ *             .metro(exampleEquinixMetalVrf.metro())
+ *             .type("vrf")
+ *             .vrfId(exampleEquinixMetalVrf.id())
+ *             .cidr(29)
+ *             .network("192.168.100.0")
+ *             .build());
+ * 
+ *         var exampleVlan = new Vlan("exampleVlan", VlanArgs.builder()
+ *             .description("A VLAN for Layer2 and Hybrid Metal devices")
+ *             .metro(exampleEquinixMetalVrf.metro())
+ *             .projectId(exampleEquinixMetalProject.id())
+ *             .build());
+ * 
+ *         var exampleGateway = new Gateway("exampleGateway", GatewayArgs.builder()
+ *             .projectId(exampleEquinixMetalProject.id())
+ *             .vlanId(exampleVlan.id())
+ *             .ipReservationId(example.id())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 1 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.Project;
+ * import com.pulumi.equinix.metal.ProjectArgs;
+ * import com.pulumi.equinix.metal.Vrf;
+ * import com.pulumi.equinix.metal.VrfArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var example = new Project("example", ProjectArgs.builder()
+ *             .name("example")
+ *             .build());
+ * 
+ *         var exampleVrf = new Vrf("exampleVrf", VrfArgs.builder()
+ *             .description("VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25")
  *             .name("example-vrf")
- *             .metro(metro)
- *             .localAsn(65000)
+ *             .metro("da")
+ *             .localAsn("65000")
  *             .ipRanges(            
  *                 "192.168.100.0/25",
  *                 "192.168.200.0/25")
- *             .projectId(projectId)
+ *             .projectId(example.id())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 3 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.metal.VirtualCircuit;
+ * import com.pulumi.equinix.metal.VirtualCircuitArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var exampleVirtualCircuit = new VirtualCircuit("exampleVirtualCircuit", VirtualCircuitArgs.builder()
+ *             .name("example-vc")
+ *             .description("Virtual Circuit")
+ *             .connectionId(example.id())
+ *             .projectId(exampleEquinixMetalProject.id())
+ *             .portId(example.ports()[0].id())
+ *             .nniVlan(1024)
+ *             .vrfId(exampleEquinixMetalVrf.id())
+ *             .peerAsn(65530)
+ *             .subnet("192.168.100.16/31")
+ *             .metalIp("192.168.100.16")
+ *             .customerIp("192.168.100.17")
  *             .build());
  * 
- *         ctx.export("vrfId", vrf.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/AclTemplate.java b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/AclTemplate.java
index 51f0c467..b158e833 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/AclTemplate.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/AclTemplate.java
@@ -30,9 +30,9 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.networkedge.AclTemplate;
- * import com.equinix.pulumi.networkedge.AclTemplateArgs;
- * import com.equinix.pulumi.networkedge.inputs.AclTemplateInboundRuleArgs;
+ * import com.pulumi.equinix.networkedge.AclTemplate;
+ * import com.pulumi.equinix.networkedge.AclTemplateArgs;
+ * import com.pulumi.equinix.networkedge.inputs.AclTemplateInboundRuleArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -46,9 +46,10 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         var aclTemplate = new AclTemplate("aclTemplate", AclTemplateArgs.builder()        
+ *         var myacl = new AclTemplate("myacl", AclTemplateArgs.builder()
  *             .name("test")
  *             .description("Test ACL template")
+ *             .projectId("a86d7112-d740-4758-9c9c-31e66373746b")
  *             .inboundRules(            
  *                 AclTemplateInboundRuleArgs.builder()
  *                     .subnet("1.1.1.1/32")
@@ -58,15 +59,13 @@
  *                     .description("inbound rule description")
  *                     .build(),
  *                 AclTemplateInboundRuleArgs.builder()
- *                     .subnet("2.2.2.2/28")
- *                     .protocol("TCP")
+ *                     .subnet("172.16.25.0/24")
+ *                     .protocol("UDP")
  *                     .srcPort("any")
- *                     .dstPort("any")
- *                     .description("inbound rule description")
+ *                     .dstPort("53,1045,2041")
  *                     .build())
  *             .build());
  * 
- *         ctx.export("templateId", aclTemplate.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Bgp.java b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Bgp.java
index d878800d..3fa7b052 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Bgp.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Bgp.java
@@ -27,8 +27,8 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.networkedge.Bgp;
- * import com.equinix.pulumi.networkedge.BgpArgs;
+ * import com.pulumi.equinix.networkedge.Bgp;
+ * import com.pulumi.equinix.networkedge.BgpArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -42,7 +42,7 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         var bgp = new Bgp("bgp", BgpArgs.builder()        
+ *         var test = new Bgp("test", BgpArgs.builder()
  *             .connectionId("54014acf-9730-4b55-a791-459283d05fb1")
  *             .localIpAddress("10.1.1.1/30")
  *             .localAsn(12345)
@@ -51,8 +51,6 @@
  *             .authenticationKey("secret")
  *             .build());
  * 
- *         ctx.export("state", bgp.state());
- *         ctx.export("provisioningStatus", bgp.provisioningStatus());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Device.java b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Device.java
index 085b5c06..e66f8a9f 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Device.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/Device.java
@@ -36,6 +36,7 @@
  * * **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices.
  * 
  * ## Example Usage
+ * ### example 8
  * 
  * {@code
  * package generated_program;
@@ -43,11 +44,13 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.networkedge.Device;
- * import com.equinix.pulumi.networkedge.DeviceArgs;
- * import com.equinix.pulumi.networkedge.inputs.DeviceSshKeyArgs;
- * import com.equinix.pulumi.networkedge.inputs.GetAccountArgs;
- * import com.equinix.pulumi.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.NetworkFile;
+ * import com.pulumi.equinix.networkedge.NetworkFileArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -61,49 +64,542 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var accountName = config.get("accountName").get();
- *         final var licenseToken = config.get("licenseToken").get();
- *         final var sshUserName = config.get("sshUserName").get();
- *         final var sshKeyName = config.get("sshKeyName").get();
- *         final var aclTemplateId = config.get("aclTemplateId").get();
- *         final var metro = config.get("metro").orElse("SV");
- *         final var devicePackageCode = config.get("devicePackageCode").orElse("network-essentials");
- *         final var deviceVersion = config.get("deviceVersion").orElse("17.06.01a");
- *         final var sizeInCores = Integer.parseInt(config.get("sizeInCores").orElse("2"));
- *         final var termLength = Integer.parseInt(config.get("termLength").orElse("6"));
- *         final var additionalBandwidth = Integer.parseInt(config.get("additionalBandwidth").orElse("5"));
- *         final var accountNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
- *             .name(accountName)
- *             .metroCode(metro)
- *             .build()).applyValue(account -> account.number());
- * 
- *         var c8KRouter = new Device("c8KRouter", DeviceArgs.builder()        
- *             .name("catalystRouter")
- *             .metroCode(metro)
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .name("account-name")
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var bluecatEdgeServicePointCloudinitPrimaryFile = new NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", NetworkFileArgs.builder()
+ *             .fileName("TF-BLUECAT-ESP-cloud-init-file.txt")
+ *             .content(StdFunctions.file(FileArgs.builder()
+ *                 .input(filepath)
+ *                 .build()).result())
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .deviceTypeCode("BLUECAT-EDGE-SERVICE-POINT")
+ *             .processType("CLOUD_INIT")
+ *             .selfManaged(true)
+ *             .byol(true)
+ *             .build());
+ * 
+ *         var bluecatEdgeServicePointCloudinitSecondaryFile = new NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", NetworkFileArgs.builder()
+ *             .fileName("TF-BLUECAT-ESP-cloud-init-file.txt")
+ *             .content(StdFunctions.file(FileArgs.builder()
+ *                 .input(filepath)
+ *                 .build()).result())
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .deviceTypeCode("BLUECAT-EDGE-SERVICE-POINT")
+ *             .processType("CLOUD_INIT")
+ *             .selfManaged(true)
+ *             .byol(true)
+ *             .build());
+ * 
+ *         var bluecatEdgeServicePointHa = new Device("bluecatEdgeServicePointHa", DeviceArgs.builder()
+ *             .name("tf-bluecat-edge-service-point-p")
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .typeCode("BLUECAT-EDGE-SERVICE-POINT")
+ *             .selfManaged(true)
+ *             .connectivity("PRIVATE")
+ *             .byol(true)
+ *             .packageCode("STD")
+ *             .notifications("test{@literal @}equinix.com")
+ *             .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .cloudInitFileId(bluecatEdgeServicePointCloudinitPrimaryFile.uuid())
+ *             .version("4.6.3")
+ *             .coreCount(4)
+ *             .termLength(12)
+ *             .secondaryDevice(DeviceSecondaryDeviceArgs.builder()
+ *                 .name("tf-bluecat-edge-service-point-s")
+ *                 .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *                 .notifications("test{@literal @}eq.com")
+ *                 .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *                 .cloudInitFileId(bluecatEdgeServicePointCloudinitSecondaryFile.uuid())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 1 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var dc = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .metroCode("DC")
+ *             .build());
+ * 
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var csr1000VHa = new Device("csr1000VHa", DeviceArgs.builder()
+ *             .name("tf-csr1000v-p")
+ *             .throughput(500)
+ *             .throughputUnit("Mbps")
+ *             .metroCode(dc.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .typeCode("CSR1000V")
+ *             .selfManaged(false)
+ *             .connectivity("INTERNET-ACCESS")
+ *             .byol(false)
+ *             .packageCode("SEC")
+ *             .notifications(            
+ *                 "john{@literal @}equinix.com",
+ *                 "marry{@literal @}equinix.com",
+ *                 "fred{@literal @}equinix.com")
+ *             .hostname("csr1000v-p")
+ *             .termLength(12)
+ *             .accountNumber(dc.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .version("16.09.05")
+ *             .coreCount(2)
+ *             .secondaryDevice(DeviceSecondaryDeviceArgs.builder()
+ *                 .name("tf-csr1000v-s")
+ *                 .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *                 .hostname("csr1000v-s")
+ *                 .notifications(                
+ *                     "john{@literal @}equinix.com",
+ *                     "marry{@literal @}equinix.com")
+ *                 .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 4 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .name("account-name")
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var c8KvSingle = new Device("c8KvSingle", DeviceArgs.builder()
+ *             .name("tf-c8kv")
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
  *             .typeCode("C8000V")
  *             .selfManaged(true)
  *             .byol(true)
- *             .packageCode(devicePackageCode)
- *             .notifications("example{@literal @}equinix.com")
+ *             .packageCode("network-essentials")
+ *             .notifications("test{@literal @}equinix.com")
  *             .hostname("C8KV")
- *             .accountNumber(accountNum)
- *             .version(deviceVersion)
- *             .coreCount(sizeInCores)
- *             .termLength(termLength)
- *             .licenseToken(licenseToken)
- *             .additionalBandwidth(additionalBandwidth)
+ *             .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .version("17.06.01a")
+ *             .coreCount(2)
+ *             .termLength(12)
+ *             .licenseToken("valid-license-token")
+ *             .additionalBandwidth(5)
  *             .sshKey(DeviceSshKeyArgs.builder()
- *                 .username(sshUserName)
- *                 .keyName(sshKeyName)
+ *                 .username("test-username")
+ *                 .keyName("valid-key-name")
+ *                 .build())
+ *             .aclTemplateId("3e548c02-9164-4197-aa23-05b1f644883c")
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 7 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.SshKey;
+ * import com.pulumi.equinix.networkedge.SshKeyArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .name("account-name")
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var testPublicKey = new SshKey("testPublicKey", SshKeyArgs.builder()
+ *             .name("key-name")
+ *             .publicKey("ssh-dss key-value")
+ *             .type("DSA")
+ *             .build());
+ * 
+ *         var bluecatBddsHa = new Device("bluecatBddsHa", DeviceArgs.builder()
+ *             .name("tf-bluecat-bdds-p")
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .typeCode("BLUECAT")
+ *             .selfManaged(true)
+ *             .connectivity("PRIVATE")
+ *             .byol(true)
+ *             .packageCode("STD")
+ *             .notifications("test{@literal @}equinix.com")
+ *             .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .version("9.6.0")
+ *             .coreCount(2)
+ *             .termLength(12)
+ *             .vendorConfiguration(Map.ofEntries(
+ *                 Map.entry("hostname", "test"),
+ *                 Map.entry("privateAddress", "x.x.x.x"),
+ *                 Map.entry("privateCidrMask", "24"),
+ *                 Map.entry("privateGateway", "x.x.x.x"),
+ *                 Map.entry("licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"),
+ *                 Map.entry("licenseId", "xxxxxxxxxxxxxxx")
+ *             ))
+ *             .sshKey(DeviceSshKeyArgs.builder()
+ *                 .username("test-username")
+ *                 .keyName(testPublicKey.name())
+ *                 .build())
+ *             .secondaryDevice(DeviceSecondaryDeviceArgs.builder()
+ *                 .name("tf-bluecat-bdds-s")
+ *                 .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *                 .notifications("test{@literal @}eq.com")
+ *                 .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *                 .vendorConfiguration(Map.ofEntries(
+ *                     Map.entry("hostname", "test"),
+ *                     Map.entry("privateAddress", "x.x.x.x"),
+ *                     Map.entry("privateCidrMask", "24"),
+ *                     Map.entry("privateGateway", "x.x.x.x"),
+ *                     Map.entry("licenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"),
+ *                     Map.entry("licenseId", "xxxxxxxxxxxxxxx")
+ *                 ))
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 2 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0Args;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode0VendorConfigurationArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1Args;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceClusterDetailsNode1VendorConfigurationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var panwCluster = new Device("panwCluster", DeviceArgs.builder()
+ *             .name("tf-panw")
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .typeCode("PA-VM")
+ *             .selfManaged(true)
+ *             .byol(true)
+ *             .packageCode("VM100")
+ *             .notifications(            
+ *                 "john{@literal @}equinix.com",
+ *                 "marry{@literal @}equinix.com",
+ *                 "fred{@literal @}equinix.com")
+ *             .termLength(12)
+ *             .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .version("10.1.3")
+ *             .interfaceCount(10)
+ *             .coreCount(2)
+ *             .sshKey(DeviceSshKeyArgs.builder()
+ *                 .username("test")
+ *                 .keyName("test-key")
+ *                 .build())
+ *             .aclTemplateId("0bff6e05-f0e7-44cd-804a-25b92b835f8b")
+ *             .clusterDetails(DeviceClusterDetailsArgs.builder()
+ *                 .clusterName("tf-panw-cluster")
+ *                 .node0(DeviceClusterDetailsNode0Args.builder()
+ *                     .vendorConfiguration(DeviceClusterDetailsNode0VendorConfigurationArgs.builder()
+ *                         .hostname("panw-node0")
+ *                         .build())
+ *                     .licenseToken("licenseToken")
+ *                     .build())
+ *                 .node1(DeviceClusterDetailsNode1Args.builder()
+ *                     .vendorConfiguration(DeviceClusterDetailsNode1VendorConfigurationArgs.builder()
+ *                         .hostname("panw-node1")
+ *                         .build())
+ *                     .licenseToken("licenseToken")
+ *                     .build())
+ *                 .build())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 5 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .name("account-name")
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var vsrxSingle = new Device("vsrxSingle", DeviceArgs.builder()
+ *             .name("tf-c8kv-sdwan")
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .typeCode("VSRX")
+ *             .selfManaged(true)
+ *             .byol(true)
+ *             .packageCode("STD")
+ *             .notifications("test{@literal @}equinix.com")
+ *             .hostname("VSRX")
+ *             .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .version("23.2R1.13")
+ *             .coreCount(2)
+ *             .termLength(12)
+ *             .additionalBandwidth(5)
+ *             .projectId("a86d7112-d740-4758-9c9c-31e66373746b")
+ *             .diverseDeviceId("ed7891bd-15b4-4f72-ac56-d96cfdacddcc")
+ *             .sshKey(DeviceSshKeyArgs.builder()
+ *                 .username("test-username")
+ *                 .keyName("valid-key-name")
+ *                 .build())
+ *             .aclTemplateId("3e548c02-9164-4197-aa23-05b1f644883c")
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 3 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.NetworkFile;
+ * import com.pulumi.equinix.networkedge.NetworkFileArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var config = ctx.config();
+ *         final var filepath = config.get("filepath").orElse("cloudInitFileFolder/TF-AVX-cloud-init-file.txt");
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var aviatrixCloudinitFile = new NetworkFile("aviatrixCloudinitFile", NetworkFileArgs.builder()
+ *             .fileName("TF-AVX-cloud-init-file.txt")
+ *             .content(StdFunctions.file(FileArgs.builder()
+ *                 .input(filepath)
+ *                 .build()).result())
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .deviceTypeCode("AVIATRIX_EDGE")
+ *             .processType("CLOUD_INIT")
+ *             .selfManaged(true)
+ *             .byol(true)
+ *             .build());
+ * 
+ *         var aviatrixSingle = new Device("aviatrixSingle", DeviceArgs.builder()
+ *             .name("tf-aviatrix")
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .typeCode("AVIATRIX_EDGE")
+ *             .selfManaged(true)
+ *             .byol(true)
+ *             .packageCode("STD")
+ *             .notifications("john{@literal @}equinix.com")
+ *             .termLength(12)
+ *             .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .version("6.9")
+ *             .coreCount(2)
+ *             .cloudInitFileId(aviatrixCloudinitFile.uuid())
+ *             .aclTemplateId("c06150ea-b604-4ad1-832a-d63936e9b938")
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * ### example 6 + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.equinix.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.inputs.GetAccountArgs;
+ * import com.pulumi.equinix.networkedge.SshKey;
+ * import com.pulumi.equinix.networkedge.SshKeyArgs;
+ * import com.pulumi.equinix.networkedge.Device;
+ * import com.pulumi.equinix.networkedge.DeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSshKeyArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceSecondaryDeviceArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         final var sv = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
+ *             .name("account-name")
+ *             .metroCode("SV")
+ *             .build());
+ * 
+ *         var testPublicKey = new SshKey("testPublicKey", SshKeyArgs.builder()
+ *             .name("key-name")
+ *             .publicKey("ssh-dss key-value")
+ *             .type("DSA")
+ *             .build());
+ * 
+ *         var aristaHa = new Device("aristaHa", DeviceArgs.builder()
+ *             .name("tf-arista-p")
+ *             .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *             .typeCode("ARISTA-ROUTER")
+ *             .selfManaged(true)
+ *             .connectivity("PRIVATE")
+ *             .byol(true)
+ *             .packageCode("CloudEOS")
+ *             .notifications("test{@literal @}equinix.com")
+ *             .hostname("arista-p")
+ *             .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *             .version("4.29.0")
+ *             .coreCount(4)
+ *             .termLength(12)
+ *             .additionalBandwidth(5)
+ *             .sshKey(DeviceSshKeyArgs.builder()
+ *                 .username("test-username")
+ *                 .keyName(testPublicKey.name())
+ *                 .build())
+ *             .aclTemplateId("c637a17b-7a6a-4486-924b-30e6c36904b0")
+ *             .secondaryDevice(DeviceSecondaryDeviceArgs.builder()
+ *                 .name("tf-arista-s")
+ *                 .metroCode(sv.applyValue(getAccountResult -> getAccountResult.metroCode()))
+ *                 .hostname("arista-s")
+ *                 .notifications("test{@literal @}eq.com")
+ *                 .accountNumber(sv.applyValue(getAccountResult -> getAccountResult.number()))
+ *                 .aclTemplateId("fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138")
  *                 .build())
- *             .aclTemplateId(aclTemplateId)
  *             .build());
  * 
- *         ctx.export("routerId", c8KRouter.id());
- *         ctx.export("provisionStatus", c8KRouter.status());
- *         ctx.export("licenseStatus", c8KRouter.licenseStatus());
- *         ctx.export("sshIpAddress", c8KRouter.sshIpAddress());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/DeviceLink.java b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/DeviceLink.java
index ccec11a3..1232fdcd 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/DeviceLink.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/DeviceLink.java
@@ -29,13 +29,10 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.networkedge.DeviceLink;
- * import com.equinix.pulumi.networkedge.DeviceLinkArgs;
- * import com.equinix.pulumi.networkedge.inputs.DeviceLinkDeviceArgs;
- * import com.equinix.pulumi.networkedge.inputs.DeviceLinkLinkArgs;
- * import com.equinix.pulumi.networkedge.inputs.GetAccountArgs;
- * import com.equinix.pulumi.networkedge.inputs.GetDeviceArgs;
- * import com.equinix.pulumi.networkedge.NetworkedgeFunctions;
+ * import com.pulumi.equinix.networkedge.DeviceLink;
+ * import com.pulumi.equinix.networkedge.DeviceLinkArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceLinkDeviceArgs;
+ * import com.pulumi.equinix.networkedge.inputs.DeviceLinkLinkArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -49,49 +46,30 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var accountName = config.get("accountName").get();
- *         final var accountMetro = config.get("accountMetro").get();
- *         final var device1Id = config.get("device1Id").get();
- *         final var device2Id = config.get("device2Id").get();
- *         final var accountfNum = NetworkedgeFunctions.getAccount(GetAccountArgs.builder()
- *             .name(accountName)
- *             .metroCode(accountMetro)
- *             .build()).applyValue(account -> account.number());
- * 
- *         final var device1Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder()
- *             .uuid(device1Id)
- *             .build()).applyValue(device -> device.metroCode());
- * 
- *         final var device2Metro = NetworkedgeFunctions.getDevice(GetDeviceArgs.builder()
- *             .uuid(device2Id)
- *             .build()).applyValue(device -> device.metroCode());
- * 
- *         var deviceLink = new DeviceLink("deviceLink", DeviceLinkArgs.builder()        
+ *         var test = new DeviceLink("test", DeviceLinkArgs.builder()
  *             .name("test-link")
  *             .subnet("192.168.40.64/27")
+ *             .projectId("a86d7112-d740-4758-9c9c-31e66373746b")
  *             .devices(            
  *                 DeviceLinkDeviceArgs.builder()
- *                     .id("device1Id")
+ *                     .id(testEquinixNetworkDevice.uuid())
  *                     .asn(22111)
  *                     .interfaceId(6)
  *                     .build(),
  *                 DeviceLinkDeviceArgs.builder()
- *                     .id("device2Id")
+ *                     .id(testEquinixNetworkDevice.secondaryDevice()[0].uuid())
  *                     .asn(22333)
  *                     .interfaceId(7)
  *                     .build())
  *             .links(DeviceLinkLinkArgs.builder()
- *                 .accountNumber(accountfNum)
- *                 .srcMetroCode(device1Metro)
- *                 .dstMetroCode(device2Metro)
+ *                 .accountNumber(testEquinixNetworkDevice.accountNumber())
+ *                 .srcMetroCode(testEquinixNetworkDevice.metroCode())
+ *                 .dstMetroCode(testEquinixNetworkDevice.secondaryDevice()[0].metroCode())
  *                 .throughput("50")
  *                 .throughputUnit("Mbps")
  *                 .build())
  *             .build());
  * 
- *         ctx.export("status", deviceLink.status());
- *         ctx.export("devices", deviceLink.devices());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/NetworkFile.java b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/NetworkFile.java
index b6313c02..c51e6a3d 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/NetworkFile.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/NetworkFile.java
@@ -26,12 +26,11 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.networkedge.NetworkFile;
- * import com.equinix.pulumi.networkedge.NetworkFileArgs;
+ * import com.pulumi.equinix.networkedge.NetworkFile;
+ * import com.pulumi.equinix.networkedge.NetworkFileArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
- * import java.io.IOException;
  * import java.io.File;
  * import java.nio.file.Files;
  * import java.nio.file.Paths;
@@ -43,27 +42,19 @@
  * 
  *     public static void stack(Context ctx) {
  *         final var config = ctx.config();
- *         final var metro = config.get("metro").orElse("SV");
- * 
- *         String content = null;
- *         try {
- *             content = Files.readString(Paths.get("./../assets/aviatrix-cloud-init.txt"));
- *         } catch (IOException e) {
- *             e.printStackTrace();
- *         }
- * 
- *         var networkFile = new NetworkFile("networkFile", NetworkFileArgs.builder()        
- *             .fileName("Aviatrix-ZTP-file")
- *             .content(content)
- *             .metroCode(metro)
+ *         final var filepath = config.get("filepath").orElse("fileFolder/fileName.txt");
+ *         var testFile = new NetworkFile("testFile", NetworkFileArgs.builder()
+ *             .fileName("fileName.txt")
+ *             .content(StdFunctions.file(FileArgs.builder()
+ *                 .input(filepath)
+ *                 .build()).result())
+ *             .metroCode("SV")
  *             .deviceTypeCode("AVIATRIX_EDGE")
  *             .processType("CLOUD_INIT")
  *             .selfManaged(true)
  *             .byol(true)
  *             .build());
  * 
- *         ctx.export("networkFileId", networkFile.id());
- *         ctx.export("networkFileStatus", networkFile.status());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshKey.java b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshKey.java
index 9795b229..a62a10cc 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshKey.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshKey.java
@@ -25,12 +25,11 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.networkedge.SshKey;
- * import com.equinix.pulumi.networkedge.SshKeyArgs;
+ * import com.pulumi.equinix.networkedge.SshKey;
+ * import com.pulumi.equinix.networkedge.SshKeyArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
- * import java.io.IOException;
  * import java.io.File;
  * import java.nio.file.Files;
  * import java.nio.file.Paths;
@@ -41,19 +40,24 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         String key = null;
- *         try {
- *             key = Files.readString(Paths.get("/Users/John/.ssh/ne_rsa.pub"));
- *         } catch (IOException e) {
- *             e.printStackTrace();
- *         }
- * 
- *         var sshKey = new SshKey("sshKey", SshKeyArgs.builder()        
+ *         var john = new SshKey("john", SshKeyArgs.builder()
  *             .name("johnKent")
- *             .publicKey(key)
+ *             .publicKey("""
+ *   ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX
+ *   2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu
+ *   iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS
+ *   qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl
+ *   mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N
+ *   w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM
+ *   8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5
+ *   SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW
+ *   WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F
+ *   jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent{@literal @}company.com
+ *             """)
+ *             .type("RSA")
+ *             .projectId("a86d7112-d740-4758-9c9c-31e66373746b")
  *             .build());
  * 
- *         ctx.export("sshKeyId", sshKey.id());
  *     }
  * }
  * }
diff --git a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshUser.java b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshUser.java
index 514fb482..3f8ceb16 100644
--- a/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshUser.java
+++ b/sdk/java/src/main/java/com/equinix/pulumi/networkedge/SshUser.java
@@ -25,8 +25,8 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
- * import com.equinix.pulumi.networkedge.SshUser;
- * import com.equinix.pulumi.networkedge.SshUserArgs;
+ * import com.pulumi.equinix.networkedge.SshUser;
+ * import com.pulumi.equinix.networkedge.SshUserArgs;
  * import java.util.List;
  * import java.util.ArrayList;
  * import java.util.Map;
@@ -40,17 +40,14 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
- *         final var config = ctx.config();
- *         final var device1Id = config.get("device1Id").get();
- *         final var device2Id = config.get("device2Id").get();
- *         var sshUser = new SshUser("sshUser", SshUserArgs.builder()        
- *             .username("johnKent")
+ *         var john = new SshUser("john", SshUserArgs.builder()
+ *             .username("john")
+ *             .password("secret")
  *             .deviceIds(            
- *                 device1Id,
- *                 device2Id)
+ *                 "csr1000v-ha-uuid",
+ *                 "csr1000v-ha-redundant-uuid")
  *             .build());
  * 
- *         ctx.export("sshUserId", sshUser.id());
  *     }
  * }
  * }
diff --git a/sdk/nodejs/fabric/cloudRouter.ts b/sdk/nodejs/fabric/cloudRouter.ts
index 3aec6dc6..7adc2522 100644
--- a/sdk/nodejs/fabric/cloudRouter.ts
+++ b/sdk/nodejs/fabric/cloudRouter.ts
@@ -15,35 +15,36 @@ import * as utilities from "../utilities";
  * * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const metro = config.get("metro") || "FR";
- * const accountNum = config.requireNumber("accountNum");
- * const router = new equinix.fabric.CloudRouter("router", {
- *     name: "My-Fabric-Cloud-Router",
+ * const newCloudRouter = new equinix.fabric.CloudRouter("newCloudRouter", {
+ *     name: "Router-SV",
  *     type: "XF_ROUTER",
+ *     notifications: [{
+ *         type: "ALL",
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
  *     location: {
- *         metroCode: metro,
+ *         metroCode: "SV",
  *     },
  *     "package": {
- *         code: "BASIC",
+ *         code: "STANDARD",
+ *     },
+ *     project: {
+ *         projectId: "776847000642406",
  *     },
- *     notifications: [{
- *         type: "ALL",
- *         emails: ["example@equinix.com"],
- *     }],
  *     account: {
- *         accountNumber: 272010,
+ *         accountNumber: 203612,
  *     },
- *     "project": {
- *         "projectId": "995072000433550"
- *     }
  * });
- * export const routerId = router.id;
  * ```
  */
 export class CloudRouter extends pulumi.CustomResource {
diff --git a/sdk/nodejs/fabric/connection.ts b/sdk/nodejs/fabric/connection.ts
index bff000fd..92abc2c1 100644
--- a/sdk/nodejs/fabric/connection.ts
+++ b/sdk/nodejs/fabric/connection.ts
@@ -9,71 +9,715 @@ import * as utilities from "../utilities";
 
 /**
  * ## Example Usage
+ * ### example 9
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const fcr2Azure = new equinix.fabric.Connection("fcr2azure", {
+ *     name: "ConnectionName",
+ *     type: "IP_VC",
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: "CLOUD_ROUTER",
+ *             router: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.SP,
+ *             authenticationKey: "",
+ *             peeringType: equinix.fabric.AccessPointPeeringType.Private,
+ *             profile: {
+ *                 type: equinix.fabric.ProfileType.L2Profile,
+ *                 uuid: "",
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 5
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const vd2Port = new equinix.fabric.Connection("vd2port", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.VD,
+ *             virtualDevice: {
+ *                 type: "EDGE",
+ *                 uuid: "",
+ *             },
+ *             "interface": {
+ *                 type: "NETWORK",
+ *                 id: 7,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             linkProtocol: {
+ *                 type: equinix.fabric.AccessPointLinkProtocolType.Dot1q,
+ *                 vlanSTag: 3711,
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 12
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const fcr2Network = new equinix.fabric.Connection("fcr2network", {
+ *     name: "ConnectionName",
+ *     type: "IPWAN_VC",
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: "CLOUD_ROUTER",
+ *             router: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Network,
+ *             network: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 11
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const vd2AzurePrimary = new equinix.fabric.Connection("vd2azurePrimary", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
+ *     redundancy: {
+ *         priority: "PRIMARY",
+ *     },
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.VD,
+ *             virtualDevice: {
+ *                 type: "EDGE",
+ *                 uuid: "",
+ *             },
+ *             "interface": {
+ *                 type: "CLOUD",
+ *                 id: 7,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.SP,
+ *             authenticationKey: "",
+ *             peeringType: equinix.fabric.AccessPointPeeringType.Private,
+ *             profile: {
+ *                 type: equinix.fabric.ProfileType.L2Profile,
+ *                 uuid: "",
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * const vd2AzureSecondary = new equinix.fabric.Connection("vd2azureSecondary", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
+ *     redundancy: {
+ *         priority: "SECONDARY",
+ *         group: vd2AzurePrimary.redundancy.apply(redundancy => redundancy?.group),
+ *     },
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.VD,
+ *             virtualDevice: {
+ *                 type: "EDGE",
+ *                 uuid: "",
+ *             },
+ *             "interface": {
+ *                 type: "CLOUD",
+ *                 id: 5,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.SP,
+ *             authenticationKey: "",
+ *             peeringType: equinix.fabric.AccessPointPeeringType.Private,
+ *             profile: {
+ *                 type: equinix.fabric.ProfileType.L2Profile,
+ *                 uuid: "",
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 6
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const vd2Token = new equinix.fabric.Connection("vd2token", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.VD,
+ *             virtualDevice: {
+ *                 type: "EDGE",
+ *                 uuid: "",
+ *             },
+ *             "interface": {
+ *                 type: "NETWORK",
+ *                 id: 7,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         serviceToken: {
+ *             uuid: "",
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 3
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const epl = new equinix.fabric.Connection("epl", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EPL,
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 14
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const epl = new equinix.fabric.Connection("epl", {
+ *     name: "ConnectionName",
+ *     type: "EPLAN_VC",
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Network,
+ *             network: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 4
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const accessEplVc = new equinix.fabric.Connection("accessEplVc", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.AccessEPL,
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             linkProtocol: {
+ *                 type: equinix.fabric.AccessPointLinkProtocolType.QinQ,
+ *                 vlanSTag: 1976,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 13
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const vd2Token = new equinix.fabric.Connection("vd2token", {
+ *     name: "ConnectionName",
+ *     type: "EVPLAN_VC",
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.VD,
+ *             virtualDevice: {
+ *                 type: "EDGE",
+ *                 uuid: "",
+ *             },
+ *             "interface": {
+ *                 type: "CLOUD",
+ *                 id: 7,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Network,
+ *             network: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 1
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const port2Port = new equinix.fabric.Connection("port2port", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             linkProtocol: {
+ *                 type: equinix.fabric.AccessPointLinkProtocolType.QinQ,
+ *                 vlanSTag: 1976,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             linkProtocol: {
+ *                 type: equinix.fabric.AccessPointLinkProtocolType.QinQ,
+ *                 vlanSTag: 3711,
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 8
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const fcr2Port = new equinix.fabric.Connection("fcr2port", {
+ *     name: "ConnectionName",
+ *     type: "IP_VC",
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: "CLOUD_ROUTER",
+ *             router: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             linkProtocol: {
+ *                 type: equinix.fabric.AccessPointLinkProtocolType.Dot1q,
+ *                 vlanTag: 2711,
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 2
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const metro = config.get("metro") || "FR";
- * const speedInMbps = config.getNumber("speedInMbps") || 50;
- * const fabricPortName = config.require("fabricPortName");
- * const awsRegion = config.get("awsRegion") || "eu-central-1";
- * const awsAccountId = config.require("awsAccountId");
- * const serviceProfileId = equinix.fabric.getServiceProfiles({
- *     filter: {
- *         property: "/name",
- *         operator: "=",
- *         values: ["AWS Direct Connect"],
- *     },
- * }).then(invoke => invoke.data?.[0]?.uuid!);
- * const portId = equinix.fabric.getPorts({
- *     filter: {
- *         name: fabricPortName,
- *     },
- * }).then(invoke => invoke.data?.[0]?.uuid!);
- * const colo2Aws = new equinix.fabric.Connection("colo2Aws", {
- *     name: "Pulumi-colo2Aws",
- *     type: "EVPL_VC",
+ * const port2Aws = new equinix.fabric.Connection("port2aws", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
  *     notifications: [{
- *         type: "ALL",
- *         emails: ["example@equinix.com"],
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
  *     }],
- *     bandwidth: speedInMbps,
+ *     bandwidth: 50,
  *     redundancy: {
  *         priority: "PRIMARY",
  *     },
+ *     order: {
+ *         purchaseOrderNumber: "1-323929",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Colo,
+ *             port: {
+ *                 uuid: "",
+ *             },
+ *             linkProtocol: {
+ *                 type: equinix.fabric.AccessPointLinkProtocolType.QinQ,
+ *                 vlanSTag: 2019,
+ *                 vlanCTag: 2112,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.SP,
+ *             authenticationKey: "",
+ *             sellerRegion: "us-west-1",
+ *             profile: {
+ *                 type: equinix.fabric.ProfileType.L2Profile,
+ *                 uuid: "",
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ *     additionalInfo: [
+ *         {
+ *             key: "accessKey",
+ *             value: "",
+ *         },
+ *         {
+ *             key: "secretKey",
+ *             value: "",
+ *         },
+ *     ],
+ * });
+ * ```
+ * ### example 15
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const epl = new equinix.fabric.Connection("epl", {
+ *     name: "ConnectionName",
+ *     type: "EVPLAN_VC",
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
  *     aSide: {
  *         accessPoint: {
- *             type: "COLO",
+ *             type: equinix.fabric.AccessPointType.Colo,
  *             port: {
- *                 uuid: portId,
+ *                 uuid: "",
  *             },
  *             linkProtocol: {
- *                 type: "DOT1Q",
- *                 vlanTag: 1234,
+ *                 type: equinix.fabric.AccessPointLinkProtocolType.Dot1q,
+ *                 vlanSTag: 1976,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.Network,
+ *             network: {
+ *                 uuid: "",
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 10
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const vd2Azure = new equinix.fabric.Connection("vd2azure", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.VD,
+ *             virtualDevice: {
+ *                 type: "EDGE",
+ *                 uuid: "",
  *             },
+ *             "interface": {
+ *                 type: "CLOUD",
+ *                 id: 7,
+ *             },
+ *         },
+ *     },
+ *     zSide: {
+ *         accessPoint: {
+ *             type: equinix.fabric.AccessPointType.SP,
+ *             authenticationKey: "",
+ *             peeringType: equinix.fabric.AccessPointPeeringType.Private,
+ *             profile: {
+ *                 type: equinix.fabric.ProfileType.L2Profile,
+ *                 uuid: "",
+ *             },
+ *             location: {
+ *                 metroCode: equinix.index.Metro.SiliconValley,
+ *             },
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 7
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const token2Aws = new equinix.fabric.Connection("token2aws", {
+ *     name: "ConnectionName",
+ *     type: equinix.fabric.ConnectionType.EVPL,
+ *     notifications: [{
+ *         type: equinix.fabric.NotificationsType.All,
+ *         emails: [
+ *             "example@equinix.com",
+ *             "test1@equinix.com",
+ *         ],
+ *     }],
+ *     bandwidth: 50,
+ *     order: {
+ *         purchaseOrderNumber: "1-323292",
+ *     },
+ *     aSide: {
+ *         serviceToken: {
+ *             uuid: "",
  *         },
  *     },
  *     zSide: {
  *         accessPoint: {
- *             type: "SP",
- *             authenticationKey: awsAccountId,
- *             sellerRegion: awsRegion,
+ *             type: equinix.fabric.AccessPointType.SP,
+ *             authenticationKey: "",
+ *             sellerRegion: "us-west-1",
  *             profile: {
- *                 type: "L2_PROFILE",
- *                 uuid: serviceProfileId,
+ *                 type: equinix.fabric.ProfileType.L2Profile,
+ *                 uuid: "",
  *             },
  *             location: {
- *                 metroCode: metro,
+ *                 metroCode: equinix.index.Metro.SiliconValley,
  *             },
  *         },
  *     },
  * });
- * export const connectionId = colo2Aws.id;
- * export const connectionStatus = colo2Aws.operation.apply(operation => operation.equinixStatus);
- * export const connectionProviderStatus = colo2Aws.operation.apply(operation => operation.providerStatus);
- * export const awsDirectConnectId = colo2Aws.zSide.apply(zSide => zSide.accessPoint?.providerConnectionId);
  * ```
  */
 export class Connection extends pulumi.CustomResource {
diff --git a/sdk/nodejs/fabric/routingProtocol.ts b/sdk/nodejs/fabric/routingProtocol.ts
index 1906da19..a70305c9 100644
--- a/sdk/nodejs/fabric/routingProtocol.ts
+++ b/sdk/nodejs/fabric/routingProtocol.ts
@@ -15,24 +15,75 @@ import * as utilities from "../utilities";
  * * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols
  *
  * ## Example Usage
+ * ### example 3
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const direct = new equinix.fabric.RoutingProtocol("direct", {
+ *     connectionUuid: "",
+ *     type: "DIRECT",
+ *     name: "direct_rp",
+ *     directIpv4: {
+ *         equinixIfaceIp: "190.1.1.1/30",
+ *     },
+ *     directIpv6: {
+ *         equinixIfaceIp: "190::1:1/126",
+ *     },
+ * });
+ * const bgp = new equinix.fabric.RoutingProtocol("bgp", {
+ *     connectionUuid: "",
+ *     type: "BGP",
+ *     name: "bgp_rp",
+ *     bgpIpv4: {
+ *         customerPeerIp: "190.1.1.2",
+ *         enabled: true,
+ *     },
+ *     bgpIpv6: {
+ *         customerPeerIp: "190::1:2",
+ *         enabled: true,
+ *     },
+ *     customerAsn: 4532,
+ * }, {
+ *     dependsOn: [direct],
+ * });
+ * ```
+ * ### example 1
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const connectionId = config.require("connectionId");
- * const routingProtocol = new equinix.fabric.RoutingProtocol("RoutingProtocol", {
- *     connectionUuid: connectionId,
- *     name: "My-Direct-route-1",
+ * const direct = new equinix.fabric.RoutingProtocol("direct", {
+ *     connectionUuid: "",
  *     type: "DIRECT",
+ *     name: "direct_rp",
  *     directIpv4: {
- *         equinixIfaceIp: "192.168.100.1/30",
+ *         equinixIfaceIp: "190.1.1.1/30",
+ *     },
+ *     directIpv6: {
+ *         equinixIfaceIp: "190::1:1/126",
+ *     },
+ * });
+ * ```
+ * ### example 2
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const bgp = new equinix.fabric.RoutingProtocol("bgp", {
+ *     connectionUuid: "",
+ *     type: "BGP",
+ *     name: "bgp_rp",
+ *     bgpIpv4: {
+ *         customerPeerIp: "190.1.1.2",
+ *         enabled: true,
+ *     },
+ *     bgpIpv6: {
+ *         customerPeerIp: "190::1:2",
+ *         enabled: true,
  *     },
+ *     customerAsn: 4532,
  * });
- * export const routingProtocolId = routingProtocol.id;
- * export const routingProtocolState = routingProtocol.state;
- * export const routingProtocolEquinixAsn = routingProtocol.equinixAsn;
  * ```
  */
 export class RoutingProtocol extends pulumi.CustomResource {
diff --git a/sdk/nodejs/fabric/serviceProfile.ts b/sdk/nodejs/fabric/serviceProfile.ts
index bbf7fa92..a72a5582 100644
--- a/sdk/nodejs/fabric/serviceProfile.ts
+++ b/sdk/nodejs/fabric/serviceProfile.ts
@@ -15,55 +15,41 @@ import * as utilities from "../utilities";
  * * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const profile = new equinix.fabric.ServiceProfile("profile", {
- *     name: "Example Cloud Provider",
- *     description: "50 to 500 Mbps Hosted Connection to Example Cloud",
- *     type: "L2_PROFILE",
+ * const newServiceProfile = new equinix.fabric.ServiceProfile("newServiceProfile", {
+ *     description: "Service Profile for Receiving Connections",
+ *     name: "Name Of Business + Use Case Tag",
+ *     type: equinix.fabric.ProfileType.L2Profile,
+ *     visibility: equinix.fabric.ProfileVisibility.Public,
+ *     notifications: [{
+ *         emails: ["someone@sample.com"],
+ *         type: "BANDWIDTH_ALERT",
+ *     }],
+ *     allowedEmails: [
+ *         "test@equinix.com",
+ *         "testagain@equinix.com",
+ *     ],
+ *     ports: [{
+ *         uuid: "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee",
+ *         type: "XF_PORT",
+ *     }],
  *     accessPointTypeConfigs: [{
- *         type: "COLO",
+ *         type: equinix.fabric.ProfileAccessPointType.Colo,
+ *         allowRemoteConnections: true,
+ *         allowCustomBandwidth: true,
+ *         allowBandwidthAutoApproval: false,
+ *         connectionRedundancyRequired: false,
+ *         connectionLabel: "Service Profile Tag1",
+ *         bandwidthAlertThreshold: 10,
  *         supportedBandwidths: [
- *             50,
  *             100,
- *             200,
  *             500,
  *         ],
- *         allowRemoteConnections: true,
- *         allowCustomBandwidth: false,
- *         allowBandwidthAutoApproval: false,
- *         linkProtocolConfig: {
- *             encapsulationStrategy: "CTAGED",
- *             reuseVlanSTag: false,
- *             encapsulation: "DOT1Q",
- *         },
- *         enableAutoGenerateServiceKey: "false,",
- *         connectionRedundancyRequired: "false,",
- *         apiConfig: {
- *             apiAvailable: true,
- *             integrationId: "Example-Connect-01",
- *             bandwidthFromApi: false,
- *         },
- *         connectionLabel: "Virtual Circuit Name",
- *         authenticationKey: {
- *             required: true,
- *             label: "Example ACCOUNT ID",
- *         },
  *     }],
- *     account: {
- *         organizationName: "Example Cloud",
- *         globalOrganizationName: "Example Global",
- *     },
- *     metros: undefined,
- *     visibility: "PUBLIC",
- *     marketingInfo: {
- *         promotion: true,
- *     },
  * });
- * export const profileId = profile.id;
  * ```
  */
 export class ServiceProfile extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/bgpSession.ts b/sdk/nodejs/metal/bgpSession.ts
index e6c1b9a4..af73fdd5 100644
--- a/sdk/nodejs/metal/bgpSession.ts
+++ b/sdk/nodejs/metal/bgpSession.ts
@@ -12,18 +12,62 @@ import * as utilities from "../utilities";
  * BGP session must be linked to a device running [BIRD](https://bird.network.cz) or other BGP routing daemon which will control route advertisements via the session to Equinix Metal's upstream routers.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
+ * import * as _null from "@pulumi/null";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const deviceId = config.require("deviceId");
- * const bgp = new equinix.metal.BgpSession("bgp", {
- *     deviceId: deviceId,
+ * const bgpPassword = "955dB0b81Ef";
+ * const projectId = "";
+ * const addr = new equinix.metal.ReservedIpBlock("addr", {
+ *     projectId: projectId,
+ *     metro: "ny",
+ *     quantity: 1,
+ * });
+ * const interfaceLo0 = pulumi.interpolate`auto lo:0
+ * iface lo:0 inet static
+ *    address ${addr.address}
+ *    netmask ${addr.netmask}
+ * `;
+ * const test = new equinix.metal.Device("test", {
+ *     hostname: "terraform-test-bgp-sesh",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "ny",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ * });
+ * const birdConf = pulumi.all([addr.address, addr.cidr, test.network, test.network]).apply(([address, cidr, testNetwork, testNetwork1]) => `filter equinix_metal_bgp {
+ *     if net = ${address}/${cidr} then accept;
+ * }
+ * router id ${testNetwork[2].address};
+ * protocol direct {
+ *     interface "lo";
+ * }
+ * protocol kernel {
+ *     scan time 10;
+ *     persist;
+ *     import all;
+ *     export all;
+ * }
+ * protocol device {
+ *     scan time 10;
+ * }
+ * protocol bgp {
+ *     export filter equinix_metal_bgp;
+ *     local as 65000;
+ *     neighbor ${testNetwork1[2].gateway} as 65530;
+ *     password "${bgpPassword}";
+ * }
+ * `);
+ * const testBgpSession = new equinix.metal.BgpSession("testBgpSession", {
+ *     deviceId: test.id,
  *     addressFamily: "ipv4",
  * });
- * export const bgpSessionStatus = bgp.status;
+ * const configureBird = new _null.Resource("configureBird", {triggers: {
+ *     bird_conf: birdConf,
+ *     "interface": interfaceLo0,
+ * }});
  * ```
  */
 export class BgpSession extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/device.ts b/sdk/nodejs/metal/device.ts
index 232d78b3..346868a9 100644
--- a/sdk/nodejs/metal/device.ts
+++ b/sdk/nodejs/metal/device.ts
@@ -13,22 +13,147 @@ import * as utilities from "../utilities";
  * > **NOTE:** All arguments including the `rootPassword` and `userData` will be stored in the raw state as plain-text. Read more about sensitive data in state.
  *
  * ## Example Usage
+ * ### example 1
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const web1 = new equinix.metal.Device("web1", {
+ *     hostname: "tf.coreos2",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "sv",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ * });
+ * ```
+ * ### example 4
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const web = new equinix.metal.Device("web", {
- *     hostname: "webserver1",
- *     plan: "c3.small.x86",
- *     operatingSystem: "ubuntu_20_04",
+ * const web1 = new equinix.metal.Device("web1", {
+ *     hostname: "tftest",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "ny",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ *     hardwareReservationId: "next-available",
+ *     storage: `{
+ *   "disks": [
+ *     {
+ *       "device": "/dev/sda",
+ *       "wipeTable": true,
+ *       "partitions": [
+ *         {
+ *           "label": "BIOS",
+ *           "number": 1,
+ *           "size": "4096"
+ *         },
+ *         {
+ *           "label": "SWAP",
+ *           "number": 2,
+ *           "size": "3993600"
+ *         },
+ *         {
+ *           "label": "ROOT",
+ *           "number": 3,
+ *           "size": "0"
+ *         }
+ *       ]
+ *     }
+ *   ],
+ *   "filesystems": [
+ *     {
+ *       "mount": {
+ *         "device": "/dev/sda3",
+ *         "format": "ext4",
+ *         "point": "/",
+ *         "create": {
+ *           "options": [
+ *             "-L",
+ *             "ROOT"
+ *           ]
+ *         }
+ *       }
+ *     },
+ *     {
+ *       "mount": {
+ *         "device": "/dev/sda2",
+ *         "format": "swap",
+ *         "point": "none",
+ *         "create": {
+ *           "options": [
+ *             "-L",
+ *             "SWAP"
+ *           ]
+ *         }
+ *       }
+ *     }
+ *   ]
+ * }
+ * `,
+ * });
+ * ```
+ * ### example 2
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const pxe1 = new equinix.metal.Device("pxe1", {
+ *     hostname: "tf.coreos2-pxe",
+ *     plan: equinix.metal.Plan.C3SmallX86,
  *     metro: "sv",
- *     billingCycle: "hourly",
+ *     operatingSystem: equinix.metal.OperatingSystem.CustomIPXE,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ *     ipxeScriptUrl: "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe",
+ *     alwaysPxe: false,
+ *     userData: example.rendered,
+ * });
+ * ```
+ * ### example 5
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const pxe1 = new equinix.metal.Device("pxe1", {
+ *     hostname: "tf.coreos2-pxe",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "sv",
+ *     operatingSystem: equinix.metal.OperatingSystem.CustomIPXE,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ *     ipxeScriptUrl: "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe",
+ *     alwaysPxe: false,
+ *     userData: userData,
+ *     customData: customData,
+ *     behavior: {
+ *         allowChanges: [
+ *             "custom_data",
+ *             "user_data",
+ *         ],
+ *     },
+ * });
+ * ```
+ * ### example 3
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const web1 = new equinix.metal.Device("web1", {
+ *     hostname: "tf.coreos2",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "ny",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
  *     projectId: projectId,
+ *     ipAddresses: [{
+ *         type: "private_ipv4",
+ *         cidr: 30,
+ *     }],
  * });
- * export const webPublicIp = pulumi.interpolate`http://${web.accessPublicIpv4}`;
  * ```
  */
 export class Device extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/deviceNetworkType.ts b/sdk/nodejs/metal/deviceNetworkType.ts
index 37c3564d..a7ea2be6 100644
--- a/sdk/nodejs/metal/deviceNetworkType.ts
+++ b/sdk/nodejs/metal/deviceNetworkType.ts
@@ -6,7 +6,6 @@ import * as utilities from "../utilities";
 
 /**
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
diff --git a/sdk/nodejs/metal/gateway.ts b/sdk/nodejs/metal/gateway.ts
index d9ed3d44..76e849f7 100644
--- a/sdk/nodejs/metal/gateway.ts
+++ b/sdk/nodejs/metal/gateway.ts
@@ -13,20 +13,42 @@ import * as utilities from "../utilities";
  * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
  *
  * ## Example Usage
- *
+ * ### example 1
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const vlanId = config.require("vlanId");
- * const gateway = new equinix.metal.Gateway("gateway", {
+ * const test = new equinix.metal.Vlan("test", {
+ *     description: "test VLAN in SV",
+ *     metro: "sv",
+ *     projectId: projectId,
+ * });
+ * const testGateway = new equinix.metal.Gateway("testGateway", {
  *     projectId: projectId,
- *     vlanId: vlanId,
+ *     vlanId: test.id,
  *     privateIpv4SubnetSize: 8,
  * });
- * export const gatewayState = gateway.state;
+ * ```
+ * ### example 2
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const test = new equinix.metal.Vlan("test", {
+ *     description: "test VLAN in SV",
+ *     metro: "sv",
+ *     projectId: projectId,
+ * });
+ * const test1 = new equinix.metal.ReservedIpBlock("test1", {
+ *     projectId: projectId,
+ *     metro: "sv",
+ *     quantity: 8,
+ * });
+ * const testGateway = new equinix.metal.Gateway("testGateway", {
+ *     projectId: projectId,
+ *     vlanId: test.id,
+ *     ipReservationId: testEquinixMetalReservedIpBlock.id,
+ * });
  * ```
  */
 export class Gateway extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/interconnection.ts b/sdk/nodejs/metal/interconnection.ts
index c7453c33..d67a6844 100644
--- a/sdk/nodejs/metal/interconnection.ts
+++ b/sdk/nodejs/metal/interconnection.ts
@@ -13,7 +13,28 @@ import * as utilities from "../utilities";
  * > Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization.
  *
  * ## Example Usage
+ * ### example metal billed token
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const config = new pulumi.Config();
+ * const projectId = config.require("projectId");
+ * const metro = config.get("metro") || "SV";
+ * const speedInMbps = config.getNumber("speedInMbps") || 1000;
+ * const connection = new equinix.metal.Interconnection("connection", {
+ *     name: "metal-to-cloudprovider",
+ *     projectId: projectId,
+ *     type: "shared",
+ *     redundancy: "primary",
+ *     metro: metro,
+ *     speed: `${speedInMbps}Mbps`,
+ *     serviceTokenType: "a_side",
+ * });
+ * export const connectionStatus = connection.status;
+ * export const connectionTokens = connection.serviceTokens;
+ * ```
+ * ### example fabric billed token
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
diff --git a/sdk/nodejs/metal/ipAttachment.ts b/sdk/nodejs/metal/ipAttachment.ts
index e9e1c6fa..f0c9476a 100644
--- a/sdk/nodejs/metal/ipAttachment.ts
+++ b/sdk/nodejs/metal/ipAttachment.ts
@@ -14,20 +14,29 @@ import * as utilities from "../utilities";
  * Device and reserved block must be in the same metro.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
+ * import * as std from "@pulumi/std";
  *
- * const config = new pulumi.Config();
- * const deviceId = config.require("deviceId");
- * const subnetCidr = config.get("subnetCidr") || "147.229.10.152/31";
- * const ipAttachResource = new equinix.metal.IpAttachment("ipAttach", {
- *     deviceId: deviceId,
- *     cidrNotation: subnetCidr,
+ * const myblock = new equinix.metal.ReservedIpBlock("myblock", {
+ *     projectId: projectId,
+ *     metro: "ny",
+ *     quantity: 2,
+ * });
+ * const firstAddressAssignment = new equinix.metal.IpAttachment("firstAddressAssignment", {
+ *     deviceId: mydevice.id,
+ *     cidrNotation: std.joinOutput({
+ *         separator: "/",
+ *         input: [
+ *             std.cidrhostOutput({
+ *                 input: myblockMetalReservedIpBlock.cidrNotation,
+ *                 host: 0,
+ *             }).apply(invoke => invoke.result),
+ *             "32",
+ *         ],
+ *     }).apply(invoke => invoke.result),
  * });
- * export const ipAttach = ipAttachResource.id;
- * export const ipNetmask = ipAttachResource.netmask;
  * ```
  */
 export class IpAttachment extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/organization.ts b/sdk/nodejs/metal/organization.ts
index 5866cdfa..3be72187 100644
--- a/sdk/nodejs/metal/organization.ts
+++ b/sdk/nodejs/metal/organization.ts
@@ -11,22 +11,14 @@ import * as utilities from "../utilities";
  * Provides a resource to manage organization resource in Equinix Metal.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const orgResource = new equinix.metal.Organization("org", {
- *     name: "Foo Organization",
- *     address: {
- *         address: "org street",
- *         city: "london",
- *         country: "GB",
- *         zipCode: "12345",
- *     },
- *     description: "An organization",
+ * const tfOrganization1 = new equinix.metal.Organization("tfOrganization1", {
+ *     name: "foobar",
+ *     description: "quux",
  * });
- * export const org = orgResource.id;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/organizationMember.ts b/sdk/nodejs/metal/organizationMember.ts
index b5bd7cc4..14a10651 100644
--- a/sdk/nodejs/metal/organizationMember.ts
+++ b/sdk/nodejs/metal/organizationMember.ts
@@ -8,23 +8,29 @@ import * as utilities from "../utilities";
  * Manage the membership of existing and new invitees within an Equinix Metal organization and its projects.
  *
  * ## Example Usage
+ * ### example 2
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const owner = new equinix.metal.OrganizationMember("owner", {
+ *     invitee: "admin@example.com",
+ *     roles: ["owner"],
+ *     projectsIds: [],
+ *     organizationId: organizationId,
+ * });
+ * ```
+ * ### example 1
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const organizationId = config.require("organizationId");
- * const projectId = config.require("projectId");
- * const userEmailAddress = config.require("userEmailAddress");
  * const member = new equinix.metal.OrganizationMember("member", {
- *     invitee: userEmailAddress,
+ *     invitee: "member@example.com",
  *     roles: ["limited_collaborator"],
  *     projectsIds: [projectId],
  *     organizationId: organizationId,
  * });
- * export const memberId = member.id;
- * export const memberState = member.state;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/port.ts b/sdk/nodejs/metal/port.ts
index 05ca5d41..1a7e155e 100644
--- a/sdk/nodejs/metal/port.ts
+++ b/sdk/nodejs/metal/port.ts
@@ -4,24 +4,6 @@
 import * as pulumi from "@pulumi/pulumi";
 import * as utilities from "../utilities";
 
-/**
- * ## Example Usage
- *
- * ```typescript
- * import * as pulumi from "@pulumi/pulumi";
- * import * as equinix from "@equinix-labs/pulumi-equinix";
- *
- * const config = new pulumi.Config();
- * const portId = config.require("portId");
- * const org = new equinix.metal.Port("org", {
- *     portId: portId,
- *     bonded: true,
- *     layer2: true,
- * });
- * export const portType = port.type;
- * export const portBondedNetworkType = port.networkType;
- * ```
- */
 export class Port extends pulumi.CustomResource {
     /**
      * Get an existing Port resource's state with the given name, ID, and optional extra
diff --git a/sdk/nodejs/metal/portVlanAttachment.ts b/sdk/nodejs/metal/portVlanAttachment.ts
index bc38ea9e..da07b09b 100644
--- a/sdk/nodejs/metal/portVlanAttachment.ts
+++ b/sdk/nodejs/metal/portVlanAttachment.ts
@@ -25,22 +25,74 @@ import * as utilities from "../utilities";
  * * `portId` - UUID of device port.
  *
  * ## Example Usage
+ * ### example 2
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const test = new equinix.metal.Device("test", {
+ *     hostname: "test",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "ny",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ * });
+ * const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", {
+ *     deviceId: test.id,
+ *     type: "layer2-individual",
+ * });
+ * const test1 = new equinix.metal.Vlan("test1", {
+ *     description: "VLAN in New York",
+ *     metro: "ny",
+ *     projectId: projectId,
+ * });
+ * const test2 = new equinix.metal.Vlan("test2", {
+ *     description: "VLAN in New Jersey",
+ *     metro: "ny",
+ *     projectId: projectId,
+ * });
+ * const test1PortVlanAttachment = new equinix.metal.PortVlanAttachment("test1PortVlanAttachment", {
+ *     deviceId: testDeviceNetworkType.id,
+ *     vlanVnid: test1.vxlan,
+ *     portName: "eth1",
+ * });
+ * const test2PortVlanAttachment = new equinix.metal.PortVlanAttachment("test2PortVlanAttachment", {
+ *     deviceId: testDeviceNetworkType.id,
+ *     vlanVnid: test2.vxlan,
+ *     portName: "eth1",
+ *     native: true,
+ * }, {
+ *     dependsOn: [test1PortVlanAttachment],
+ * });
+ * ```
+ * ### example 1
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const deviceId = config.require("deviceId");
- * const portName = config.get("portName") || "eth1";
- * const vxlanId = config.getNumber("vxlanId") || 1004;
- * const attach = new equinix.metal.PortVlanAttachment("attach", {
- *     deviceId: deviceId,
- *     portName: portName,
- *     vlanVnid: vxlanId,
+ * const test = new equinix.metal.Vlan("test", {
+ *     description: "VLAN in New York",
+ *     metro: "ny",
+ *     projectId: projectId,
+ * });
+ * const testDevice = new equinix.metal.Device("testDevice", {
+ *     hostname: "test",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "ny",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ * });
+ * const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", {
+ *     deviceId: testDevice.id,
+ *     type: "hybrid",
+ * });
+ * const testPortVlanAttachment = new equinix.metal.PortVlanAttachment("testPortVlanAttachment", {
+ *     deviceId: testDeviceNetworkType.id,
+ *     portName: "eth1",
+ *     vlanVnid: test.vxlan,
  * });
- * export const attachId = attach.id;
- * export const portId = attach.portId;
  * ```
  */
 export class PortVlanAttachment extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/project.ts b/sdk/nodejs/metal/project.ts
index 5b78dde4..92e044a8 100644
--- a/sdk/nodejs/metal/project.ts
+++ b/sdk/nodejs/metal/project.ts
@@ -13,19 +13,40 @@ import * as utilities from "../utilities";
  * > **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix.metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects.
  *
  * ## Example Usage
+ * ### example 3
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const existingProject = new equinix.metal.Project("existingProject", {
+ *     name: "The name of the project (if different, will rewrite)",
+ *     bgpConfig: {
+ *         deploymentType: "local",
+ *         md5: "C179c28c41a85b",
+ *         asn: 65000,
+ *     },
+ * });
+ * ```
+ * ### example 2
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const organizationId = config.require("organizationId");
- * const name = config.get("name") || "Default Project";
- * const projectResource = new equinix.metal.Project("project", {
- *     name: name,
- *     organizationId: organizationId,
+ * const tfProject1 = new equinix.metal.Project("tfProject1", {
+ *     name: "tftest",
+ *     bgpConfig: {
+ *         deploymentType: "local",
+ *         md5: "C179c28c41a85b",
+ *         asn: 65000,
+ *     },
  * });
- * export const projectId = projectResource.id;
+ * ```
+ * ### example 1
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const tfProject1 = new equinix.metal.Project("tfProject1", {name: "Terraform Fun"});
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/projectApiKey.ts b/sdk/nodejs/metal/projectApiKey.ts
index a717f9c2..8ae8cdfb 100644
--- a/sdk/nodejs/metal/projectApiKey.ts
+++ b/sdk/nodejs/metal/projectApiKey.ts
@@ -10,20 +10,15 @@ import * as utilities from "../utilities";
  * Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const readOnly = config.getBoolean("readOnly") || false;
- * const apiKey = new equinix.metal.ProjectApiKey("apiKey", {
- *     projectId: projectId,
- *     description: "A project level API Key",
- *     readOnly: readOnly,
+ * const test = new equinix.metal.ProjectApiKey("test", {
+ *     projectId: existingProjectId,
+ *     description: "Read-only key scoped to a projct",
+ *     readOnly: true,
  * });
- * export const apiKeyToken = apiKey.token;
  * ```
  */
 export class ProjectApiKey extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/projectSshKey.ts b/sdk/nodejs/metal/projectSshKey.ts
index 665bf0a0..f4092826 100644
--- a/sdk/nodejs/metal/projectSshKey.ts
+++ b/sdk/nodejs/metal/projectSshKey.ts
@@ -8,20 +8,25 @@ import * as utilities from "../utilities";
  * Provides an Equinix Metal project SSH key resource to manage project-specific SSH keys. Project SSH keys will only be populated onto servers that belong to that project, in contrast to User SSH Keys.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
- * import * as fs from "fs";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const sshKey = new equinix.metal.ProjectSshKey("sshKey", {
+ * const projectId = "";
+ * const test = new equinix.metal.ProjectSshKey("test", {
+ *     name: "test",
+ *     publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2",
+ *     projectId: projectId,
+ * });
+ * const testDevice = new equinix.metal.Device("testDevice", {
+ *     hostname: "test",
+ *     plan: equinix.metal.Plan.C3MediumX86,
+ *     metro: "ny",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectSshKeyIds: [test.id],
  *     projectId: projectId,
- *     name: "johnKent",
- *     publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"),
  * });
- * export const sshKeyId = sshKey.id;
  * ```
  */
 export class ProjectSshKey extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/reservedIpBlock.ts b/sdk/nodejs/metal/reservedIpBlock.ts
index 1358a503..4bc4c284 100644
--- a/sdk/nodejs/metal/reservedIpBlock.ts
+++ b/sdk/nodejs/metal/reservedIpBlock.ts
@@ -21,24 +21,56 @@ import * as utilities from "../utilities";
  * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
  *
  * ## Example Usage
+ * ### example 1
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const twoElasticAddresses = new equinix.metal.ReservedIpBlock("twoElasticAddresses", {
+ *     projectId: projectId,
+ *     metro: "sv",
+ *     quantity: 2,
+ * });
+ * const test1 = new equinix.metal.ReservedIpBlock("test1", {
+ *     projectId: projectId,
+ *     type: equinix.metal.IpBlockType.PublicIPv4,
+ *     metro: "sv",
+ *     quantity: 1,
+ * });
+ * const test = new equinix.metal.ReservedIpBlock("test", {
+ *     projectId: projectId,
+ *     type: equinix.metal.IpBlockType.GlobalIPv4,
+ *     quantity: 1,
+ * });
+ * ```
+ * ### example 2
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const metro = config.get("metro") || "FR";
- * const type = config.get("type") || "public_ipv4";
- * const quantity = config.getNumber("quantity") || 1;
- * const ipBlock = new equinix.metal.ReservedIpBlock("ipBlock", {
+ * const example = new equinix.metal.ReservedIpBlock("example", {
+ *     projectId: projectId,
+ *     metro: "sv",
+ *     quantity: 2,
+ * });
+ * const nodes = new equinix.metal.Device("nodes", {
  *     projectId: projectId,
- *     type: "public_ipv4",
- *     quantity: quantity,
- *     metro: metro,
+ *     metro: "sv",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     hostname: "test",
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     ipAddresses: [
+ *         {
+ *             type: "public_ipv4",
+ *             cidr: 31,
+ *             reservationIds: [example.id],
+ *         },
+ *         {
+ *             type: "private_ipv4",
+ *         },
+ *     ],
  * });
- * export const ipBlockId = ipBlock.id;
- * export const ipBlockSubent = ipBlock.cidrNotation;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/spotMarketRequest.ts b/sdk/nodejs/metal/spotMarketRequest.ts
index 0951d819..25f25304 100644
--- a/sdk/nodejs/metal/spotMarketRequest.ts
+++ b/sdk/nodejs/metal/spotMarketRequest.ts
@@ -11,18 +11,14 @@ import * as utilities from "../utilities";
  * Provides an Equinix Metal Spot Market Request resource to allow you to manage spot market requests on your account. For more detail on Spot Market, see [this article in Equinix Metal documentation](https://metal.equinix.com/developers/docs/deploy/spot-market/).
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const metro = config.get("metro") || "FR";
- * const request = new equinix.metal.SpotMarketRequest("request", {
+ * const req = new equinix.metal.SpotMarketRequest("req", {
  *     projectId: projectId,
- *     metro: metro,
- *     maxBidPrice: 0.75,
+ *     maxBidPrice: 0.03,
+ *     metro: "ny",
  *     devicesMin: 1,
  *     devicesMax: 1,
  *     instanceParameters: {
@@ -32,7 +28,6 @@ import * as utilities from "../utilities";
  *         plan: "c3.small.x86",
  *     },
  * });
- * export const requestId = request.id;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/sshKey.ts b/sdk/nodejs/metal/sshKey.ts
index 4113569e..49451681 100644
--- a/sdk/nodejs/metal/sshKey.ts
+++ b/sdk/nodejs/metal/sshKey.ts
@@ -10,17 +10,27 @@ import * as utilities from "../utilities";
  * The link between User SSH key and device is implicit. If you want to make sure that a key will be copied to a device, you must ensure that the device resource `dependsOn` the key resource.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
- * import * as fs from "fs";
+ * import * as std from "@pulumi/std";
  *
- * const sshKey = new equinix.metal.SshKey("sshKey", {
- *     name: "johnKent",
- *     publicKey: fs.readFileSync("/Users/John/.ssh/metal_rsa.pub"),
+ * const key1 = new equinix.metal.SshKey("key1", {
+ *     name: "terraform-1",
+ *     publicKey: std.fileOutput({
+ *         input: "/home/terraform/.ssh/id_rsa.pub",
+ *     }).apply(invoke => invoke.result),
+ * });
+ * const test = new equinix.metal.Device("test", {
+ *     hostname: "test-device",
+ *     plan: equinix.metal.Plan.C3SmallX86,
+ *     metro: "sv",
+ *     operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
+ *     billingCycle: equinix.metal.BillingCycle.Hourly,
+ *     projectId: projectId,
+ * }, {
+ *     dependsOn: [key1],
  * });
- * export const sshKeyId = sshKey.id;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/userApiKey.ts b/sdk/nodejs/metal/userApiKey.ts
index 885526c7..48560592 100644
--- a/sdk/nodejs/metal/userApiKey.ts
+++ b/sdk/nodejs/metal/userApiKey.ts
@@ -10,19 +10,14 @@ import * as utilities from "../utilities";
  * Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const description = config.get("description") || "An user level API Key";
- * const readOnly = config.getBoolean("readOnly") || false;
- * const apiKey = new equinix.metal.UserApiKey("apiKey", {
- *     description: description,
- *     readOnly: readOnly,
+ * const test = new equinix.metal.UserApiKey("test", {
+ *     description: "Read-only user key",
+ *     readOnly: true,
  * });
- * export const apiKeyToken = apiKey.token;
  * ```
  */
 export class UserApiKey extends pulumi.CustomResource {
diff --git a/sdk/nodejs/metal/virtualCircuit.ts b/sdk/nodejs/metal/virtualCircuit.ts
index 7b7631ee..4f0859e7 100644
--- a/sdk/nodejs/metal/virtualCircuit.ts
+++ b/sdk/nodejs/metal/virtualCircuit.ts
@@ -10,27 +10,26 @@ import * as utilities from "../utilities";
  * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const connectionId = config.require("connectionId");
- * const vlanId = config.require("vlanId");
- * const portId = equinix.metal.getInterconnection({
- *     connectionId: connectionId,
- * }).then(invoke => invoke.ports?.[0]?.id);
- * const vc = new equinix.metal.VirtualCircuit("vc", {
- *     connectionId: connectionId,
+ * const projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";
+ * const connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";
+ * const test = equinix.metal.getInterconnectionOutput({
+ *     connectionId: connId,
+ * });
+ * const testVlan = new equinix.metal.Vlan("testVlan", {
+ *     projectId: projectId,
+ *     metro: test.apply(test => test.metro),
+ * });
+ * const testVirtualCircuit = new equinix.metal.VirtualCircuit("testVirtualCircuit", {
+ *     connectionId: connId,
  *     projectId: projectId,
- *     portId: portId,
- *     vlanId: vlanId,
+ *     portId: test.apply(test => test.ports?.[0]?.id),
+ *     vlanId: testVlan.id,
  *     nniVlan: 1056,
  * });
- * export const vcStatus = vc.status;
- * export const vcVnid = vc.vnid;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/vlan.ts b/sdk/nodejs/metal/vlan.ts
index ec28df0a..12431832 100644
--- a/sdk/nodejs/metal/vlan.ts
+++ b/sdk/nodejs/metal/vlan.ts
@@ -16,22 +16,16 @@ import * as utilities from "../utilities";
  * * https://metal.equinix.com/developers/docs/networking/layer2-configs/
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const metro = config.get("metro") || "DA";
- * const vxlan = config.requireNumber("vxlan");
- * const vlan = new equinix.metal.Vlan("vlan", {
- *     description: "VLAN in Dallas",
+ * const vlan1 = new equinix.metal.Vlan("vlan1", {
+ *     description: "VLAN in New Jersey",
+ *     metro: "sv",
  *     projectId: projectId,
- *     metro: metro,
- *     vxlan: vxlan,
+ *     vxlan: 1040,
  * });
- * export const vlanId = vlan.id;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/metal/vrf.ts b/sdk/nodejs/metal/vrf.ts
index 1c8acac9..3c0bf5f6 100644
--- a/sdk/nodejs/metal/vrf.ts
+++ b/sdk/nodejs/metal/vrf.ts
@@ -10,26 +10,67 @@ import * as utilities from "../utilities";
  * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
  *
  * ## Example Usage
+ * ### example 2
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
+ * const example = new equinix.metal.ReservedIpBlock("example", {
+ *     description: "Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.",
+ *     projectId: exampleEquinixMetalProject.id,
+ *     metro: exampleEquinixMetalVrf.metro,
+ *     type: "vrf",
+ *     vrfId: exampleEquinixMetalVrf.id,
+ *     cidr: 29,
+ *     network: "192.168.100.0",
+ * });
+ * const exampleVlan = new equinix.metal.Vlan("exampleVlan", {
+ *     description: "A VLAN for Layer2 and Hybrid Metal devices",
+ *     metro: exampleEquinixMetalVrf.metro,
+ *     projectId: exampleEquinixMetalProject.id,
+ * });
+ * const exampleGateway = new equinix.metal.Gateway("exampleGateway", {
+ *     projectId: exampleEquinixMetalProject.id,
+ *     vlanId: exampleVlan.id,
+ *     ipReservationId: example.id,
+ * });
+ * ```
+ * ### example 1
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const projectId = config.require("projectId");
- * const metro = config.get("metro") || "DA";
- * const vrf = new equinix.metal.Vrf("vrf", {
- *     description: "VRF with ASN 65000 and a pool of address space",
+ * const example = new equinix.metal.Project("example", {name: "example"});
+ * const exampleVrf = new equinix.metal.Vrf("exampleVrf", {
+ *     description: "VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25",
  *     name: "example-vrf",
- *     metro: metro,
+ *     metro: "da",
  *     localAsn: 65000,
  *     ipRanges: [
  *         "192.168.100.0/25",
  *         "192.168.200.0/25",
  *     ],
- *     projectId: projectId,
+ *     projectId: example.id,
+ * });
+ * ```
+ * ### example 3
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const exampleVirtualCircuit = new equinix.metal.VirtualCircuit("exampleVirtualCircuit", {
+ *     name: "example-vc",
+ *     description: "Virtual Circuit",
+ *     connectionId: example.id,
+ *     projectId: exampleEquinixMetalProject.id,
+ *     portId: example.ports[0].id,
+ *     nniVlan: 1024,
+ *     vrfId: exampleEquinixMetalVrf.id,
+ *     peerAsn: 65530,
+ *     subnet: "192.168.100.16/31",
+ *     metalIp: "192.168.100.16",
+ *     customerIp: "192.168.100.17",
  * });
- * export const vrfId = vrf.id;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/networkedge/aclTemplate.ts b/sdk/nodejs/networkedge/aclTemplate.ts
index 5e3d0cb9..ffa762c0 100644
--- a/sdk/nodejs/networkedge/aclTemplate.ts
+++ b/sdk/nodejs/networkedge/aclTemplate.ts
@@ -13,32 +13,30 @@ import * as utilities from "../utilities";
  * Device ACL templates give possibility to define set of rules will allowed inbound traffic. Templates can be assigned to the network devices.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const aclTemplate = new equinix.networkedge.AclTemplate("aclTemplate", {
+ * const myacl = new equinix.networkedge.AclTemplate("myacl", {
  *     name: "test",
  *     description: "Test ACL template",
+ *     projectId: "a86d7112-d740-4758-9c9c-31e66373746b",
  *     inboundRules: [
  *         {
  *             subnet: "1.1.1.1/32",
- *             protocol: "IP",
+ *             protocol: equinix.networkedge.AclRuleProtocolType.IP,
  *             srcPort: "any",
  *             dstPort: "any",
  *             description: "inbound rule description",
  *         },
  *         {
- *             subnet: "2.2.2.2/28",
- *             protocol: "TCP",
+ *             subnet: "172.16.25.0/24",
+ *             protocol: equinix.networkedge.AclRuleProtocolType.UDP,
  *             srcPort: "any",
- *             dstPort: "any",
- *             description: "inbound rule description",
+ *             dstPort: "53,1045,2041",
  *         },
  *     ],
  * });
- * export const templateId = aclTemplate.id;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/networkedge/bgp.ts b/sdk/nodejs/networkedge/bgp.ts
index de162dba..5b27929c 100644
--- a/sdk/nodejs/networkedge/bgp.ts
+++ b/sdk/nodejs/networkedge/bgp.ts
@@ -8,12 +8,11 @@ import * as utilities from "../utilities";
  * Resource `equinix.networkedge.Bgp` allows creation and management of Equinix Network Edge BGP peering configurations.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const bgp = new equinix.networkedge.Bgp("bgp", {
+ * const test = new equinix.networkedge.Bgp("test", {
  *     connectionId: "54014acf-9730-4b55-a791-459283d05fb1",
  *     localIpAddress: "10.1.1.1/30",
  *     localAsn: 12345,
@@ -21,8 +20,6 @@ import * as utilities from "../utilities";
  *     remoteAsn: 66123,
  *     authenticationKey: "secret",
  * });
- * export const state = bgp.state;
- * export const provisioningStatus = bgp.provisioningStatus;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/networkedge/device.ts b/sdk/nodejs/networkedge/device.ts
index e854e203..e91033d7 100644
--- a/sdk/nodejs/networkedge/device.ts
+++ b/sdk/nodejs/networkedge/device.ts
@@ -21,52 +21,350 @@ import * as utilities from "../utilities";
  * * **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices.
  *
  * ## Example Usage
+ * ### example 8
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ * import * as std from "@pulumi/std";
  *
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     name: "account-name",
+ *     metroCode: "SV",
+ * });
+ * const bluecatEdgeServicePointCloudinitPrimaryFile = new equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile", {
+ *     fileName: "TF-BLUECAT-ESP-cloud-init-file.txt",
+ *     content: std.fileOutput({
+ *         input: filepath,
+ *     }).apply(invoke => invoke.result),
+ *     metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]),
+ *     deviceTypeCode: "BLUECAT-EDGE-SERVICE-POINT",
+ *     processType: equinix.networkedge.FileType.CloudInit,
+ *     selfManaged: true,
+ *     byol: true,
+ * });
+ * const bluecatEdgeServicePointCloudinitSecondaryFile = new equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile", {
+ *     fileName: "TF-BLUECAT-ESP-cloud-init-file.txt",
+ *     content: std.fileOutput({
+ *         input: filepath,
+ *     }).apply(invoke => invoke.result),
+ *     metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]),
+ *     deviceTypeCode: "BLUECAT-EDGE-SERVICE-POINT",
+ *     processType: equinix.networkedge.FileType.CloudInit,
+ *     selfManaged: true,
+ *     byol: true,
+ * });
+ * const bluecatEdgeServicePointHa = new equinix.networkedge.Device("bluecatEdgeServicePointHa", {
+ *     name: "tf-bluecat-edge-service-point-p",
+ *     metroCode: sv.apply(sv => sv.metroCode),
+ *     typeCode: "BLUECAT-EDGE-SERVICE-POINT",
+ *     selfManaged: true,
+ *     connectivity: "PRIVATE",
+ *     byol: true,
+ *     packageCode: "STD",
+ *     notifications: ["test@equinix.com"],
+ *     accountNumber: sv.apply(sv => sv.number),
+ *     cloudInitFileId: bluecatEdgeServicePointCloudinitPrimaryFile.uuid,
+ *     version: "4.6.3",
+ *     coreCount: 4,
+ *     termLength: 12,
+ *     secondaryDevice: {
+ *         name: "tf-bluecat-edge-service-point-s",
+ *         metroCode: sv.apply(sv => sv.metroCode),
+ *         notifications: ["test@eq.com"],
+ *         accountNumber: sv.apply(sv => sv.number),
+ *         cloudInitFileId: bluecatEdgeServicePointCloudinitSecondaryFile.uuid,
+ *     },
+ * });
+ * ```
+ * ### example 1
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const accountName = config.require("accountName");
- * const licenseToken = config.require("licenseToken");
- * const sshUserName = config.require("sshUserName");
- * const sshKeyName = config.require("sshKeyName");
- * const aclTemplateId = config.require("aclTemplateId");
- * const metro = config.get("metro") || "SV";
- * const devicePackageCode = config.get("devicePackageCode") || "network-essentials";
- * const deviceVersion = config.get("deviceVersion") || "17.06.01a";
- * const sizeInCores = config.getNumber("sizeInCores") || 2;
- * const termLength = config.getNumber("termLength") || 6;
- * const additionalBandwidth = config.getNumber("additionalBandwidth") || 5;
- * const accountNum = equinix.networkedge.getAccount({
- *     name: accountName,
- *     metroCode: metro,
- * }).then(invoke => invoke.number);
- * const c8KRouter = new equinix.networkedge.Device("c8kRouter", {
- *     name: "catalystRouter",
- *     metroCode: metro,
+ * const dc = equinix.networkedge.getAccountOutput({
+ *     metroCode: "DC",
+ * });
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     metroCode: "SV",
+ * });
+ * const csr1000VHa = new equinix.networkedge.Device("csr1000vHa", {
+ *     name: "tf-csr1000v-p",
+ *     throughput: 500,
+ *     throughputUnit: equinix.networkedge.ThroughputUnit.Mbps,
+ *     metroCode: dc.apply(dc => dc.metroCode),
+ *     typeCode: "CSR1000V",
+ *     selfManaged: false,
+ *     connectivity: "INTERNET-ACCESS",
+ *     byol: false,
+ *     packageCode: "SEC",
+ *     notifications: [
+ *         "john@equinix.com",
+ *         "marry@equinix.com",
+ *         "fred@equinix.com",
+ *     ],
+ *     hostname: "csr1000v-p",
+ *     termLength: 12,
+ *     accountNumber: dc.apply(dc => dc.number),
+ *     version: "16.09.05",
+ *     coreCount: 2,
+ *     secondaryDevice: {
+ *         name: "tf-csr1000v-s",
+ *         metroCode: sv.apply(sv => sv.metroCode),
+ *         hostname: "csr1000v-s",
+ *         notifications: [
+ *             "john@equinix.com",
+ *             "marry@equinix.com",
+ *         ],
+ *         accountNumber: sv.apply(sv => sv.number),
+ *     },
+ * });
+ * ```
+ * ### example 4
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     name: "account-name",
+ *     metroCode: "SV",
+ * });
+ * const c8KvSingle = new equinix.networkedge.Device("c8kvSingle", {
+ *     name: "tf-c8kv",
+ *     metroCode: sv.apply(sv => sv.metroCode),
  *     typeCode: "C8000V",
  *     selfManaged: true,
  *     byol: true,
- *     packageCode: devicePackageCode,
- *     notifications: ["example@equinix.com"],
+ *     packageCode: "network-essentials",
+ *     notifications: ["test@equinix.com"],
  *     hostname: "C8KV",
- *     accountNumber: accountNum,
- *     version: deviceVersion,
- *     coreCount: sizeInCores,
- *     termLength: termLength,
- *     licenseToken: licenseToken,
- *     additionalBandwidth: additionalBandwidth,
+ *     accountNumber: sv.apply(sv => sv.number),
+ *     version: "17.06.01a",
+ *     coreCount: 2,
+ *     termLength: 12,
+ *     licenseToken: "valid-license-token",
+ *     additionalBandwidth: 5,
+ *     sshKey: {
+ *         username: "test-username",
+ *         keyName: "valid-key-name",
+ *     },
+ *     aclTemplateId: "3e548c02-9164-4197-aa23-05b1f644883c",
+ * });
+ * ```
+ * ### example 7
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     name: "account-name",
+ *     metroCode: "SV",
+ * });
+ * const testPublicKey = new equinix.networkedge.SshKey("testPublicKey", {
+ *     name: "key-name",
+ *     publicKey: "ssh-dss key-value",
+ *     type: "DSA",
+ * });
+ * const bluecatBddsHa = new equinix.networkedge.Device("bluecatBddsHa", {
+ *     name: "tf-bluecat-bdds-p",
+ *     metroCode: sv.apply(sv => sv.metroCode),
+ *     typeCode: "BLUECAT",
+ *     selfManaged: true,
+ *     connectivity: "PRIVATE",
+ *     byol: true,
+ *     packageCode: "STD",
+ *     notifications: ["test@equinix.com"],
+ *     accountNumber: sv.apply(sv => sv.number),
+ *     version: "9.6.0",
+ *     coreCount: 2,
+ *     termLength: 12,
+ *     vendorConfiguration: {
+ *         hostname: "test",
+ *         privateAddress: "x.x.x.x",
+ *         privateCidrMask: "24",
+ *         privateGateway: "x.x.x.x",
+ *         licenseKey: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx",
+ *         licenseId: "xxxxxxxxxxxxxxx",
+ *     },
  *     sshKey: {
- *         username: sshUserName,
- *         keyName: sshKeyName,
+ *         username: "test-username",
+ *         keyName: testPublicKey.name,
+ *     },
+ *     secondaryDevice: {
+ *         name: "tf-bluecat-bdds-s",
+ *         metroCode: sv.apply(sv => sv.metroCode),
+ *         notifications: ["test@eq.com"],
+ *         accountNumber: sv.apply(sv => sv.number),
+ *         vendorConfiguration: {
+ *             hostname: "test",
+ *             privateAddress: "x.x.x.x",
+ *             privateCidrMask: "24",
+ *             privateGateway: "x.x.x.x",
+ *             licenseKey: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx",
+ *             licenseId: "xxxxxxxxxxxxxxx",
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 2
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     metroCode: "SV",
+ * });
+ * const panwCluster = new equinix.networkedge.Device("panwCluster", {
+ *     name: "tf-panw",
+ *     metroCode: sv.apply(sv => sv.metroCode),
+ *     typeCode: "PA-VM",
+ *     selfManaged: true,
+ *     byol: true,
+ *     packageCode: "VM100",
+ *     notifications: [
+ *         "john@equinix.com",
+ *         "marry@equinix.com",
+ *         "fred@equinix.com",
+ *     ],
+ *     termLength: 12,
+ *     accountNumber: sv.apply(sv => sv.number),
+ *     version: "10.1.3",
+ *     interfaceCount: 10,
+ *     coreCount: 2,
+ *     sshKey: {
+ *         username: "test",
+ *         keyName: "test-key",
+ *     },
+ *     aclTemplateId: "0bff6e05-f0e7-44cd-804a-25b92b835f8b",
+ *     clusterDetails: {
+ *         clusterName: "tf-panw-cluster",
+ *         node0: {
+ *             vendorConfiguration: {
+ *                 hostname: "panw-node0",
+ *             },
+ *             licenseToken: "licenseToken",
+ *         },
+ *         node1: {
+ *             vendorConfiguration: {
+ *                 hostname: "panw-node1",
+ *             },
+ *             licenseToken: "licenseToken",
+ *         },
+ *     },
+ * });
+ * ```
+ * ### example 5
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     name: "account-name",
+ *     metroCode: "SV",
+ * });
+ * const vsrxSingle = new equinix.networkedge.Device("vsrxSingle", {
+ *     name: "tf-c8kv-sdwan",
+ *     metroCode: sv.apply(sv => sv.metroCode),
+ *     typeCode: "VSRX",
+ *     selfManaged: true,
+ *     byol: true,
+ *     packageCode: "STD",
+ *     notifications: ["test@equinix.com"],
+ *     hostname: "VSRX",
+ *     accountNumber: sv.apply(sv => sv.number),
+ *     version: "23.2R1.13",
+ *     coreCount: 2,
+ *     termLength: 12,
+ *     additionalBandwidth: 5,
+ *     projectId: "a86d7112-d740-4758-9c9c-31e66373746b",
+ *     diverseDeviceId: "ed7891bd-15b4-4f72-ac56-d96cfdacddcc",
+ *     sshKey: {
+ *         username: "test-username",
+ *         keyName: "valid-key-name",
+ *     },
+ *     aclTemplateId: "3e548c02-9164-4197-aa23-05b1f644883c",
+ * });
+ * ```
+ * ### example 3
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ * import * as std from "@pulumi/std";
+ *
+ * const config = new pulumi.Config();
+ * const filepath = config.get("filepath") || "cloudInitFileFolder/TF-AVX-cloud-init-file.txt";
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     metroCode: "SV",
+ * });
+ * const aviatrixCloudinitFile = new equinix.networkedge.NetworkFile("aviatrixCloudinitFile", {
+ *     fileName: "TF-AVX-cloud-init-file.txt",
+ *     content: std.fileOutput({
+ *         input: filepath,
+ *     }).apply(invoke => invoke.result),
+ *     metroCode: sv.apply(sv => sv.metroCode).apply((x) => equinix.index.Metro[x]),
+ *     deviceTypeCode: "AVIATRIX_EDGE",
+ *     processType: equinix.networkedge.FileType.CloudInit,
+ *     selfManaged: true,
+ *     byol: true,
+ * });
+ * const aviatrixSingle = new equinix.networkedge.Device("aviatrixSingle", {
+ *     name: "tf-aviatrix",
+ *     metroCode: sv.apply(sv => sv.metroCode),
+ *     typeCode: "AVIATRIX_EDGE",
+ *     selfManaged: true,
+ *     byol: true,
+ *     packageCode: "STD",
+ *     notifications: ["john@equinix.com"],
+ *     termLength: 12,
+ *     accountNumber: sv.apply(sv => sv.number),
+ *     version: "6.9",
+ *     coreCount: 2,
+ *     cloudInitFileId: aviatrixCloudinitFile.uuid,
+ *     aclTemplateId: "c06150ea-b604-4ad1-832a-d63936e9b938",
+ * });
+ * ```
+ * ### example 6
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as equinix from "@equinix-labs/pulumi-equinix";
+ *
+ * const sv = equinix.networkedge.getAccountOutput({
+ *     name: "account-name",
+ *     metroCode: "SV",
+ * });
+ * const testPublicKey = new equinix.networkedge.SshKey("testPublicKey", {
+ *     name: "key-name",
+ *     publicKey: "ssh-dss key-value",
+ *     type: "DSA",
+ * });
+ * const aristaHa = new equinix.networkedge.Device("aristaHa", {
+ *     name: "tf-arista-p",
+ *     metroCode: sv.apply(sv => sv.metroCode),
+ *     typeCode: "ARISTA-ROUTER",
+ *     selfManaged: true,
+ *     connectivity: "PRIVATE",
+ *     byol: true,
+ *     packageCode: "CloudEOS",
+ *     notifications: ["test@equinix.com"],
+ *     hostname: "arista-p",
+ *     accountNumber: sv.apply(sv => sv.number),
+ *     version: "4.29.0",
+ *     coreCount: 4,
+ *     termLength: 12,
+ *     additionalBandwidth: 5,
+ *     sshKey: {
+ *         username: "test-username",
+ *         keyName: testPublicKey.name,
+ *     },
+ *     aclTemplateId: "c637a17b-7a6a-4486-924b-30e6c36904b0",
+ *     secondaryDevice: {
+ *         name: "tf-arista-s",
+ *         metroCode: sv.apply(sv => sv.metroCode),
+ *         hostname: "arista-s",
+ *         notifications: ["test@eq.com"],
+ *         accountNumber: sv.apply(sv => sv.number),
+ *         aclTemplateId: "fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138",
  *     },
- *     aclTemplateId: aclTemplateId,
  * });
- * export const routerId = c8KRouter.id;
- * export const provisionStatus = c8KRouter.status;
- * export const licenseStatus = c8KRouter.licenseStatus;
- * export const sshIpAddress = c8KRouter.sshIpAddress;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/networkedge/deviceLink.ts b/sdk/nodejs/networkedge/deviceLink.ts
index a248ecb8..95c34de4 100644
--- a/sdk/nodejs/networkedge/deviceLink.ts
+++ b/sdk/nodejs/networkedge/deviceLink.ts
@@ -11,51 +11,34 @@ import * as utilities from "../utilities";
  * Resource `equinix.networkedge.DeviceLink` allows creation and management of Equinix Network Edge virtual network device links.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const accountName = config.require("accountName");
- * const accountMetro = config.require("accountMetro");
- * const device1Id = config.require("device1Id");
- * const device2Id = config.require("device2Id");
- * const accountfNum = equinix.networkedge.getAccount({
- *     name: accountName,
- *     metroCode: accountMetro,
- * }).then(invoke => invoke.number);
- * const device1Metro = equinix.networkedge.getDevice({
- *     uuid: device1Id,
- * }).then(invoke => invoke.metroCode);
- * const device2Metro = equinix.networkedge.getDevice({
- *     uuid: device2Id,
- * }).then(invoke => invoke.metroCode);
- * const deviceLink = new equinix.networkedge.DeviceLink("deviceLink", {
+ * const test = new equinix.networkedge.DeviceLink("test", {
  *     name: "test-link",
  *     subnet: "192.168.40.64/27",
+ *     projectId: "a86d7112-d740-4758-9c9c-31e66373746b",
  *     devices: [
  *         {
- *             id: "device1Id",
+ *             id: testEquinixNetworkDevice.uuid,
  *             asn: 22111,
  *             interfaceId: 6,
  *         },
  *         {
- *             id: "device2Id",
+ *             id: testEquinixNetworkDevice.secondaryDevice[0].uuid,
  *             asn: 22333,
  *             interfaceId: 7,
  *         },
  *     ],
  *     links: [{
- *         accountNumber: accountfNum,
- *         srcMetroCode: device1Metro,
- *         dstMetroCode: device2Metro,
+ *         accountNumber: testEquinixNetworkDevice.accountNumber,
+ *         srcMetroCode: testEquinixNetworkDevice.metroCode,
+ *         dstMetroCode: testEquinixNetworkDevice.secondaryDevice[0].metroCode,
  *         throughput: "50",
  *         throughputUnit: "Mbps",
  *     }],
  * });
- * export const status = deviceLink.status;
- * export const devices = deviceLink.devices;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/networkedge/networkFile.ts b/sdk/nodejs/networkedge/networkFile.ts
index ed46788b..d05070c6 100644
--- a/sdk/nodejs/networkedge/networkFile.ts
+++ b/sdk/nodejs/networkedge/networkFile.ts
@@ -11,25 +11,24 @@ import * as utilities from "../utilities";
  * Resource `equinix.networkedge.NetworkFile` allows creation and management of Equinix Network Edge files.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
- * import * as fs from "fs";
+ * import * as std from "@pulumi/std";
  *
  * const config = new pulumi.Config();
- * const metro = config.get("metro") || "SV";
- * const networkFile = new equinix.networkedge.NetworkFile("networkFile", {
- *     fileName: "Aviatrix-ZTP-file",
- *     content: fs.readFileSync("./../assets/aviatrix-cloud-init.txt"),
- *     metroCode: metro,
+ * const filepath = config.get("filepath") || "fileFolder/fileName.txt";
+ * const testFile = new equinix.networkedge.NetworkFile("test-file", {
+ *     fileName: "fileName.txt",
+ *     content: std.fileOutput({
+ *         input: filepath,
+ *     }).apply(invoke => invoke.result),
+ *     metroCode: equinix.index.Metro.SiliconValley,
  *     deviceTypeCode: "AVIATRIX_EDGE",
- *     processType: "CLOUD_INIT",
+ *     processType: equinix.networkedge.FileType.CloudInit,
  *     selfManaged: true,
  *     byol: true,
  * });
- * export const networkFileId = networkFile.id;
- * export const networkFileStatus = networkFile.status;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/networkedge/sshKey.ts b/sdk/nodejs/networkedge/sshKey.ts
index 99d76717..72cb297f 100644
--- a/sdk/nodejs/networkedge/sshKey.ts
+++ b/sdk/nodejs/networkedge/sshKey.ts
@@ -8,17 +8,26 @@ import * as utilities from "../utilities";
  * Resource `equinix.networkedge.SshKey` allows creation and management of Equinix Network Edge SSH keys.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
- * import * as fs from "fs";
  *
- * const sshKey = new equinix.networkedge.SshKey("sshKey", {
+ * const john = new equinix.networkedge.SshKey("john", {
  *     name: "johnKent",
- *     publicKey: fs.readFileSync("/Users/John/.ssh/ne_rsa.pub"),
+ *     publicKey: `  ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX
+ *   2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu
+ *   iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS
+ *   qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl
+ *   mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N
+ *   w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM
+ *   8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5
+ *   SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW
+ *   WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F
+ *   jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com
+ * `,
+ *     type: "RSA",
+ *     projectId: "a86d7112-d740-4758-9c9c-31e66373746b",
  * });
- * export const sshKeyId = sshKey.id;
  * ```
  *
  * ## Import
diff --git a/sdk/nodejs/networkedge/sshUser.ts b/sdk/nodejs/networkedge/sshUser.ts
index a122098d..a5cc4c90 100644
--- a/sdk/nodejs/networkedge/sshUser.ts
+++ b/sdk/nodejs/networkedge/sshUser.ts
@@ -8,22 +8,18 @@ import * as utilities from "../utilities";
  * Resource `equinix.networkedge.SshUser` allows creation and management of Equinix Network Edge SSH users.
  *
  * ## Example Usage
- *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as equinix from "@equinix-labs/pulumi-equinix";
  *
- * const config = new pulumi.Config();
- * const device1Id = config.require("device1Id");
- * const device2Id = config.require("device2Id");
- * const sshUser = new equinix.networkedge.SshUser("sshUser", {
- *     username: "johnKent",
+ * const john = new equinix.networkedge.SshUser("john", {
+ *     username: "john",
+ *     password: "secret",
  *     deviceIds: [
- *         device1Id,
- *         device2Id,
+ *         "csr1000v-ha-uuid",
+ *         "csr1000v-ha-redundant-uuid",
  *     ],
  * });
- * export const sshUserId = sshUser.id;
  * ```
  *
  * ## Import
diff --git a/sdk/python/pulumi_equinix/fabric/cloud_router.py b/sdk/python/pulumi_equinix/fabric/cloud_router.py
index 7c0e8ae4..ce31cdf8 100644
--- a/sdk/python/pulumi_equinix/fabric/cloud_router.py
+++ b/sdk/python/pulumi_equinix/fabric/cloud_router.py
@@ -532,31 +532,31 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        account_num = config.require_int("accountNum")
-        router = equinix.fabric.CloudRouter("router",
-            name="My-Fabric-Cloud-Router",
+        new_cloud_router = equinix.fabric.CloudRouter("newCloudRouter",
+            name="Router-SV",
             type="XF_ROUTER",
+            notifications=[equinix.fabric.CloudRouterNotificationArgs(
+                type="ALL",
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            order=equinix.fabric.CloudRouterOrderArgs(
+                purchase_order_number="1-323292",
+            ),
             location=equinix.fabric.CloudRouterLocationArgs(
-                metro_code=metro,
+                metro_code="SV",
             ),
             package=equinix.fabric.CloudRouterPackageArgs(
-                code="BASIC",
+                code="STANDARD",
             ),
-            notifications=[equinix.fabric.CloudRouterNotificationArgs(
-                type="ALL",
-                emails=["example@equinix.com"],
-            )],
-            account=equinix.fabric.CloudRouterAccountArgs(
-                account_number=272010,
-            ))
             project=equinix.fabric.CloudRouterProjectArgs(
-                project_id=995072000433550,
+                project_id="776847000642406",
+            ),
+            account=equinix.fabric.CloudRouterAccountArgs(
+                account_number=203612,
             ))
-        pulumi.export("routerId", router.id)
         ```
 
         :param str resource_name: The name of the resource.
@@ -591,31 +591,31 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        account_num = config.require_int("accountNum")
-        router = equinix.fabric.CloudRouter("router",
-            name="My-Fabric-Cloud-Router",
+        new_cloud_router = equinix.fabric.CloudRouter("newCloudRouter",
+            name="Router-SV",
             type="XF_ROUTER",
+            notifications=[equinix.fabric.CloudRouterNotificationArgs(
+                type="ALL",
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            order=equinix.fabric.CloudRouterOrderArgs(
+                purchase_order_number="1-323292",
+            ),
             location=equinix.fabric.CloudRouterLocationArgs(
-                metro_code=metro,
+                metro_code="SV",
             ),
             package=equinix.fabric.CloudRouterPackageArgs(
-                code="BASIC",
+                code="STANDARD",
             ),
-            notifications=[equinix.fabric.CloudRouterNotificationArgs(
-                type="ALL",
-                emails=["example@equinix.com"],
-            )],
-            account=equinix.fabric.CloudRouterAccountArgs(
-                account_number=272010,
-            ))
             project=equinix.fabric.CloudRouterProjectArgs(
-                project_id=995072000433550,
+                project_id="776847000642406",
+            ),
+            account=equinix.fabric.CloudRouterAccountArgs(
+                account_number=203612,
             ))
-        pulumi.export("routerId", router.id)
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/fabric/connection.py b/sdk/python/pulumi_equinix/fabric/connection.py
index ac8ab091..4aa1c25d 100644
--- a/sdk/python/pulumi_equinix/fabric/connection.py
+++ b/sdk/python/pulumi_equinix/fabric/connection.py
@@ -525,160 +525,1416 @@ def __init__(__self__,
                  __props__=None):
         """
         ## Example Usage
+        ### example 9
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        speed_in_mbps = config.get_int("speedInMbps")
-        if speed_in_mbps is None:
-            speed_in_mbps = 50
-        fabric_port_name = config.require("fabricPortName")
-        aws_region = config.get("awsRegion")
-        if aws_region is None:
-            aws_region = "eu-central-1"
-        aws_account_id = config.require("awsAccountId")
-        service_profile_id = equinix.fabric.get_service_profiles(filter=equinix.fabric.GetServiceProfilesFilterArgs(
-            property="/name",
-            operator="=",
-            values=["AWS Direct Connect"],
-        )).data[0].uuid
-        port_id = equinix.fabric.get_ports(filter=equinix.fabric.GetPortsFilterArgs(
-            name=fabric_port_name,
-        )).data[0].uuid
-        colo2_aws = equinix.fabric.Connection("colo2Aws",
-            name="Pulumi-colo2Aws",
-            type="EVPL_VC",
-            notifications=[equinix.fabric.ConnectionNotificationArgs(
-                type="ALL",
-                emails=["example@equinix.com"],
-            )],
-            bandwidth=speed_in_mbps,
+        fcr2_azure = equinix.fabric.Connection("fcr2azure",
+            name="ConnectionName",
+            type="IP_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type="CLOUD_ROUTER",
+                    router=equinix.fabric.ConnectionASideAccessPointRouterArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 5
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_port = equinix.fabric.Connection("vd2port",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="NETWORK",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,
+                        vlan_s_tag=3711,
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 12
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        fcr2_network = equinix.fabric.Connection("fcr2network",
+            name="ConnectionName",
+            type="IPWAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type="CLOUD_ROUTER",
+                    router=equinix.fabric.ConnectionASideAccessPointRouterArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 11
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_azure_primary = equinix.fabric.Connection("vd2azurePrimary",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            redundancy=equinix.fabric.ConnectionRedundancyArgs(
+                priority="PRIMARY",
+            ),
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        vd2_azure_secondary = equinix.fabric.Connection("vd2azureSecondary",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            redundancy=equinix.fabric.ConnectionRedundancyArgs(
+                priority="SECONDARY",
+                group=vd2_azure_primary.redundancy.group,
+            ),
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=5,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 6
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_token = equinix.fabric.Connection("vd2token",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="NETWORK",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                service_token=equinix.fabric.ConnectionZSideServiceTokenArgs(
+                    uuid="",
+                ),
+            ))
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        epl = equinix.fabric.Connection("epl",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 14
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        epl = equinix.fabric.Connection("epl",
+            name="ConnectionName",
+            type="EPLAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 4
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        access_epl_vc = equinix.fabric.Connection("accessEplVc",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.ACCESS_EPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=1976,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 13
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_token = equinix.fabric.Connection("vd2token",
+            name="ConnectionName",
+            type="EVPLAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        port2_port = equinix.fabric.Connection("port2port",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=1976,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=3711,
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 8
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        fcr2_port = equinix.fabric.Connection("fcr2port",
+            name="ConnectionName",
+            type="IP_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type="CLOUD_ROUTER",
+                    router=equinix.fabric.ConnectionASideAccessPointRouterArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,
+                        vlan_tag=2711,
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        port2_aws = equinix.fabric.Connection("port2aws",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            redundancy=equinix.fabric.ConnectionRedundancyArgs(
+                priority="PRIMARY",
+            ),
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323929",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=2019,
+                        vlan_c_tag=2112,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    seller_region="us-west-1",
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ),
+            additional_info=[
+                {
+                    "key": "accessKey",
+                    "value": "",
+                },
+                {
+                    "key": "secretKey",
+                    "value": "",
+                },
+            ])
+        ```
+        ### example 15
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        epl = equinix.fabric.Connection("epl",
+            name="ConnectionName",
+            type="EVPLAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,
+                        vlan_s_tag=1976,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 10
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_azure = equinix.fabric.Connection("vd2azure",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 7
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        token2_aws = equinix.fabric.Connection("token2aws",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                service_token=equinix.fabric.ConnectionASideServiceTokenArgs(
+                    uuid="",
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    seller_region="us-west-1",
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+
+        :param str resource_name: The name of the resource.
+        :param pulumi.ResourceOptions opts: Options for the resource.
+        :param pulumi.Input[pulumi.InputType['ConnectionASideArgs']] a_side: Requester or Customer side connection configuration object of the multi-segment connection
+        :param pulumi.Input[Sequence[pulumi.Input[Mapping[str, Any]]]] additional_info: Connection additional information
+        :param pulumi.Input[int] bandwidth: Connection bandwidth in Mbps
+        :param pulumi.Input[str] description: Customer-provided connection description
+        :param pulumi.Input[str] name: Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores
+        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionNotificationArgs']]]] notifications: Preferences for notifications on connection configuration or status changes
+        :param pulumi.Input[pulumi.InputType['ConnectionOrderArgs']] order: Order details
+        :param pulumi.Input[pulumi.InputType['ConnectionProjectArgs']] project: Project information
+        :param pulumi.Input[pulumi.InputType['ConnectionRedundancyArgs']] redundancy: Connection Redundancy Configuration
+        :param pulumi.Input[Union[str, 'ConnectionType']] type: Defines the connection type like EVPL*VC, EPL*VC, IPWAN*VC, IP*VC, ACCESS*EPL*VC, EVPLAN*VC, EPLAN*VC, EIA*VC, EC*VC
+        :param pulumi.Input[pulumi.InputType['ConnectionZSideArgs']] z_side: Destination or Provider side connection configuration object of the multi-segment connection
+        """
+        ...
+    @overload
+    def __init__(__self__,
+                 resource_name: str,
+                 args: ConnectionArgs,
+                 opts: Optional[pulumi.ResourceOptions] = None):
+        """
+        ## Example Usage
+        ### example 9
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        fcr2_azure = equinix.fabric.Connection("fcr2azure",
+            name="ConnectionName",
+            type="IP_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type="CLOUD_ROUTER",
+                    router=equinix.fabric.ConnectionASideAccessPointRouterArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 5
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_port = equinix.fabric.Connection("vd2port",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="NETWORK",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,
+                        vlan_s_tag=3711,
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 12
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        fcr2_network = equinix.fabric.Connection("fcr2network",
+            name="ConnectionName",
+            type="IPWAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type="CLOUD_ROUTER",
+                    router=equinix.fabric.ConnectionASideAccessPointRouterArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 11
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_azure_primary = equinix.fabric.Connection("vd2azurePrimary",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
             redundancy=equinix.fabric.ConnectionRedundancyArgs(
                 priority="PRIMARY",
             ),
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        vd2_azure_secondary = equinix.fabric.Connection("vd2azureSecondary",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            redundancy=equinix.fabric.ConnectionRedundancyArgs(
+                priority="SECONDARY",
+                group=vd2_azure_primary.redundancy.group,
+            ),
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=5,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 6
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_token = equinix.fabric.Connection("vd2token",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="NETWORK",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                service_token=equinix.fabric.ConnectionZSideServiceTokenArgs(
+                    uuid="",
+                ),
+            ))
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        epl = equinix.fabric.Connection("epl",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 14
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        epl = equinix.fabric.Connection("epl",
+            name="ConnectionName",
+            type="EPLAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 4
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        access_epl_vc = equinix.fabric.Connection("accessEplVc",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.ACCESS_EPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
             a_side=equinix.fabric.ConnectionASideArgs(
                 access_point=equinix.fabric.ConnectionASideAccessPointArgs(
-                    type="COLO",
+                    type=equinix.fabric.AccessPointType.COLO,
                     port=equinix.fabric.ConnectionASideAccessPointPortArgs(
-                        uuid=port_id,
+                        uuid="",
                     ),
                     link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
-                        type="DOT1Q",
-                        vlan_tag=1234,
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=1976,
                     ),
                 ),
             ),
             z_side=equinix.fabric.ConnectionZSideArgs(
                 access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
-                    type="SP",
-                    authentication_key=aws_account_id,
-                    seller_region=aws_region,
-                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
-                        type="L2_PROFILE",
-                        uuid=service_profile_id,
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
                     ),
                     location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
-                        metro_code=metro,
+                        metro_code=equinix.Metro.SILICON_VALLEY,
                     ),
                 ),
             ))
-        pulumi.export("connectionId", colo2_aws.id)
-        pulumi.export("connectionStatus", colo2_aws.operation.equinix_status)
-        pulumi.export("connectionProviderStatus", colo2_aws.operation.provider_status)
-        pulumi.export("awsDirectConnectId", colo2_aws.z_side.access_point.provider_connection_id)
         ```
+        ### example 13
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
 
-        :param str resource_name: The name of the resource.
-        :param pulumi.ResourceOptions opts: Options for the resource.
-        :param pulumi.Input[pulumi.InputType['ConnectionASideArgs']] a_side: Requester or Customer side connection configuration object of the multi-segment connection
-        :param pulumi.Input[Sequence[pulumi.Input[Mapping[str, Any]]]] additional_info: Connection additional information
-        :param pulumi.Input[int] bandwidth: Connection bandwidth in Mbps
-        :param pulumi.Input[str] description: Customer-provided connection description
-        :param pulumi.Input[str] name: Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores
-        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionNotificationArgs']]]] notifications: Preferences for notifications on connection configuration or status changes
-        :param pulumi.Input[pulumi.InputType['ConnectionOrderArgs']] order: Order details
-        :param pulumi.Input[pulumi.InputType['ConnectionProjectArgs']] project: Project information
-        :param pulumi.Input[pulumi.InputType['ConnectionRedundancyArgs']] redundancy: Connection Redundancy Configuration
-        :param pulumi.Input[Union[str, 'ConnectionType']] type: Defines the connection type like EVPL*VC, EPL*VC, IPWAN*VC, IP*VC, ACCESS*EPL*VC, EVPLAN*VC, EPLAN*VC, EIA*VC, EC*VC
-        :param pulumi.Input[pulumi.InputType['ConnectionZSideArgs']] z_side: Destination or Provider side connection configuration object of the multi-segment connection
-        """
-        ...
-    @overload
-    def __init__(__self__,
-                 resource_name: str,
-                 args: ConnectionArgs,
-                 opts: Optional[pulumi.ResourceOptions] = None):
-        """
-        ## Example Usage
+        vd2_token = equinix.fabric.Connection("vd2token",
+            name="ConnectionName",
+            type="EVPLAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        port2_port = equinix.fabric.Connection("port2port",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=1976,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=3711,
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 8
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        fcr2_port = equinix.fabric.Connection("fcr2port",
+            name="ConnectionName",
+            type="IP_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type="CLOUD_ROUTER",
+                    router=equinix.fabric.ConnectionASideAccessPointRouterArgs(
+                        uuid="",
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionZSideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionZSideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,
+                        vlan_tag=2711,
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ))
+        ```
+        ### example 2
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        speed_in_mbps = config.get_int("speedInMbps")
-        if speed_in_mbps is None:
-            speed_in_mbps = 50
-        fabric_port_name = config.require("fabricPortName")
-        aws_region = config.get("awsRegion")
-        if aws_region is None:
-            aws_region = "eu-central-1"
-        aws_account_id = config.require("awsAccountId")
-        service_profile_id = equinix.fabric.get_service_profiles(filter=equinix.fabric.GetServiceProfilesFilterArgs(
-            property="/name",
-            operator="=",
-            values=["AWS Direct Connect"],
-        )).data[0].uuid
-        port_id = equinix.fabric.get_ports(filter=equinix.fabric.GetPortsFilterArgs(
-            name=fabric_port_name,
-        )).data[0].uuid
-        colo2_aws = equinix.fabric.Connection("colo2Aws",
-            name="Pulumi-colo2Aws",
-            type="EVPL_VC",
-            notifications=[equinix.fabric.ConnectionNotificationArgs(
-                type="ALL",
-                emails=["example@equinix.com"],
-            )],
-            bandwidth=speed_in_mbps,
+        port2_aws = equinix.fabric.Connection("port2aws",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
             redundancy=equinix.fabric.ConnectionRedundancyArgs(
                 priority="PRIMARY",
             ),
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323929",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.COLO,
+                    port=equinix.fabric.ConnectionASideAccessPointPortArgs(
+                        uuid="",
+                    ),
+                    link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
+                        type=equinix.fabric.AccessPointLinkProtocolType.QIN_Q,
+                        vlan_s_tag=2019,
+                        vlan_c_tag=2112,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    seller_region="us-west-1",
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
+                    ),
+                ),
+            ),
+            additional_info=[
+                {
+                    "key": "accessKey",
+                    "value": "",
+                },
+                {
+                    "key": "secretKey",
+                    "value": "",
+                },
+            ])
+        ```
+        ### example 15
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        epl = equinix.fabric.Connection("epl",
+            name="ConnectionName",
+            type="EVPLAN_VC",
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
             a_side=equinix.fabric.ConnectionASideArgs(
                 access_point=equinix.fabric.ConnectionASideAccessPointArgs(
-                    type="COLO",
+                    type=equinix.fabric.AccessPointType.COLO,
                     port=equinix.fabric.ConnectionASideAccessPointPortArgs(
-                        uuid=port_id,
+                        uuid="",
                     ),
                     link_protocol=equinix.fabric.ConnectionASideAccessPointLinkProtocolArgs(
-                        type="DOT1Q",
-                        vlan_tag=1234,
+                        type=equinix.fabric.AccessPointLinkProtocolType.DOT1Q,
+                        vlan_s_tag=1976,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.NETWORK,
+                    network=equinix.fabric.ConnectionZSideAccessPointNetworkArgs(
+                        uuid="",
+                    ),
+                ),
+            ))
+        ```
+        ### example 10
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        vd2_azure = equinix.fabric.Connection("vd2azure",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                access_point=equinix.fabric.ConnectionASideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.VD,
+                    virtual_device=equinix.fabric.ConnectionASideAccessPointVirtualDeviceArgs(
+                        type="EDGE",
+                        uuid="",
+                    ),
+                    interface=equinix.fabric.ConnectionASideAccessPointInterfaceArgs(
+                        type="CLOUD",
+                        id=7,
+                    ),
+                ),
+            ),
+            z_side=equinix.fabric.ConnectionZSideArgs(
+                access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    peering_type=equinix.fabric.AccessPointPeeringType.PRIVATE,
+                    profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
+                    ),
+                    location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
+                        metro_code=equinix.Metro.SILICON_VALLEY,
                     ),
                 ),
+            ))
+        ```
+        ### example 7
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        token2_aws = equinix.fabric.Connection("token2aws",
+            name="ConnectionName",
+            type=equinix.fabric.ConnectionType.EVPL,
+            notifications=[equinix.fabric.ConnectionNotificationArgs(
+                type=equinix.fabric.NotificationsType.ALL,
+                emails=[
+                    "example@equinix.com",
+                    "test1@equinix.com",
+                ],
+            )],
+            bandwidth=50,
+            order=equinix.fabric.ConnectionOrderArgs(
+                purchase_order_number="1-323292",
+            ),
+            a_side=equinix.fabric.ConnectionASideArgs(
+                service_token=equinix.fabric.ConnectionASideServiceTokenArgs(
+                    uuid="",
+                ),
             ),
             z_side=equinix.fabric.ConnectionZSideArgs(
                 access_point=equinix.fabric.ConnectionZSideAccessPointArgs(
-                    type="SP",
-                    authentication_key=aws_account_id,
-                    seller_region=aws_region,
+                    type=equinix.fabric.AccessPointType.SP,
+                    authentication_key="",
+                    seller_region="us-west-1",
                     profile=equinix.fabric.ConnectionZSideAccessPointProfileArgs(
-                        type="L2_PROFILE",
-                        uuid=service_profile_id,
+                        type=equinix.fabric.ProfileType.L2_PROFILE,
+                        uuid="",
                     ),
                     location=equinix.fabric.ConnectionZSideAccessPointLocationArgs(
-                        metro_code=metro,
+                        metro_code=equinix.Metro.SILICON_VALLEY,
                     ),
                 ),
             ))
-        pulumi.export("connectionId", colo2_aws.id)
-        pulumi.export("connectionStatus", colo2_aws.operation.equinix_status)
-        pulumi.export("connectionProviderStatus", colo2_aws.operation.provider_status)
-        pulumi.export("awsDirectConnectId", colo2_aws.z_side.access_point.provider_connection_id)
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/fabric/routing_protocol.py b/sdk/python/pulumi_equinix/fabric/routing_protocol.py
index ba39441d..33dd29a7 100644
--- a/sdk/python/pulumi_equinix/fabric/routing_protocol.py
+++ b/sdk/python/pulumi_equinix/fabric/routing_protocol.py
@@ -534,22 +534,70 @@ def __init__(__self__,
         * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols
 
         ## Example Usage
+        ### example 3
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        connection_id = config.require("connectionId")
-        routing_protocol = equinix.fabric.RoutingProtocol("RoutingProtocol",
-            connection_uuid=connection_id,
-            name="My-Direct-route-1",
+        direct = equinix.fabric.RoutingProtocol("direct",
+            connection_uuid="",
             type="DIRECT",
+            name="direct_rp",
             direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args(
-                equinix_iface_ip="192.168.100.1/30",
+                equinix_iface_ip="190.1.1.1/30",
+            ),
+            direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args(
+                equinix_iface_ip="190::1:1/126",
             ))
-        pulumi.export("routingProtocolId", routing_protocol.id)
-        pulumi.export("routingProtocolState", routing_protocol.state)
-        pulumi.export("routingProtocolEquinixAsn", routing_protocol.equinix_asn)
+        bgp = equinix.fabric.RoutingProtocol("bgp",
+            connection_uuid="",
+            type="BGP",
+            name="bgp_rp",
+            bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args(
+                customer_peer_ip="190.1.1.2",
+                enabled=True,
+            ),
+            bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args(
+                customer_peer_ip="190::1:2",
+                enabled=True,
+            ),
+            customer_asn=4532,
+            opts = pulumi.ResourceOptions(depends_on=[direct]))
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        direct = equinix.fabric.RoutingProtocol("direct",
+            connection_uuid="",
+            type="DIRECT",
+            name="direct_rp",
+            direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args(
+                equinix_iface_ip="190.1.1.1/30",
+            ),
+            direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args(
+                equinix_iface_ip="190::1:1/126",
+            ))
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        bgp = equinix.fabric.RoutingProtocol("bgp",
+            connection_uuid="",
+            type="BGP",
+            name="bgp_rp",
+            bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args(
+                customer_peer_ip="190.1.1.2",
+                enabled=True,
+            ),
+            bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args(
+                customer_peer_ip="190::1:2",
+                enabled=True,
+            ),
+            customer_asn=4532)
         ```
 
         :param str resource_name: The name of the resource.
@@ -581,22 +629,70 @@ def __init__(__self__,
         * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols
 
         ## Example Usage
+        ### example 3
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        connection_id = config.require("connectionId")
-        routing_protocol = equinix.fabric.RoutingProtocol("RoutingProtocol",
-            connection_uuid=connection_id,
-            name="My-Direct-route-1",
+        direct = equinix.fabric.RoutingProtocol("direct",
+            connection_uuid="",
             type="DIRECT",
+            name="direct_rp",
             direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args(
-                equinix_iface_ip="192.168.100.1/30",
+                equinix_iface_ip="190.1.1.1/30",
+            ),
+            direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args(
+                equinix_iface_ip="190::1:1/126",
             ))
-        pulumi.export("routingProtocolId", routing_protocol.id)
-        pulumi.export("routingProtocolState", routing_protocol.state)
-        pulumi.export("routingProtocolEquinixAsn", routing_protocol.equinix_asn)
+        bgp = equinix.fabric.RoutingProtocol("bgp",
+            connection_uuid="",
+            type="BGP",
+            name="bgp_rp",
+            bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args(
+                customer_peer_ip="190.1.1.2",
+                enabled=True,
+            ),
+            bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args(
+                customer_peer_ip="190::1:2",
+                enabled=True,
+            ),
+            customer_asn=4532,
+            opts = pulumi.ResourceOptions(depends_on=[direct]))
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        direct = equinix.fabric.RoutingProtocol("direct",
+            connection_uuid="",
+            type="DIRECT",
+            name="direct_rp",
+            direct_ipv4=equinix.fabric.RoutingProtocolDirectIpv4Args(
+                equinix_iface_ip="190.1.1.1/30",
+            ),
+            direct_ipv6=equinix.fabric.RoutingProtocolDirectIpv6Args(
+                equinix_iface_ip="190::1:1/126",
+            ))
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        bgp = equinix.fabric.RoutingProtocol("bgp",
+            connection_uuid="",
+            type="BGP",
+            name="bgp_rp",
+            bgp_ipv4=equinix.fabric.RoutingProtocolBgpIpv4Args(
+                customer_peer_ip="190.1.1.2",
+                enabled=True,
+            ),
+            bgp_ipv6=equinix.fabric.RoutingProtocolBgpIpv6Args(
+                customer_peer_ip="190::1:2",
+                enabled=True,
+            ),
+            customer_asn=4532)
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/fabric/service_profile.py b/sdk/python/pulumi_equinix/fabric/service_profile.py
index d727341d..ed5a0055 100644
--- a/sdk/python/pulumi_equinix/fabric/service_profile.py
+++ b/sdk/python/pulumi_equinix/fabric/service_profile.py
@@ -671,49 +671,36 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        profile = equinix.fabric.ServiceProfile("profile",
-            name="Example Cloud Provider",
-            description="50 to 500 Mbps Hosted Connection to Example Cloud",
-            type="L2_PROFILE",
+        new_service_profile = equinix.fabric.ServiceProfile("newServiceProfile",
+            description="Service Profile for Receiving Connections",
+            name="Name Of Business + Use Case Tag",
+            type=equinix.fabric.ProfileType.L2_PROFILE,
+            visibility=equinix.fabric.ProfileVisibility.PUBLIC,
+            notifications=[equinix.fabric.ServiceProfileNotificationArgs(
+                emails=["someone@sample.com"],
+                type="BANDWIDTH_ALERT",
+            )],
+            allowed_emails=[
+                "test@equinix.com",
+                "testagain@equinix.com",
+            ],
+            ports=[equinix.fabric.ServiceProfilePortArgs(
+                uuid="c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee",
+                type="XF_PORT",
+            )],
             access_point_type_configs=[equinix.fabric.ServiceProfileAccessPointTypeConfigArgs(
-                type="COLO",
+                type=equinix.fabric.ProfileAccessPointType.COLO,
+                allow_remote_connections=True,
+                allow_custom_bandwidth=True,
+                allow_bandwidth_auto_approval=False,
+                connection_redundancy_required=False,
+                connection_label="Service Profile Tag1",
+                bandwidth_alert_threshold=10,
                 supported_bandwidths=[
-                    50,
                     100,
-                    200,
                     500,
                 ],
-                allow_remote_connections=True,
-                allow_custom_bandwidth=False,
-                allow_bandwidth_auto_approval=False,
-                link_protocol_config=equinix.fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs(
-                    encapsulation_strategy="CTAGED",
-                    reuse_vlan_s_tag=False,
-                    encapsulation="DOT1Q",
-                ),
-                enable_auto_generate_service_key="false,",
-                connection_redundancy_required="false,",
-                api_config=equinix.fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs(
-                    api_available=True,
-                    integration_id="Example-Connect-01",
-                    bandwidth_from_api=False,
-                ),
-                connection_label="Virtual Circuit Name",
-                authentication_key=equinix.fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs(
-                    required=True,
-                    label="Example ACCOUNT ID",
-                ),
-            )],
-            account=equinix.fabric.ServiceProfileAccountArgs(
-                organization_name="Example Cloud",
-                global_organization_name="Example Global",
-            ),
-            metros=None,
-            visibility="PUBLIC",
-            marketing_info=equinix.fabric.ServiceProfileMarketingInfoArgs(
-                promotion=True,
-            ))
-        pulumi.export("profileId", profile.id)
+            )])
         ```
 
         :param str resource_name: The name of the resource.
@@ -754,49 +741,36 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        profile = equinix.fabric.ServiceProfile("profile",
-            name="Example Cloud Provider",
-            description="50 to 500 Mbps Hosted Connection to Example Cloud",
-            type="L2_PROFILE",
+        new_service_profile = equinix.fabric.ServiceProfile("newServiceProfile",
+            description="Service Profile for Receiving Connections",
+            name="Name Of Business + Use Case Tag",
+            type=equinix.fabric.ProfileType.L2_PROFILE,
+            visibility=equinix.fabric.ProfileVisibility.PUBLIC,
+            notifications=[equinix.fabric.ServiceProfileNotificationArgs(
+                emails=["someone@sample.com"],
+                type="BANDWIDTH_ALERT",
+            )],
+            allowed_emails=[
+                "test@equinix.com",
+                "testagain@equinix.com",
+            ],
+            ports=[equinix.fabric.ServiceProfilePortArgs(
+                uuid="c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee",
+                type="XF_PORT",
+            )],
             access_point_type_configs=[equinix.fabric.ServiceProfileAccessPointTypeConfigArgs(
-                type="COLO",
+                type=equinix.fabric.ProfileAccessPointType.COLO,
+                allow_remote_connections=True,
+                allow_custom_bandwidth=True,
+                allow_bandwidth_auto_approval=False,
+                connection_redundancy_required=False,
+                connection_label="Service Profile Tag1",
+                bandwidth_alert_threshold=10,
                 supported_bandwidths=[
-                    50,
                     100,
-                    200,
                     500,
                 ],
-                allow_remote_connections=True,
-                allow_custom_bandwidth=False,
-                allow_bandwidth_auto_approval=False,
-                link_protocol_config=equinix.fabric.ServiceProfileAccessPointTypeConfigLinkProtocolConfigArgs(
-                    encapsulation_strategy="CTAGED",
-                    reuse_vlan_s_tag=False,
-                    encapsulation="DOT1Q",
-                ),
-                enable_auto_generate_service_key="false,",
-                connection_redundancy_required="false,",
-                api_config=equinix.fabric.ServiceProfileAccessPointTypeConfigApiConfigArgs(
-                    api_available=True,
-                    integration_id="Example-Connect-01",
-                    bandwidth_from_api=False,
-                ),
-                connection_label="Virtual Circuit Name",
-                authentication_key=equinix.fabric.ServiceProfileAccessPointTypeConfigAuthenticationKeyArgs(
-                    required=True,
-                    label="Example ACCOUNT ID",
-                ),
-            )],
-            account=equinix.fabric.ServiceProfileAccountArgs(
-                organization_name="Example Cloud",
-                global_organization_name="Example Global",
-            ),
-            metros=None,
-            visibility="PUBLIC",
-            marketing_info=equinix.fabric.ServiceProfileMarketingInfoArgs(
-                promotion=True,
-            ))
-        pulumi.export("profileId", profile.id)
+            )])
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/bgp_session.py b/sdk/python/pulumi_equinix/metal/bgp_session.py
index 63267ea6..d5ae741e 100644
--- a/sdk/python/pulumi_equinix/metal/bgp_session.py
+++ b/sdk/python/pulumi_equinix/metal/bgp_session.py
@@ -157,13 +157,56 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
-
-        config = pulumi.Config()
-        device_id = config.require("deviceId")
-        bgp = equinix.metal.BgpSession("bgp",
-            device_id=device_id,
+        import pulumi_null as null
+
+        bgp_password = "955dB0b81Ef"
+        project_id = ""
+        addr = equinix.metal.ReservedIpBlock("addr",
+            project_id=project_id,
+            metro="ny",
+            quantity=1)
+        interface_lo0 = pulumi.Output.all(addr.address, addr.netmask).apply(lambda address, netmask: f\"\"\"auto lo:0
+        iface lo:0 inet static
+           address {address}
+           netmask {netmask}
+        \"\"\")
+        test = equinix.metal.Device("test",
+            hostname="terraform-test-bgp-sesh",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id)
+        bird_conf = pulumi.Output.all(addr.address, addr.cidr, test.network, test.network).apply(lambda address, cidr, testNetwork, testNetwork1: f\"\"\"filter equinix_metal_bgp {{
+            if net = {address}/{cidr} then accept;
+        }}
+        router id {test_network[2].address};
+        protocol direct {{
+            interface "lo";
+        }}
+        protocol kernel {{
+            scan time 10;
+            persist;
+            import all;
+            export all;
+        }}
+        protocol device {{
+            scan time 10;
+        }}
+        protocol bgp {{
+            export filter equinix_metal_bgp;
+            local as 65000;
+            neighbor {test_network1[2].gateway} as 65530;
+            password "{bgp_password}";
+        }}
+        \"\"\")
+        test_bgp_session = equinix.metal.BgpSession("testBgpSession",
+            device_id=test.id,
             address_family="ipv4")
-        pulumi.export("bgpSessionStatus", bgp.status)
+        configure_bird = null.Resource("configureBird", triggers={
+            "bird_conf": bird_conf,
+            "interface": interface_lo0,
+        })
         ```
 
         :param str resource_name: The name of the resource.
@@ -189,13 +232,56 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
-
-        config = pulumi.Config()
-        device_id = config.require("deviceId")
-        bgp = equinix.metal.BgpSession("bgp",
-            device_id=device_id,
+        import pulumi_null as null
+
+        bgp_password = "955dB0b81Ef"
+        project_id = ""
+        addr = equinix.metal.ReservedIpBlock("addr",
+            project_id=project_id,
+            metro="ny",
+            quantity=1)
+        interface_lo0 = pulumi.Output.all(addr.address, addr.netmask).apply(lambda address, netmask: f\"\"\"auto lo:0
+        iface lo:0 inet static
+           address {address}
+           netmask {netmask}
+        \"\"\")
+        test = equinix.metal.Device("test",
+            hostname="terraform-test-bgp-sesh",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id)
+        bird_conf = pulumi.Output.all(addr.address, addr.cidr, test.network, test.network).apply(lambda address, cidr, testNetwork, testNetwork1: f\"\"\"filter equinix_metal_bgp {{
+            if net = {address}/{cidr} then accept;
+        }}
+        router id {test_network[2].address};
+        protocol direct {{
+            interface "lo";
+        }}
+        protocol kernel {{
+            scan time 10;
+            persist;
+            import all;
+            export all;
+        }}
+        protocol device {{
+            scan time 10;
+        }}
+        protocol bgp {{
+            export filter equinix_metal_bgp;
+            local as 65000;
+            neighbor {test_network1[2].gateway} as 65530;
+            password "{bgp_password}";
+        }}
+        \"\"\")
+        test_bgp_session = equinix.metal.BgpSession("testBgpSession",
+            device_id=test.id,
             address_family="ipv4")
-        pulumi.export("bgpSessionStatus", bgp.status)
+        configure_bird = null.Resource("configureBird", triggers={
+            "bird_conf": bird_conf,
+            "interface": interface_lo0,
+        })
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/device.py b/sdk/python/pulumi_equinix/metal/device.py
index 542bffea..80464f07 100644
--- a/sdk/python/pulumi_equinix/metal/device.py
+++ b/sdk/python/pulumi_equinix/metal/device.py
@@ -1055,20 +1055,142 @@ def __init__(__self__,
         > **NOTE:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. Read more about sensitive data in state.
 
         ## Example Usage
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        web = equinix.metal.Device("web",
-            hostname="webserver1",
-            plan="c3.small.x86",
-            operating_system="ubuntu_20_04",
+        web1 = equinix.metal.Device("web1",
+            hostname="tf.coreos2",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
             metro="sv",
-            billing_cycle="hourly",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
             project_id=project_id)
-        pulumi.export("webPublicIp", web.access_public_ipv4.apply(lambda access_public_ipv4: f"http://{access_public_ipv4}"))
+        ```
+        ### example 4
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        web1 = equinix.metal.Device("web1",
+            hostname="tftest",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            hardware_reservation_id="next-available",
+            storage=\"\"\"{
+          "disks": [
+            {
+              "device": "/dev/sda",
+              "wipeTable": true,
+              "partitions": [
+                {
+                  "label": "BIOS",
+                  "number": 1,
+                  "size": "4096"
+                },
+                {
+                  "label": "SWAP",
+                  "number": 2,
+                  "size": "3993600"
+                },
+                {
+                  "label": "ROOT",
+                  "number": 3,
+                  "size": "0"
+                }
+              ]
+            }
+          ],
+          "filesystems": [
+            {
+              "mount": {
+                "device": "/dev/sda3",
+                "format": "ext4",
+                "point": "/",
+                "create": {
+                  "options": [
+                    "-L",
+                    "ROOT"
+                  ]
+                }
+              }
+            },
+            {
+              "mount": {
+                "device": "/dev/sda2",
+                "format": "swap",
+                "point": "none",
+                "create": {
+                  "options": [
+                    "-L",
+                    "SWAP"
+                  ]
+                }
+              }
+            }
+          ]
+        }
+        \"\"\")
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        pxe1 = equinix.metal.Device("pxe1",
+            hostname="tf.coreos2-pxe",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="sv",
+            operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe",
+            always_pxe=False,
+            user_data=example["rendered"])
+        ```
+        ### example 5
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        pxe1 = equinix.metal.Device("pxe1",
+            hostname="tf.coreos2-pxe",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="sv",
+            operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe",
+            always_pxe=False,
+            user_data=user_data,
+            custom_data=custom_data,
+            behavior=equinix.metal.DeviceBehaviorArgs(
+                allow_changes=[
+                    "custom_data",
+                    "user_data",
+                ],
+            ))
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        web1 = equinix.metal.Device("web1",
+            hostname="tf.coreos2",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            ip_addresses=[equinix.metal.DeviceIpAddressArgs(
+                type="private_ipv4",
+                cidr=30,
+            )])
         ```
 
         :param str resource_name: The name of the resource.
@@ -1108,20 +1230,142 @@ def __init__(__self__,
         > **NOTE:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. Read more about sensitive data in state.
 
         ## Example Usage
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        web = equinix.metal.Device("web",
-            hostname="webserver1",
-            plan="c3.small.x86",
-            operating_system="ubuntu_20_04",
+        web1 = equinix.metal.Device("web1",
+            hostname="tf.coreos2",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
             metro="sv",
-            billing_cycle="hourly",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
             project_id=project_id)
-        pulumi.export("webPublicIp", web.access_public_ipv4.apply(lambda access_public_ipv4: f"http://{access_public_ipv4}"))
+        ```
+        ### example 4
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        web1 = equinix.metal.Device("web1",
+            hostname="tftest",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            hardware_reservation_id="next-available",
+            storage=\"\"\"{
+          "disks": [
+            {
+              "device": "/dev/sda",
+              "wipeTable": true,
+              "partitions": [
+                {
+                  "label": "BIOS",
+                  "number": 1,
+                  "size": "4096"
+                },
+                {
+                  "label": "SWAP",
+                  "number": 2,
+                  "size": "3993600"
+                },
+                {
+                  "label": "ROOT",
+                  "number": 3,
+                  "size": "0"
+                }
+              ]
+            }
+          ],
+          "filesystems": [
+            {
+              "mount": {
+                "device": "/dev/sda3",
+                "format": "ext4",
+                "point": "/",
+                "create": {
+                  "options": [
+                    "-L",
+                    "ROOT"
+                  ]
+                }
+              }
+            },
+            {
+              "mount": {
+                "device": "/dev/sda2",
+                "format": "swap",
+                "point": "none",
+                "create": {
+                  "options": [
+                    "-L",
+                    "SWAP"
+                  ]
+                }
+              }
+            }
+          ]
+        }
+        \"\"\")
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        pxe1 = equinix.metal.Device("pxe1",
+            hostname="tf.coreos2-pxe",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="sv",
+            operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe",
+            always_pxe=False,
+            user_data=example["rendered"])
+        ```
+        ### example 5
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        pxe1 = equinix.metal.Device("pxe1",
+            hostname="tf.coreos2-pxe",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="sv",
+            operating_system=equinix.metal.OperatingSystem.CUSTOM_IPXE,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            ipxe_script_url="https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe",
+            always_pxe=False,
+            user_data=user_data,
+            custom_data=custom_data,
+            behavior=equinix.metal.DeviceBehaviorArgs(
+                allow_changes=[
+                    "custom_data",
+                    "user_data",
+                ],
+            ))
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        web1 = equinix.metal.Device("web1",
+            hostname="tf.coreos2",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            ip_addresses=[equinix.metal.DeviceIpAddressArgs(
+                type="private_ipv4",
+                cidr=30,
+            )])
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/gateway.py b/sdk/python/pulumi_equinix/metal/gateway.py
index 3a9ccdbf..2b13701e 100644
--- a/sdk/python/pulumi_equinix/metal/gateway.py
+++ b/sdk/python/pulumi_equinix/metal/gateway.py
@@ -228,18 +228,37 @@ def __init__(__self__,
         See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
 
         ## Example Usage
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        vlan_id = config.require("vlanId")
-        gateway = equinix.metal.Gateway("gateway",
+        test = equinix.metal.Vlan("test",
+            description="test VLAN in SV",
+            metro="sv",
+            project_id=project_id)
+        test_gateway = equinix.metal.Gateway("testGateway",
             project_id=project_id,
-            vlan_id=vlan_id,
+            vlan_id=test.id,
             private_ipv4_subnet_size=8)
-        pulumi.export("gatewayState", gateway.state)
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        test = equinix.metal.Vlan("test",
+            description="test VLAN in SV",
+            metro="sv",
+            project_id=project_id)
+        test1 = equinix.metal.ReservedIpBlock("test1",
+            project_id=project_id,
+            metro="sv",
+            quantity=8)
+        test_gateway = equinix.metal.Gateway("testGateway",
+            project_id=project_id,
+            vlan_id=test.id,
+            ip_reservation_id=test_equinix_metal_reserved_ip_block["id"])
         ```
 
         :param str resource_name: The name of the resource.
@@ -261,18 +280,37 @@ def __init__(__self__,
         See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
 
         ## Example Usage
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        vlan_id = config.require("vlanId")
-        gateway = equinix.metal.Gateway("gateway",
+        test = equinix.metal.Vlan("test",
+            description="test VLAN in SV",
+            metro="sv",
+            project_id=project_id)
+        test_gateway = equinix.metal.Gateway("testGateway",
             project_id=project_id,
-            vlan_id=vlan_id,
+            vlan_id=test.id,
             private_ipv4_subnet_size=8)
-        pulumi.export("gatewayState", gateway.state)
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        test = equinix.metal.Vlan("test",
+            description="test VLAN in SV",
+            metro="sv",
+            project_id=project_id)
+        test1 = equinix.metal.ReservedIpBlock("test1",
+            project_id=project_id,
+            metro="sv",
+            quantity=8)
+        test_gateway = equinix.metal.Gateway("testGateway",
+            project_id=project_id,
+            vlan_id=test.id,
+            ip_reservation_id=test_equinix_metal_reserved_ip_block["id"])
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/interconnection.py b/sdk/python/pulumi_equinix/metal/interconnection.py
index 38b41b52..194da2d6 100644
--- a/sdk/python/pulumi_equinix/metal/interconnection.py
+++ b/sdk/python/pulumi_equinix/metal/interconnection.py
@@ -632,6 +632,31 @@ def __init__(__self__,
         > Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization.
 
         ## Example Usage
+        ### example metal billed token
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        config = pulumi.Config()
+        project_id = config.require("projectId")
+        metro = config.get("metro")
+        if metro is None:
+            metro = "SV"
+        speed_in_mbps = config.get_int("speedInMbps")
+        if speed_in_mbps is None:
+            speed_in_mbps = 1000
+        connection = equinix.metal.Interconnection("connection",
+            name="metal-to-cloudprovider",
+            project_id=project_id,
+            type="shared",
+            redundancy="primary",
+            metro=metro,
+            speed=f"{speed_in_mbps}Mbps",
+            service_token_type="a_side")
+        pulumi.export("connectionStatus", connection.status)
+        pulumi.export("connectionTokens", connection.service_tokens)
+        ```
+        ### example fabric billed token
         ```python
         import pulumi
         import pulumi_equinix as equinix
@@ -687,6 +712,31 @@ def __init__(__self__,
         > Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization.
 
         ## Example Usage
+        ### example metal billed token
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        config = pulumi.Config()
+        project_id = config.require("projectId")
+        metro = config.get("metro")
+        if metro is None:
+            metro = "SV"
+        speed_in_mbps = config.get_int("speedInMbps")
+        if speed_in_mbps is None:
+            speed_in_mbps = 1000
+        connection = equinix.metal.Interconnection("connection",
+            name="metal-to-cloudprovider",
+            project_id=project_id,
+            type="shared",
+            redundancy="primary",
+            metro=metro,
+            speed=f"{speed_in_mbps}Mbps",
+            service_token_type="a_side")
+        pulumi.export("connectionStatus", connection.status)
+        pulumi.export("connectionTokens", connection.service_tokens)
+        ```
+        ### example fabric billed token
         ```python
         import pulumi
         import pulumi_equinix as equinix
diff --git a/sdk/python/pulumi_equinix/metal/ip_attachment.py b/sdk/python/pulumi_equinix/metal/ip_attachment.py
index f48cd256..ffc1b669 100644
--- a/sdk/python/pulumi_equinix/metal/ip_attachment.py
+++ b/sdk/python/pulumi_equinix/metal/ip_attachment.py
@@ -270,17 +270,20 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
-
-        config = pulumi.Config()
-        device_id = config.require("deviceId")
-        subnet_cidr = config.get("subnetCidr")
-        if subnet_cidr is None:
-            subnet_cidr = "147.229.10.152/31"
-        ip_attach_resource = equinix.metal.IpAttachment("ipAttach",
-            device_id=device_id,
-            cidr_notation=subnet_cidr)
-        pulumi.export("ipAttach", ip_attach_resource.id)
-        pulumi.export("ipNetmask", ip_attach_resource.netmask)
+        import pulumi_std as std
+
+        myblock = equinix.metal.ReservedIpBlock("myblock",
+            project_id=project_id,
+            metro="ny",
+            quantity=2)
+        first_address_assignment = equinix.metal.IpAttachment("firstAddressAssignment",
+            device_id=mydevice["id"],
+            cidr_notation=std.join_output(separator="/",
+                input=[
+                    std.cidrhost_output(input=myblock_metal_reserved_ip_block["cidrNotation"],
+                        host=0).apply(lambda invoke: invoke.result),
+                    "32",
+                ]).apply(lambda invoke: invoke.result))
         ```
 
         :param str resource_name: The name of the resource.
@@ -307,17 +310,20 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
-
-        config = pulumi.Config()
-        device_id = config.require("deviceId")
-        subnet_cidr = config.get("subnetCidr")
-        if subnet_cidr is None:
-            subnet_cidr = "147.229.10.152/31"
-        ip_attach_resource = equinix.metal.IpAttachment("ipAttach",
-            device_id=device_id,
-            cidr_notation=subnet_cidr)
-        pulumi.export("ipAttach", ip_attach_resource.id)
-        pulumi.export("ipNetmask", ip_attach_resource.netmask)
+        import pulumi_std as std
+
+        myblock = equinix.metal.ReservedIpBlock("myblock",
+            project_id=project_id,
+            metro="ny",
+            quantity=2)
+        first_address_assignment = equinix.metal.IpAttachment("firstAddressAssignment",
+            device_id=mydevice["id"],
+            cidr_notation=std.join_output(separator="/",
+                input=[
+                    std.cidrhost_output(input=myblock_metal_reserved_ip_block["cidrNotation"],
+                        host=0).apply(lambda invoke: invoke.result),
+                    "32",
+                ]).apply(lambda invoke: invoke.result))
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/organization.py b/sdk/python/pulumi_equinix/metal/organization.py
index 29167918..853c7bed 100644
--- a/sdk/python/pulumi_equinix/metal/organization.py
+++ b/sdk/python/pulumi_equinix/metal/organization.py
@@ -273,16 +273,9 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        org_resource = equinix.metal.Organization("org",
-            name="Foo Organization",
-            address=equinix.metal.OrganizationAddressArgs(
-                address="org street",
-                city="london",
-                country="GB",
-                zip_code="12345",
-            ),
-            description="An organization")
-        pulumi.export("org", org_resource.id)
+        tf_organization1 = equinix.metal.Organization("tfOrganization1",
+            name="foobar",
+            description="quux")
         ```
 
         ## Import
@@ -316,16 +309,9 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        org_resource = equinix.metal.Organization("org",
-            name="Foo Organization",
-            address=equinix.metal.OrganizationAddressArgs(
-                address="org street",
-                city="london",
-                country="GB",
-                zip_code="12345",
-            ),
-            description="An organization")
-        pulumi.export("org", org_resource.id)
+        tf_organization1 = equinix.metal.Organization("tfOrganization1",
+            name="foobar",
+            description="quux")
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/organization_member.py b/sdk/python/pulumi_equinix/metal/organization_member.py
index 92ee8fb9..66540d8c 100644
--- a/sdk/python/pulumi_equinix/metal/organization_member.py
+++ b/sdk/python/pulumi_equinix/metal/organization_member.py
@@ -278,21 +278,27 @@ def __init__(__self__,
         Manage the membership of existing and new invitees within an Equinix Metal organization and its projects.
 
         ## Example Usage
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        owner = equinix.metal.OrganizationMember("owner",
+            invitee="admin@example.com",
+            roles=["owner"],
+            projects_ids=[],
+            organization_id=organization_id)
+        ```
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        organization_id = config.require("organizationId")
-        project_id = config.require("projectId")
-        user_email_address = config.require("userEmailAddress")
         member = equinix.metal.OrganizationMember("member",
-            invitee=user_email_address,
+            invitee="member@example.com",
             roles=["limited_collaborator"],
             projects_ids=[project_id],
             organization_id=organization_id)
-        pulumi.export("memberId", member.id)
-        pulumi.export("memberState", member.state)
         ```
 
         ## Import
@@ -321,21 +327,27 @@ def __init__(__self__,
         Manage the membership of existing and new invitees within an Equinix Metal organization and its projects.
 
         ## Example Usage
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        owner = equinix.metal.OrganizationMember("owner",
+            invitee="admin@example.com",
+            roles=["owner"],
+            projects_ids=[],
+            organization_id=organization_id)
+        ```
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        organization_id = config.require("organizationId")
-        project_id = config.require("projectId")
-        user_email_address = config.require("userEmailAddress")
         member = equinix.metal.OrganizationMember("member",
-            invitee=user_email_address,
+            invitee="member@example.com",
             roles=["limited_collaborator"],
             projects_ids=[project_id],
             organization_id=organization_id)
-        pulumi.export("memberId", member.id)
-        pulumi.export("memberState", member.state)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/port.py b/sdk/python/pulumi_equinix/metal/port.py
index b3a4fa07..53788bb4 100644
--- a/sdk/python/pulumi_equinix/metal/port.py
+++ b/sdk/python/pulumi_equinix/metal/port.py
@@ -375,21 +375,7 @@ def __init__(__self__,
                  vxlan_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
                  __props__=None):
         """
-        ## Example Usage
-        ```python
-        import pulumi
-        import pulumi_equinix as equinix
-
-        config = pulumi.Config()
-        port_id = config.require("portId")
-        org = equinix.metal.Port("org",
-            port_id=port_id,
-            bonded=True,
-            layer2=True)
-        pulumi.export("portType", port["type"])
-        pulumi.export("portBondedNetworkType", port["networkType"])
-        ```
-
+        Create a Port resource with the given unique name, props, and options.
         :param str resource_name: The name of the resource.
         :param pulumi.ResourceOptions opts: Options for the resource.
         :param pulumi.Input[bool] bonded: Whether the port should be bonded.
@@ -407,21 +393,7 @@ def __init__(__self__,
                  args: PortArgs,
                  opts: Optional[pulumi.ResourceOptions] = None):
         """
-        ## Example Usage
-        ```python
-        import pulumi
-        import pulumi_equinix as equinix
-
-        config = pulumi.Config()
-        port_id = config.require("portId")
-        org = equinix.metal.Port("org",
-            port_id=port_id,
-            bonded=True,
-            layer2=True)
-        pulumi.export("portType", port["type"])
-        pulumi.export("portBondedNetworkType", port["networkType"])
-        ```
-
+        Create a Port resource with the given unique name, props, and options.
         :param str resource_name: The name of the resource.
         :param PortArgs args: The arguments to use to populate this resource's properties.
         :param pulumi.ResourceOptions opts: Options for the resource.
diff --git a/sdk/python/pulumi_equinix/metal/port_vlan_attachment.py b/sdk/python/pulumi_equinix/metal/port_vlan_attachment.py
index 64d1ad67..c16bb701 100644
--- a/sdk/python/pulumi_equinix/metal/port_vlan_attachment.py
+++ b/sdk/python/pulumi_equinix/metal/port_vlan_attachment.py
@@ -248,24 +248,63 @@ def __init__(__self__,
         * `port_id` - UUID of device port.
 
         ## Example Usage
+        ### example 2
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        device_id = config.require("deviceId")
-        port_name = config.get("portName")
-        if port_name is None:
-            port_name = "eth1"
-        vxlan_id = config.get_int("vxlanId")
-        if vxlan_id is None:
-            vxlan_id = 1004
-        attach = equinix.metal.PortVlanAttachment("attach",
-            device_id=device_id,
-            port_name=port_name,
-            vlan_vnid=vxlan_id)
-        pulumi.export("attachId", attach.id)
-        pulumi.export("portId", attach.port_id)
+        test = equinix.metal.Device("test",
+            hostname="test",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id)
+        test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType",
+            device_id=test.id,
+            type="layer2-individual")
+        test1 = equinix.metal.Vlan("test1",
+            description="VLAN in New York",
+            metro="ny",
+            project_id=project_id)
+        test2 = equinix.metal.Vlan("test2",
+            description="VLAN in New Jersey",
+            metro="ny",
+            project_id=project_id)
+        test1_port_vlan_attachment = equinix.metal.PortVlanAttachment("test1PortVlanAttachment",
+            device_id=test_device_network_type.id,
+            vlan_vnid=test1.vxlan,
+            port_name="eth1")
+        test2_port_vlan_attachment = equinix.metal.PortVlanAttachment("test2PortVlanAttachment",
+            device_id=test_device_network_type.id,
+            vlan_vnid=test2.vxlan,
+            port_name="eth1",
+            native=True,
+            opts = pulumi.ResourceOptions(depends_on=[test1_port_vlan_attachment]))
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        test = equinix.metal.Vlan("test",
+            description="VLAN in New York",
+            metro="ny",
+            project_id=project_id)
+        test_device = equinix.metal.Device("testDevice",
+            hostname="test",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id)
+        test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType",
+            device_id=test_device.id,
+            type="hybrid")
+        test_port_vlan_attachment = equinix.metal.PortVlanAttachment("testPortVlanAttachment",
+            device_id=test_device_network_type.id,
+            port_name="eth1",
+            vlan_vnid=test.vxlan)
         ```
 
         :param str resource_name: The name of the resource.
@@ -303,24 +342,63 @@ def __init__(__self__,
         * `port_id` - UUID of device port.
 
         ## Example Usage
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        test = equinix.metal.Device("test",
+            hostname="test",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id)
+        test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType",
+            device_id=test.id,
+            type="layer2-individual")
+        test1 = equinix.metal.Vlan("test1",
+            description="VLAN in New York",
+            metro="ny",
+            project_id=project_id)
+        test2 = equinix.metal.Vlan("test2",
+            description="VLAN in New Jersey",
+            metro="ny",
+            project_id=project_id)
+        test1_port_vlan_attachment = equinix.metal.PortVlanAttachment("test1PortVlanAttachment",
+            device_id=test_device_network_type.id,
+            vlan_vnid=test1.vxlan,
+            port_name="eth1")
+        test2_port_vlan_attachment = equinix.metal.PortVlanAttachment("test2PortVlanAttachment",
+            device_id=test_device_network_type.id,
+            vlan_vnid=test2.vxlan,
+            port_name="eth1",
+            native=True,
+            opts = pulumi.ResourceOptions(depends_on=[test1_port_vlan_attachment]))
+        ```
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        device_id = config.require("deviceId")
-        port_name = config.get("portName")
-        if port_name is None:
-            port_name = "eth1"
-        vxlan_id = config.get_int("vxlanId")
-        if vxlan_id is None:
-            vxlan_id = 1004
-        attach = equinix.metal.PortVlanAttachment("attach",
-            device_id=device_id,
-            port_name=port_name,
-            vlan_vnid=vxlan_id)
-        pulumi.export("attachId", attach.id)
-        pulumi.export("portId", attach.port_id)
+        test = equinix.metal.Vlan("test",
+            description="VLAN in New York",
+            metro="ny",
+            project_id=project_id)
+        test_device = equinix.metal.Device("testDevice",
+            hostname="test",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id)
+        test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType",
+            device_id=test_device.id,
+            type="hybrid")
+        test_port_vlan_attachment = equinix.metal.PortVlanAttachment("testPortVlanAttachment",
+            device_id=test_device_network_type.id,
+            port_name="eth1",
+            vlan_vnid=test.vxlan)
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/project.py b/sdk/python/pulumi_equinix/metal/project.py
index fb5fe680..1ec439fa 100644
--- a/sdk/python/pulumi_equinix/metal/project.py
+++ b/sdk/python/pulumi_equinix/metal/project.py
@@ -246,19 +246,38 @@ def __init__(__self__,
         > **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects.
 
         ## Example Usage
+        ### example 3
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        organization_id = config.require("organizationId")
-        name = config.get("name")
-        if name is None:
-            name = "Default Project"
-        project_resource = equinix.metal.Project("project",
-            name=name,
-            organization_id=organization_id)
-        pulumi.export("projectId", project_resource.id)
+        existing_project = equinix.metal.Project("existingProject",
+            name="The name of the project (if different, will rewrite)",
+            bgp_config=equinix.metal.ProjectBgpConfigArgs(
+                deployment_type="local",
+                md5="C179c28c41a85b",
+                asn=65000,
+            ))
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        tf_project1 = equinix.metal.Project("tfProject1",
+            name="tftest",
+            bgp_config=equinix.metal.ProjectBgpConfigArgs(
+                deployment_type="local",
+                md5="C179c28c41a85b",
+                asn=65000,
+            ))
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        tf_project1 = equinix.metal.Project("tfProject1", name="Terraform Fun")
         ```
 
         ## Import
@@ -291,19 +310,38 @@ def __init__(__self__,
         > **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects.
 
         ## Example Usage
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        existing_project = equinix.metal.Project("existingProject",
+            name="The name of the project (if different, will rewrite)",
+            bgp_config=equinix.metal.ProjectBgpConfigArgs(
+                deployment_type="local",
+                md5="C179c28c41a85b",
+                asn=65000,
+            ))
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        tf_project1 = equinix.metal.Project("tfProject1",
+            name="tftest",
+            bgp_config=equinix.metal.ProjectBgpConfigArgs(
+                deployment_type="local",
+                md5="C179c28c41a85b",
+                asn=65000,
+            ))
+        ```
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        organization_id = config.require("organizationId")
-        name = config.get("name")
-        if name is None:
-            name = "Default Project"
-        project_resource = equinix.metal.Project("project",
-            name=name,
-            organization_id=organization_id)
-        pulumi.export("projectId", project_resource.id)
+        tf_project1 = equinix.metal.Project("tfProject1", name="Terraform Fun")
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/project_api_key.py b/sdk/python/pulumi_equinix/metal/project_api_key.py
index ef12efbe..d0590999 100644
--- a/sdk/python/pulumi_equinix/metal/project_api_key.py
+++ b/sdk/python/pulumi_equinix/metal/project_api_key.py
@@ -159,16 +159,10 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        read_only = config.get_bool("readOnly")
-        if read_only is None:
-            read_only = False
-        api_key = equinix.metal.ProjectApiKey("apiKey",
-            project_id=project_id,
-            description="A project level API Key",
-            read_only=read_only)
-        pulumi.export("apiKeyToken", api_key.token)
+        test = equinix.metal.ProjectApiKey("test",
+            project_id=existing_project_id,
+            description="Read-only key scoped to a projct",
+            read_only=True)
         ```
 
         :param str resource_name: The name of the resource.
@@ -194,16 +188,10 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        read_only = config.get_bool("readOnly")
-        if read_only is None:
-            read_only = False
-        api_key = equinix.metal.ProjectApiKey("apiKey",
-            project_id=project_id,
-            description="A project level API Key",
-            read_only=read_only)
-        pulumi.export("apiKeyToken", api_key.token)
+        test = equinix.metal.ProjectApiKey("test",
+            project_id=existing_project_id,
+            description="Read-only key scoped to a projct",
+            read_only=True)
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/project_ssh_key.py b/sdk/python/pulumi_equinix/metal/project_ssh_key.py
index 9864ebd2..259aa009 100644
--- a/sdk/python/pulumi_equinix/metal/project_ssh_key.py
+++ b/sdk/python/pulumi_equinix/metal/project_ssh_key.py
@@ -202,13 +202,19 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        ssh_key = equinix.metal.ProjectSshKey("sshKey",
-            project_id=project_id,
-            name="johnKent",
-            public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub"))
-        pulumi.export("sshKeyId", ssh_key.id)
+        project_id = ""
+        test = equinix.metal.ProjectSshKey("test",
+            name="test",
+            public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2",
+            project_id=project_id)
+        test_device = equinix.metal.Device("testDevice",
+            hostname="test",
+            plan=equinix.metal.Plan.C3_MEDIUM_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_ssh_key_ids=[test.id],
+            project_id=project_id)
         ```
 
         :param str resource_name: The name of the resource.
@@ -231,13 +237,19 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        ssh_key = equinix.metal.ProjectSshKey("sshKey",
-            project_id=project_id,
-            name="johnKent",
-            public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub"))
-        pulumi.export("sshKeyId", ssh_key.id)
+        project_id = ""
+        test = equinix.metal.ProjectSshKey("test",
+            name="test",
+            public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2",
+            project_id=project_id)
+        test_device = equinix.metal.Device("testDevice",
+            hostname="test",
+            plan=equinix.metal.Plan.C3_MEDIUM_X86,
+            metro="ny",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_ssh_key_ids=[test.id],
+            project_id=project_id)
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/reserved_ip_block.py b/sdk/python/pulumi_equinix/metal/reserved_ip_block.py
index b72c491c..a10bc8f1 100644
--- a/sdk/python/pulumi_equinix/metal/reserved_ip_block.py
+++ b/sdk/python/pulumi_equinix/metal/reserved_ip_block.py
@@ -563,28 +563,51 @@ def __init__(__self__,
         See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
 
         ## Example Usage
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        type = config.get("type")
-        if type is None:
-            type = "public_ipv4"
-        quantity = config.get_int("quantity")
-        if quantity is None:
-            quantity = 1
-        ip_block = equinix.metal.ReservedIpBlock("ipBlock",
+        two_elastic_addresses = equinix.metal.ReservedIpBlock("twoElasticAddresses",
             project_id=project_id,
-            type="public_ipv4",
-            quantity=quantity,
-            metro=metro)
-        pulumi.export("ipBlockId", ip_block.id)
-        pulumi.export("ipBlockSubent", ip_block.cidr_notation)
+            metro="sv",
+            quantity=2)
+        test1 = equinix.metal.ReservedIpBlock("test1",
+            project_id=project_id,
+            type=equinix.metal.IpBlockType.PUBLIC_I_PV4,
+            metro="sv",
+            quantity=1)
+        test = equinix.metal.ReservedIpBlock("test",
+            project_id=project_id,
+            type=equinix.metal.IpBlockType.GLOBAL_I_PV4,
+            quantity=1)
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        example = equinix.metal.ReservedIpBlock("example",
+            project_id=project_id,
+            metro="sv",
+            quantity=2)
+        nodes = equinix.metal.Device("nodes",
+            project_id=project_id,
+            metro="sv",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            hostname="test",
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            ip_addresses=[
+                equinix.metal.DeviceIpAddressArgs(
+                    type="public_ipv4",
+                    cidr=31,
+                    reservation_ids=[example.id],
+                ),
+                equinix.metal.DeviceIpAddressArgs(
+                    type="private_ipv4",
+                ),
+            ])
         ```
 
         ## Import
@@ -629,28 +652,51 @@ def __init__(__self__,
         See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
 
         ## Example Usage
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        type = config.get("type")
-        if type is None:
-            type = "public_ipv4"
-        quantity = config.get_int("quantity")
-        if quantity is None:
-            quantity = 1
-        ip_block = equinix.metal.ReservedIpBlock("ipBlock",
+        two_elastic_addresses = equinix.metal.ReservedIpBlock("twoElasticAddresses",
+            project_id=project_id,
+            metro="sv",
+            quantity=2)
+        test1 = equinix.metal.ReservedIpBlock("test1",
+            project_id=project_id,
+            type=equinix.metal.IpBlockType.PUBLIC_I_PV4,
+            metro="sv",
+            quantity=1)
+        test = equinix.metal.ReservedIpBlock("test",
+            project_id=project_id,
+            type=equinix.metal.IpBlockType.GLOBAL_I_PV4,
+            quantity=1)
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        example = equinix.metal.ReservedIpBlock("example",
+            project_id=project_id,
+            metro="sv",
+            quantity=2)
+        nodes = equinix.metal.Device("nodes",
             project_id=project_id,
-            type="public_ipv4",
-            quantity=quantity,
-            metro=metro)
-        pulumi.export("ipBlockId", ip_block.id)
-        pulumi.export("ipBlockSubent", ip_block.cidr_notation)
+            metro="sv",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            hostname="test",
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            ip_addresses=[
+                equinix.metal.DeviceIpAddressArgs(
+                    type="public_ipv4",
+                    cidr=31,
+                    reservation_ids=[example.id],
+                ),
+                equinix.metal.DeviceIpAddressArgs(
+                    type="private_ipv4",
+                ),
+            ])
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/spot_market_request.py b/sdk/python/pulumi_equinix/metal/spot_market_request.py
index bc244072..6b3aca48 100644
--- a/sdk/python/pulumi_equinix/metal/spot_market_request.py
+++ b/sdk/python/pulumi_equinix/metal/spot_market_request.py
@@ -310,15 +310,10 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        request = equinix.metal.SpotMarketRequest("request",
+        req = equinix.metal.SpotMarketRequest("req",
             project_id=project_id,
-            metro=metro,
-            max_bid_price=0.75,
+            max_bid_price=0.03,
+            metro="ny",
             devices_min=1,
             devices_max=1,
             instance_parameters=equinix.metal.SpotMarketRequestInstanceParametersArgs(
@@ -327,7 +322,6 @@ def __init__(__self__,
                 operating_system="ubuntu_20_04",
                 plan="c3.small.x86",
             ))
-        pulumi.export("requestId", request.id)
         ```
 
         ## Import
@@ -363,15 +357,10 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "FR"
-        request = equinix.metal.SpotMarketRequest("request",
+        req = equinix.metal.SpotMarketRequest("req",
             project_id=project_id,
-            metro=metro,
-            max_bid_price=0.75,
+            max_bid_price=0.03,
+            metro="ny",
             devices_min=1,
             devices_max=1,
             instance_parameters=equinix.metal.SpotMarketRequestInstanceParametersArgs(
@@ -380,7 +369,6 @@ def __init__(__self__,
                 operating_system="ubuntu_20_04",
                 plan="c3.small.x86",
             ))
-        pulumi.export("requestId", request.id)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/ssh_key.py b/sdk/python/pulumi_equinix/metal/ssh_key.py
index 3bd46c41..6a029fe7 100644
--- a/sdk/python/pulumi_equinix/metal/ssh_key.py
+++ b/sdk/python/pulumi_equinix/metal/ssh_key.py
@@ -171,11 +171,19 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
-
-        ssh_key = equinix.metal.SshKey("sshKey",
-            name="johnKent",
-            public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub"))
-        pulumi.export("sshKeyId", ssh_key.id)
+        import pulumi_std as std
+
+        key1 = equinix.metal.SshKey("key1",
+            name="terraform-1",
+            public_key=std.file_output(input="/home/terraform/.ssh/id_rsa.pub").apply(lambda invoke: invoke.result))
+        test = equinix.metal.Device("test",
+            hostname="test-device",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="sv",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            opts = pulumi.ResourceOptions(depends_on=[key1]))
         ```
 
         ## Import
@@ -206,11 +214,19 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
-
-        ssh_key = equinix.metal.SshKey("sshKey",
-            name="johnKent",
-            public_key=(lambda path: open(path).read())("/Users/John/.ssh/metal_rsa.pub"))
-        pulumi.export("sshKeyId", ssh_key.id)
+        import pulumi_std as std
+
+        key1 = equinix.metal.SshKey("key1",
+            name="terraform-1",
+            public_key=std.file_output(input="/home/terraform/.ssh/id_rsa.pub").apply(lambda invoke: invoke.result))
+        test = equinix.metal.Device("test",
+            hostname="test-device",
+            plan=equinix.metal.Plan.C3_SMALL_X86,
+            metro="sv",
+            operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
+            billing_cycle=equinix.metal.BillingCycle.HOURLY,
+            project_id=project_id,
+            opts = pulumi.ResourceOptions(depends_on=[key1]))
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/user_api_key.py b/sdk/python/pulumi_equinix/metal/user_api_key.py
index f8076182..45e93955 100644
--- a/sdk/python/pulumi_equinix/metal/user_api_key.py
+++ b/sdk/python/pulumi_equinix/metal/user_api_key.py
@@ -143,17 +143,9 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        description = config.get("description")
-        if description is None:
-            description = "An user level API Key"
-        read_only = config.get_bool("readOnly")
-        if read_only is None:
-            read_only = False
-        api_key = equinix.metal.UserApiKey("apiKey",
-            description=description,
-            read_only=read_only)
-        pulumi.export("apiKeyToken", api_key.token)
+        test = equinix.metal.UserApiKey("test",
+            description="Read-only user key",
+            read_only=True)
         ```
 
         :param str resource_name: The name of the resource.
@@ -178,17 +170,9 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        description = config.get("description")
-        if description is None:
-            description = "An user level API Key"
-        read_only = config.get_bool("readOnly")
-        if read_only is None:
-            read_only = False
-        api_key = equinix.metal.UserApiKey("apiKey",
-            description=description,
-            read_only=read_only)
-        pulumi.export("apiKeyToken", api_key.token)
+        test = equinix.metal.UserApiKey("test",
+            description="Read-only user key",
+            read_only=True)
         ```
 
         :param str resource_name: The name of the resource.
diff --git a/sdk/python/pulumi_equinix/metal/virtual_circuit.py b/sdk/python/pulumi_equinix/metal/virtual_circuit.py
index b9b09b6d..c323d6f5 100644
--- a/sdk/python/pulumi_equinix/metal/virtual_circuit.py
+++ b/sdk/python/pulumi_equinix/metal/virtual_circuit.py
@@ -591,19 +591,18 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        connection_id = config.require("connectionId")
-        vlan_id = config.require("vlanId")
-        port_id = equinix.metal.get_interconnection(connection_id=connection_id).ports[0].id
-        vc = equinix.metal.VirtualCircuit("vc",
-            connection_id=connection_id,
+        project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c"
+        conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0"
+        test = equinix.metal.get_interconnection_output(connection_id=conn_id)
+        test_vlan = equinix.metal.Vlan("testVlan",
             project_id=project_id,
-            port_id=port_id,
-            vlan_id=vlan_id,
+            metro=test.metro)
+        test_virtual_circuit = equinix.metal.VirtualCircuit("testVirtualCircuit",
+            connection_id=conn_id,
+            project_id=project_id,
+            port_id=test.ports[0].id,
+            vlan_id=test_vlan.id,
             nni_vlan=1056)
-        pulumi.export("vcStatus", vc.status)
-        pulumi.export("vcVnid", vc.vnid)
         ```
 
         ## Import
@@ -650,19 +649,18 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        connection_id = config.require("connectionId")
-        vlan_id = config.require("vlanId")
-        port_id = equinix.metal.get_interconnection(connection_id=connection_id).ports[0].id
-        vc = equinix.metal.VirtualCircuit("vc",
-            connection_id=connection_id,
+        project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c"
+        conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0"
+        test = equinix.metal.get_interconnection_output(connection_id=conn_id)
+        test_vlan = equinix.metal.Vlan("testVlan",
+            project_id=project_id,
+            metro=test.metro)
+        test_virtual_circuit = equinix.metal.VirtualCircuit("testVirtualCircuit",
+            connection_id=conn_id,
             project_id=project_id,
-            port_id=port_id,
-            vlan_id=vlan_id,
+            port_id=test.ports[0].id,
+            vlan_id=test_vlan.id,
             nni_vlan=1056)
-        pulumi.export("vcStatus", vc.status)
-        pulumi.export("vcVnid", vc.vnid)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/vlan.py b/sdk/python/pulumi_equinix/metal/vlan.py
index b1ae7d44..80105773 100644
--- a/sdk/python/pulumi_equinix/metal/vlan.py
+++ b/sdk/python/pulumi_equinix/metal/vlan.py
@@ -219,18 +219,11 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "DA"
-        vxlan = config.require_int("vxlan")
-        vlan = equinix.metal.Vlan("vlan",
-            description="VLAN in Dallas",
+        vlan1 = equinix.metal.Vlan("vlan1",
+            description="VLAN in New Jersey",
+            metro="sv",
             project_id=project_id,
-            metro=metro,
-            vxlan=vxlan)
-        pulumi.export("vlanId", vlan.id)
+            vxlan=1040)
         ```
 
         ## Import
@@ -268,18 +261,11 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "DA"
-        vxlan = config.require_int("vxlan")
-        vlan = equinix.metal.Vlan("vlan",
-            description="VLAN in Dallas",
+        vlan1 = equinix.metal.Vlan("vlan1",
+            description="VLAN in New Jersey",
+            metro="sv",
             project_id=project_id,
-            metro=metro,
-            vxlan=vxlan)
-        pulumi.export("vlanId", vlan.id)
+            vxlan=1040)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/metal/vrf.py b/sdk/python/pulumi_equinix/metal/vrf.py
index 6b7ad0b6..067d9b9a 100644
--- a/sdk/python/pulumi_equinix/metal/vrf.py
+++ b/sdk/python/pulumi_equinix/metal/vrf.py
@@ -235,26 +235,62 @@ def __init__(__self__,
         See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
 
         ## Example Usage
+        ### example 2
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "DA"
-        vrf = equinix.metal.Vrf("vrf",
-            description="VRF with ASN 65000 and a pool of address space",
+        example = equinix.metal.ReservedIpBlock("example",
+            description="Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.",
+            project_id=example_equinix_metal_project["id"],
+            metro=example_equinix_metal_vrf["metro"],
+            type="vrf",
+            vrf_id=example_equinix_metal_vrf["id"],
+            cidr=29,
+            network="192.168.100.0")
+        example_vlan = equinix.metal.Vlan("exampleVlan",
+            description="A VLAN for Layer2 and Hybrid Metal devices",
+            metro=example_equinix_metal_vrf["metro"],
+            project_id=example_equinix_metal_project["id"])
+        example_gateway = equinix.metal.Gateway("exampleGateway",
+            project_id=example_equinix_metal_project["id"],
+            vlan_id=example_vlan.id,
+            ip_reservation_id=example.id)
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        example = equinix.metal.Project("example", name="example")
+        example_vrf = equinix.metal.Vrf("exampleVrf",
+            description="VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25",
             name="example-vrf",
-            metro=metro,
+            metro="da",
             local_asn=65000,
             ip_ranges=[
                 "192.168.100.0/25",
                 "192.168.200.0/25",
             ],
-            project_id=project_id)
-        pulumi.export("vrfId", vrf.id)
+            project_id=example.id)
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        example_virtual_circuit = equinix.metal.VirtualCircuit("exampleVirtualCircuit",
+            name="example-vc",
+            description="Virtual Circuit",
+            connection_id=example["id"],
+            project_id=example_equinix_metal_project["id"],
+            port_id=example["ports"][0]["id"],
+            nni_vlan=1024,
+            vrf_id=example_equinix_metal_vrf["id"],
+            peer_asn=65530,
+            subnet="192.168.100.16/31",
+            metal_ip="192.168.100.16",
+            customer_ip="192.168.100.17")
         ```
 
         ## Import
@@ -286,26 +322,62 @@ def __init__(__self__,
         See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
 
         ## Example Usage
+        ### example 2
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        project_id = config.require("projectId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "DA"
-        vrf = equinix.metal.Vrf("vrf",
-            description="VRF with ASN 65000 and a pool of address space",
+        example = equinix.metal.ReservedIpBlock("example",
+            description="Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space.",
+            project_id=example_equinix_metal_project["id"],
+            metro=example_equinix_metal_vrf["metro"],
+            type="vrf",
+            vrf_id=example_equinix_metal_vrf["id"],
+            cidr=29,
+            network="192.168.100.0")
+        example_vlan = equinix.metal.Vlan("exampleVlan",
+            description="A VLAN for Layer2 and Hybrid Metal devices",
+            metro=example_equinix_metal_vrf["metro"],
+            project_id=example_equinix_metal_project["id"])
+        example_gateway = equinix.metal.Gateway("exampleGateway",
+            project_id=example_equinix_metal_project["id"],
+            vlan_id=example_vlan.id,
+            ip_reservation_id=example.id)
+        ```
+        ### example 1
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        example = equinix.metal.Project("example", name="example")
+        example_vrf = equinix.metal.Vrf("exampleVrf",
+            description="VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25",
             name="example-vrf",
-            metro=metro,
+            metro="da",
             local_asn=65000,
             ip_ranges=[
                 "192.168.100.0/25",
                 "192.168.200.0/25",
             ],
-            project_id=project_id)
-        pulumi.export("vrfId", vrf.id)
+            project_id=example.id)
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        example_virtual_circuit = equinix.metal.VirtualCircuit("exampleVirtualCircuit",
+            name="example-vc",
+            description="Virtual Circuit",
+            connection_id=example["id"],
+            project_id=example_equinix_metal_project["id"],
+            port_id=example["ports"][0]["id"],
+            nni_vlan=1024,
+            vrf_id=example_equinix_metal_vrf["id"],
+            peer_asn=65530,
+            subnet="192.168.100.16/31",
+            metal_ip="192.168.100.16",
+            customer_ip="192.168.100.17")
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/networkedge/acl_template.py b/sdk/python/pulumi_equinix/networkedge/acl_template.py
index 087fd07f..06d2fd18 100644
--- a/sdk/python/pulumi_equinix/networkedge/acl_template.py
+++ b/sdk/python/pulumi_equinix/networkedge/acl_template.py
@@ -294,26 +294,25 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        acl_template = equinix.networkedge.AclTemplate("aclTemplate",
+        myacl = equinix.networkedge.AclTemplate("myacl",
             name="test",
             description="Test ACL template",
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b",
             inbound_rules=[
                 equinix.networkedge.AclTemplateInboundRuleArgs(
                     subnet="1.1.1.1/32",
-                    protocol="IP",
+                    protocol=equinix.networkedge.AclRuleProtocolType.IP,
                     src_port="any",
                     dst_port="any",
                     description="inbound rule description",
                 ),
                 equinix.networkedge.AclTemplateInboundRuleArgs(
-                    subnet="2.2.2.2/28",
-                    protocol="TCP",
+                    subnet="172.16.25.0/24",
+                    protocol=equinix.networkedge.AclRuleProtocolType.UDP,
                     src_port="any",
-                    dst_port="any",
-                    description="inbound rule description",
+                    dst_port="53,1045,2041",
                 ),
             ])
-        pulumi.export("templateId", acl_template.id)
         ```
 
         ## Import
@@ -350,26 +349,25 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        acl_template = equinix.networkedge.AclTemplate("aclTemplate",
+        myacl = equinix.networkedge.AclTemplate("myacl",
             name="test",
             description="Test ACL template",
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b",
             inbound_rules=[
                 equinix.networkedge.AclTemplateInboundRuleArgs(
                     subnet="1.1.1.1/32",
-                    protocol="IP",
+                    protocol=equinix.networkedge.AclRuleProtocolType.IP,
                     src_port="any",
                     dst_port="any",
                     description="inbound rule description",
                 ),
                 equinix.networkedge.AclTemplateInboundRuleArgs(
-                    subnet="2.2.2.2/28",
-                    protocol="TCP",
+                    subnet="172.16.25.0/24",
+                    protocol=equinix.networkedge.AclRuleProtocolType.UDP,
                     src_port="any",
-                    dst_port="any",
-                    description="inbound rule description",
+                    dst_port="53,1045,2041",
                 ),
             ])
-        pulumi.export("templateId", acl_template.id)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/networkedge/bgp.py b/sdk/python/pulumi_equinix/networkedge/bgp.py
index f151ed10..f1e387ec 100644
--- a/sdk/python/pulumi_equinix/networkedge/bgp.py
+++ b/sdk/python/pulumi_equinix/networkedge/bgp.py
@@ -298,15 +298,13 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        bgp = equinix.networkedge.Bgp("bgp",
+        test = equinix.networkedge.Bgp("test",
             connection_id="54014acf-9730-4b55-a791-459283d05fb1",
             local_ip_address="10.1.1.1/30",
             local_asn=12345,
             remote_ip_address="10.1.1.2",
             remote_asn=66123,
             authentication_key="secret")
-        pulumi.export("state", bgp.state)
-        pulumi.export("provisioningStatus", bgp.provisioning_status)
         ```
 
         ## Import
@@ -340,15 +338,13 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        bgp = equinix.networkedge.Bgp("bgp",
+        test = equinix.networkedge.Bgp("test",
             connection_id="54014acf-9730-4b55-a791-459283d05fb1",
             local_ip_address="10.1.1.1/30",
             local_asn=12345,
             remote_ip_address="10.1.1.2",
             remote_asn=66123,
             authentication_key="secret")
-        pulumi.export("state", bgp.state)
-        pulumi.export("provisioningStatus", bgp.provisioning_status)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/networkedge/device.py b/sdk/python/pulumi_equinix/networkedge/device.py
index 263d4ef6..7f4f0229 100644
--- a/sdk/python/pulumi_equinix/networkedge/device.py
+++ b/sdk/python/pulumi_equinix/networkedge/device.py
@@ -1310,60 +1310,315 @@ def __init__(__self__,
         * **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices.
 
         ## Example Usage
+        ### example 8
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+        import pulumi_std as std
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        bluecat_edge_service_point_cloudinit_primary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile",
+            file_name="TF-BLUECAT-ESP-cloud-init-file.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),
+            device_type_code="BLUECAT-EDGE-SERVICE-POINT",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
+            self_managed=True,
+            byol=True)
+        bluecat_edge_service_point_cloudinit_secondary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile",
+            file_name="TF-BLUECAT-ESP-cloud-init-file.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),
+            device_type_code="BLUECAT-EDGE-SERVICE-POINT",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
+            self_managed=True,
+            byol=True)
+        bluecat_edge_service_point_ha = equinix.networkedge.Device("bluecatEdgeServicePointHa",
+            name="tf-bluecat-edge-service-point-p",
+            metro_code=sv.metro_code,
+            type_code="BLUECAT-EDGE-SERVICE-POINT",
+            self_managed=True,
+            connectivity="PRIVATE",
+            byol=True,
+            package_code="STD",
+            notifications=["test@equinix.com"],
+            account_number=sv.number,
+            cloud_init_file_id=bluecat_edge_service_point_cloudinit_primary_file.uuid,
+            version="4.6.3",
+            core_count=4,
+            term_length=12,
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-bluecat-edge-service-point-s",
+                metro_code=sv.metro_code,
+                notifications=["test@eq.com"],
+                account_number=sv.number,
+                cloud_init_file_id=bluecat_edge_service_point_cloudinit_secondary_file.uuid,
+            ))
+        ```
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        account_name = config.require("accountName")
-        license_token = config.require("licenseToken")
-        ssh_user_name = config.require("sshUserName")
-        ssh_key_name = config.require("sshKeyName")
-        acl_template_id = config.require("aclTemplateId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "SV"
-        device_package_code = config.get("devicePackageCode")
-        if device_package_code is None:
-            device_package_code = "network-essentials"
-        device_version = config.get("deviceVersion")
-        if device_version is None:
-            device_version = "17.06.01a"
-        size_in_cores = config.get_int("sizeInCores")
-        if size_in_cores is None:
-            size_in_cores = 2
-        term_length = config.get_int("termLength")
-        if term_length is None:
-            term_length = 6
-        additional_bandwidth = config.get_int("additionalBandwidth")
-        if additional_bandwidth is None:
-            additional_bandwidth = 5
-        account_num = equinix.networkedge.get_account(name=account_name,
-            metro_code=metro).number
-        c8_k_router = equinix.networkedge.Device("c8kRouter",
-            name="catalystRouter",
-            metro_code=metro,
+        dc = equinix.networkedge.get_account_output(metro_code="DC")
+        sv = equinix.networkedge.get_account_output(metro_code="SV")
+        csr1000_v_ha = equinix.networkedge.Device("csr1000vHa",
+            name="tf-csr1000v-p",
+            throughput=500,
+            throughput_unit=equinix.networkedge.ThroughputUnit.MBPS,
+            metro_code=dc.metro_code,
+            type_code="CSR1000V",
+            self_managed=False,
+            connectivity="INTERNET-ACCESS",
+            byol=False,
+            package_code="SEC",
+            notifications=[
+                "john@equinix.com",
+                "marry@equinix.com",
+                "fred@equinix.com",
+            ],
+            hostname="csr1000v-p",
+            term_length=12,
+            account_number=dc.number,
+            version="16.09.05",
+            core_count=2,
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-csr1000v-s",
+                metro_code=sv.metro_code,
+                hostname="csr1000v-s",
+                notifications=[
+                    "john@equinix.com",
+                    "marry@equinix.com",
+                ],
+                account_number=sv.number,
+            ))
+        ```
+        ### example 4
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        c8_kv_single = equinix.networkedge.Device("c8kvSingle",
+            name="tf-c8kv",
+            metro_code=sv.metro_code,
             type_code="C8000V",
             self_managed=True,
             byol=True,
-            package_code=device_package_code,
-            notifications=["example@equinix.com"],
+            package_code="network-essentials",
+            notifications=["test@equinix.com"],
             hostname="C8KV",
-            account_number=account_num,
-            version=device_version,
-            core_count=size_in_cores,
-            term_length=term_length,
-            license_token=license_token,
-            additional_bandwidth=additional_bandwidth,
+            account_number=sv.number,
+            version="17.06.01a",
+            core_count=2,
+            term_length=12,
+            license_token="valid-license-token",
+            additional_bandwidth=5,
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test-username",
+                key_name="valid-key-name",
+            ),
+            acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c")
+        ```
+        ### example 7
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        test_public_key = equinix.networkedge.SshKey("testPublicKey",
+            name="key-name",
+            public_key="ssh-dss key-value",
+            type="DSA")
+        bluecat_bdds_ha = equinix.networkedge.Device("bluecatBddsHa",
+            name="tf-bluecat-bdds-p",
+            metro_code=sv.metro_code,
+            type_code="BLUECAT",
+            self_managed=True,
+            connectivity="PRIVATE",
+            byol=True,
+            package_code="STD",
+            notifications=["test@equinix.com"],
+            account_number=sv.number,
+            version="9.6.0",
+            core_count=2,
+            term_length=12,
+            vendor_configuration={
+                "hostname": "test",
+                "privateAddress": "x.x.x.x",
+                "privateCidrMask": "24",
+                "privateGateway": "x.x.x.x",
+                "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx",
+                "licenseId": "xxxxxxxxxxxxxxx",
+            },
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test-username",
+                key_name=test_public_key.name,
+            ),
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-bluecat-bdds-s",
+                metro_code=sv.metro_code,
+                notifications=["test@eq.com"],
+                account_number=sv.number,
+                vendor_configuration={
+                    "hostname": "test",
+                    "privateAddress": "x.x.x.x",
+                    "privateCidrMask": "24",
+                    "privateGateway": "x.x.x.x",
+                    "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx",
+                    "licenseId": "xxxxxxxxxxxxxxx",
+                },
+            ))
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(metro_code="SV")
+        panw_cluster = equinix.networkedge.Device("panwCluster",
+            name="tf-panw",
+            metro_code=sv.metro_code,
+            type_code="PA-VM",
+            self_managed=True,
+            byol=True,
+            package_code="VM100",
+            notifications=[
+                "john@equinix.com",
+                "marry@equinix.com",
+                "fred@equinix.com",
+            ],
+            term_length=12,
+            account_number=sv.number,
+            version="10.1.3",
+            interface_count=10,
+            core_count=2,
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test",
+                key_name="test-key",
+            ),
+            acl_template_id="0bff6e05-f0e7-44cd-804a-25b92b835f8b",
+            cluster_details=equinix.networkedge.DeviceClusterDetailsArgs(
+                cluster_name="tf-panw-cluster",
+                node0=equinix.networkedge.DeviceClusterDetailsNode0Args(
+                    vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs(
+                        hostname="panw-node0",
+                    ),
+                    license_token="licenseToken",
+                ),
+                node1=equinix.networkedge.DeviceClusterDetailsNode1Args(
+                    vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs(
+                        hostname="panw-node1",
+                    ),
+                    license_token="licenseToken",
+                ),
+            ))
+        ```
+        ### example 5
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        vsrx_single = equinix.networkedge.Device("vsrxSingle",
+            name="tf-c8kv-sdwan",
+            metro_code=sv.metro_code,
+            type_code="VSRX",
+            self_managed=True,
+            byol=True,
+            package_code="STD",
+            notifications=["test@equinix.com"],
+            hostname="VSRX",
+            account_number=sv.number,
+            version="23.2R1.13",
+            core_count=2,
+            term_length=12,
+            additional_bandwidth=5,
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b",
+            diverse_device_id="ed7891bd-15b4-4f72-ac56-d96cfdacddcc",
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test-username",
+                key_name="valid-key-name",
+            ),
+            acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c")
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+        import pulumi_std as std
+
+        config = pulumi.Config()
+        filepath = config.get("filepath")
+        if filepath is None:
+            filepath = "cloudInitFileFolder/TF-AVX-cloud-init-file.txt"
+        sv = equinix.networkedge.get_account_output(metro_code="SV")
+        aviatrix_cloudinit_file = equinix.networkedge.NetworkFile("aviatrixCloudinitFile",
+            file_name="TF-AVX-cloud-init-file.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),
+            device_type_code="AVIATRIX_EDGE",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
+            self_managed=True,
+            byol=True)
+        aviatrix_single = equinix.networkedge.Device("aviatrixSingle",
+            name="tf-aviatrix",
+            metro_code=sv.metro_code,
+            type_code="AVIATRIX_EDGE",
+            self_managed=True,
+            byol=True,
+            package_code="STD",
+            notifications=["john@equinix.com"],
+            term_length=12,
+            account_number=sv.number,
+            version="6.9",
+            core_count=2,
+            cloud_init_file_id=aviatrix_cloudinit_file.uuid,
+            acl_template_id="c06150ea-b604-4ad1-832a-d63936e9b938")
+        ```
+        ### example 6
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        test_public_key = equinix.networkedge.SshKey("testPublicKey",
+            name="key-name",
+            public_key="ssh-dss key-value",
+            type="DSA")
+        arista_ha = equinix.networkedge.Device("aristaHa",
+            name="tf-arista-p",
+            metro_code=sv.metro_code,
+            type_code="ARISTA-ROUTER",
+            self_managed=True,
+            connectivity="PRIVATE",
+            byol=True,
+            package_code="CloudEOS",
+            notifications=["test@equinix.com"],
+            hostname="arista-p",
+            account_number=sv.number,
+            version="4.29.0",
+            core_count=4,
+            term_length=12,
+            additional_bandwidth=5,
             ssh_key=equinix.networkedge.DeviceSshKeyArgs(
-                username=ssh_user_name,
-                key_name=ssh_key_name,
+                username="test-username",
+                key_name=test_public_key.name,
             ),
-            acl_template_id=acl_template_id)
-        pulumi.export("routerId", c8_k_router.id)
-        pulumi.export("provisionStatus", c8_k_router.status)
-        pulumi.export("licenseStatus", c8_k_router.license_status)
-        pulumi.export("sshIpAddress", c8_k_router.ssh_ip_address)
+            acl_template_id="c637a17b-7a6a-4486-924b-30e6c36904b0",
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-arista-s",
+                metro_code=sv.metro_code,
+                hostname="arista-s",
+                notifications=["test@eq.com"],
+                account_number=sv.number,
+                acl_template_id="fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138",
+            ))
         ```
 
         ## Import
@@ -1432,60 +1687,315 @@ def __init__(__self__,
         * **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices.
 
         ## Example Usage
+        ### example 8
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+        import pulumi_std as std
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        bluecat_edge_service_point_cloudinit_primary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitPrimaryFile",
+            file_name="TF-BLUECAT-ESP-cloud-init-file.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),
+            device_type_code="BLUECAT-EDGE-SERVICE-POINT",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
+            self_managed=True,
+            byol=True)
+        bluecat_edge_service_point_cloudinit_secondary_file = equinix.networkedge.NetworkFile("bluecatEdgeServicePointCloudinitSecondaryFile",
+            file_name="TF-BLUECAT-ESP-cloud-init-file.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),
+            device_type_code="BLUECAT-EDGE-SERVICE-POINT",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
+            self_managed=True,
+            byol=True)
+        bluecat_edge_service_point_ha = equinix.networkedge.Device("bluecatEdgeServicePointHa",
+            name="tf-bluecat-edge-service-point-p",
+            metro_code=sv.metro_code,
+            type_code="BLUECAT-EDGE-SERVICE-POINT",
+            self_managed=True,
+            connectivity="PRIVATE",
+            byol=True,
+            package_code="STD",
+            notifications=["test@equinix.com"],
+            account_number=sv.number,
+            cloud_init_file_id=bluecat_edge_service_point_cloudinit_primary_file.uuid,
+            version="4.6.3",
+            core_count=4,
+            term_length=12,
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-bluecat-edge-service-point-s",
+                metro_code=sv.metro_code,
+                notifications=["test@eq.com"],
+                account_number=sv.number,
+                cloud_init_file_id=bluecat_edge_service_point_cloudinit_secondary_file.uuid,
+            ))
+        ```
+        ### example 1
         ```python
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        account_name = config.require("accountName")
-        license_token = config.require("licenseToken")
-        ssh_user_name = config.require("sshUserName")
-        ssh_key_name = config.require("sshKeyName")
-        acl_template_id = config.require("aclTemplateId")
-        metro = config.get("metro")
-        if metro is None:
-            metro = "SV"
-        device_package_code = config.get("devicePackageCode")
-        if device_package_code is None:
-            device_package_code = "network-essentials"
-        device_version = config.get("deviceVersion")
-        if device_version is None:
-            device_version = "17.06.01a"
-        size_in_cores = config.get_int("sizeInCores")
-        if size_in_cores is None:
-            size_in_cores = 2
-        term_length = config.get_int("termLength")
-        if term_length is None:
-            term_length = 6
-        additional_bandwidth = config.get_int("additionalBandwidth")
-        if additional_bandwidth is None:
-            additional_bandwidth = 5
-        account_num = equinix.networkedge.get_account(name=account_name,
-            metro_code=metro).number
-        c8_k_router = equinix.networkedge.Device("c8kRouter",
-            name="catalystRouter",
-            metro_code=metro,
+        dc = equinix.networkedge.get_account_output(metro_code="DC")
+        sv = equinix.networkedge.get_account_output(metro_code="SV")
+        csr1000_v_ha = equinix.networkedge.Device("csr1000vHa",
+            name="tf-csr1000v-p",
+            throughput=500,
+            throughput_unit=equinix.networkedge.ThroughputUnit.MBPS,
+            metro_code=dc.metro_code,
+            type_code="CSR1000V",
+            self_managed=False,
+            connectivity="INTERNET-ACCESS",
+            byol=False,
+            package_code="SEC",
+            notifications=[
+                "john@equinix.com",
+                "marry@equinix.com",
+                "fred@equinix.com",
+            ],
+            hostname="csr1000v-p",
+            term_length=12,
+            account_number=dc.number,
+            version="16.09.05",
+            core_count=2,
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-csr1000v-s",
+                metro_code=sv.metro_code,
+                hostname="csr1000v-s",
+                notifications=[
+                    "john@equinix.com",
+                    "marry@equinix.com",
+                ],
+                account_number=sv.number,
+            ))
+        ```
+        ### example 4
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        c8_kv_single = equinix.networkedge.Device("c8kvSingle",
+            name="tf-c8kv",
+            metro_code=sv.metro_code,
             type_code="C8000V",
             self_managed=True,
             byol=True,
-            package_code=device_package_code,
-            notifications=["example@equinix.com"],
+            package_code="network-essentials",
+            notifications=["test@equinix.com"],
             hostname="C8KV",
-            account_number=account_num,
-            version=device_version,
-            core_count=size_in_cores,
-            term_length=term_length,
-            license_token=license_token,
-            additional_bandwidth=additional_bandwidth,
+            account_number=sv.number,
+            version="17.06.01a",
+            core_count=2,
+            term_length=12,
+            license_token="valid-license-token",
+            additional_bandwidth=5,
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test-username",
+                key_name="valid-key-name",
+            ),
+            acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c")
+        ```
+        ### example 7
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        test_public_key = equinix.networkedge.SshKey("testPublicKey",
+            name="key-name",
+            public_key="ssh-dss key-value",
+            type="DSA")
+        bluecat_bdds_ha = equinix.networkedge.Device("bluecatBddsHa",
+            name="tf-bluecat-bdds-p",
+            metro_code=sv.metro_code,
+            type_code="BLUECAT",
+            self_managed=True,
+            connectivity="PRIVATE",
+            byol=True,
+            package_code="STD",
+            notifications=["test@equinix.com"],
+            account_number=sv.number,
+            version="9.6.0",
+            core_count=2,
+            term_length=12,
+            vendor_configuration={
+                "hostname": "test",
+                "privateAddress": "x.x.x.x",
+                "privateCidrMask": "24",
+                "privateGateway": "x.x.x.x",
+                "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx",
+                "licenseId": "xxxxxxxxxxxxxxx",
+            },
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test-username",
+                key_name=test_public_key.name,
+            ),
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-bluecat-bdds-s",
+                metro_code=sv.metro_code,
+                notifications=["test@eq.com"],
+                account_number=sv.number,
+                vendor_configuration={
+                    "hostname": "test",
+                    "privateAddress": "x.x.x.x",
+                    "privateCidrMask": "24",
+                    "privateGateway": "x.x.x.x",
+                    "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx",
+                    "licenseId": "xxxxxxxxxxxxxxx",
+                },
+            ))
+        ```
+        ### example 2
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(metro_code="SV")
+        panw_cluster = equinix.networkedge.Device("panwCluster",
+            name="tf-panw",
+            metro_code=sv.metro_code,
+            type_code="PA-VM",
+            self_managed=True,
+            byol=True,
+            package_code="VM100",
+            notifications=[
+                "john@equinix.com",
+                "marry@equinix.com",
+                "fred@equinix.com",
+            ],
+            term_length=12,
+            account_number=sv.number,
+            version="10.1.3",
+            interface_count=10,
+            core_count=2,
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test",
+                key_name="test-key",
+            ),
+            acl_template_id="0bff6e05-f0e7-44cd-804a-25b92b835f8b",
+            cluster_details=equinix.networkedge.DeviceClusterDetailsArgs(
+                cluster_name="tf-panw-cluster",
+                node0=equinix.networkedge.DeviceClusterDetailsNode0Args(
+                    vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode0VendorConfigurationArgs(
+                        hostname="panw-node0",
+                    ),
+                    license_token="licenseToken",
+                ),
+                node1=equinix.networkedge.DeviceClusterDetailsNode1Args(
+                    vendor_configuration=equinix.networkedge.DeviceClusterDetailsNode1VendorConfigurationArgs(
+                        hostname="panw-node1",
+                    ),
+                    license_token="licenseToken",
+                ),
+            ))
+        ```
+        ### example 5
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        vsrx_single = equinix.networkedge.Device("vsrxSingle",
+            name="tf-c8kv-sdwan",
+            metro_code=sv.metro_code,
+            type_code="VSRX",
+            self_managed=True,
+            byol=True,
+            package_code="STD",
+            notifications=["test@equinix.com"],
+            hostname="VSRX",
+            account_number=sv.number,
+            version="23.2R1.13",
+            core_count=2,
+            term_length=12,
+            additional_bandwidth=5,
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b",
+            diverse_device_id="ed7891bd-15b4-4f72-ac56-d96cfdacddcc",
+            ssh_key=equinix.networkedge.DeviceSshKeyArgs(
+                username="test-username",
+                key_name="valid-key-name",
+            ),
+            acl_template_id="3e548c02-9164-4197-aa23-05b1f644883c")
+        ```
+        ### example 3
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+        import pulumi_std as std
+
+        config = pulumi.Config()
+        filepath = config.get("filepath")
+        if filepath is None:
+            filepath = "cloudInitFileFolder/TF-AVX-cloud-init-file.txt"
+        sv = equinix.networkedge.get_account_output(metro_code="SV")
+        aviatrix_cloudinit_file = equinix.networkedge.NetworkFile("aviatrixCloudinitFile",
+            file_name="TF-AVX-cloud-init-file.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=sv.metro_code.apply(lambda x: equinix.Metro(x)),
+            device_type_code="AVIATRIX_EDGE",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
+            self_managed=True,
+            byol=True)
+        aviatrix_single = equinix.networkedge.Device("aviatrixSingle",
+            name="tf-aviatrix",
+            metro_code=sv.metro_code,
+            type_code="AVIATRIX_EDGE",
+            self_managed=True,
+            byol=True,
+            package_code="STD",
+            notifications=["john@equinix.com"],
+            term_length=12,
+            account_number=sv.number,
+            version="6.9",
+            core_count=2,
+            cloud_init_file_id=aviatrix_cloudinit_file.uuid,
+            acl_template_id="c06150ea-b604-4ad1-832a-d63936e9b938")
+        ```
+        ### example 6
+        ```python
+        import pulumi
+        import pulumi_equinix as equinix
+
+        sv = equinix.networkedge.get_account_output(name="account-name",
+            metro_code="SV")
+        test_public_key = equinix.networkedge.SshKey("testPublicKey",
+            name="key-name",
+            public_key="ssh-dss key-value",
+            type="DSA")
+        arista_ha = equinix.networkedge.Device("aristaHa",
+            name="tf-arista-p",
+            metro_code=sv.metro_code,
+            type_code="ARISTA-ROUTER",
+            self_managed=True,
+            connectivity="PRIVATE",
+            byol=True,
+            package_code="CloudEOS",
+            notifications=["test@equinix.com"],
+            hostname="arista-p",
+            account_number=sv.number,
+            version="4.29.0",
+            core_count=4,
+            term_length=12,
+            additional_bandwidth=5,
             ssh_key=equinix.networkedge.DeviceSshKeyArgs(
-                username=ssh_user_name,
-                key_name=ssh_key_name,
+                username="test-username",
+                key_name=test_public_key.name,
             ),
-            acl_template_id=acl_template_id)
-        pulumi.export("routerId", c8_k_router.id)
-        pulumi.export("provisionStatus", c8_k_router.status)
-        pulumi.export("licenseStatus", c8_k_router.license_status)
-        pulumi.export("sshIpAddress", c8_k_router.ssh_ip_address)
+            acl_template_id="c637a17b-7a6a-4486-924b-30e6c36904b0",
+            secondary_device=equinix.networkedge.DeviceSecondaryDeviceArgs(
+                name="tf-arista-s",
+                metro_code=sv.metro_code,
+                hostname="arista-s",
+                notifications=["test@eq.com"],
+                account_number=sv.number,
+                acl_template_id="fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138",
+            ))
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/networkedge/device_link.py b/sdk/python/pulumi_equinix/networkedge/device_link.py
index f89ec6c4..7dbd54de 100644
--- a/sdk/python/pulumi_equinix/networkedge/device_link.py
+++ b/sdk/python/pulumi_equinix/networkedge/device_link.py
@@ -313,39 +313,29 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        account_name = config.require("accountName")
-        account_metro = config.require("accountMetro")
-        device1_id = config.require("device1Id")
-        device2_id = config.require("device2Id")
-        accountf_num = equinix.networkedge.get_account(name=account_name,
-            metro_code=account_metro).number
-        device1_metro = equinix.networkedge.get_device(uuid=device1_id).metro_code
-        device2_metro = equinix.networkedge.get_device(uuid=device2_id).metro_code
-        device_link = equinix.networkedge.DeviceLink("deviceLink",
+        test = equinix.networkedge.DeviceLink("test",
             name="test-link",
             subnet="192.168.40.64/27",
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b",
             devices=[
                 equinix.networkedge.DeviceLinkDeviceArgs(
-                    id="device1Id",
+                    id=test_equinix_network_device["uuid"],
                     asn=22111,
                     interface_id=6,
                 ),
                 equinix.networkedge.DeviceLinkDeviceArgs(
-                    id="device2Id",
+                    id=test_equinix_network_device["secondaryDevice"][0]["uuid"],
                     asn=22333,
                     interface_id=7,
                 ),
             ],
             links=[equinix.networkedge.DeviceLinkLinkArgs(
-                account_number=accountf_num,
-                src_metro_code=device1_metro,
-                dst_metro_code=device2_metro,
+                account_number=test_equinix_network_device["accountNumber"],
+                src_metro_code=test_equinix_network_device["metroCode"],
+                dst_metro_code=test_equinix_network_device["secondaryDevice"][0]["metroCode"],
                 throughput="50",
                 throughput_unit="Mbps",
             )])
-        pulumi.export("status", device_link.status)
-        pulumi.export("devices", device_link.devices)
         ```
 
         ## Import
@@ -380,39 +370,29 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        account_name = config.require("accountName")
-        account_metro = config.require("accountMetro")
-        device1_id = config.require("device1Id")
-        device2_id = config.require("device2Id")
-        accountf_num = equinix.networkedge.get_account(name=account_name,
-            metro_code=account_metro).number
-        device1_metro = equinix.networkedge.get_device(uuid=device1_id).metro_code
-        device2_metro = equinix.networkedge.get_device(uuid=device2_id).metro_code
-        device_link = equinix.networkedge.DeviceLink("deviceLink",
+        test = equinix.networkedge.DeviceLink("test",
             name="test-link",
             subnet="192.168.40.64/27",
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b",
             devices=[
                 equinix.networkedge.DeviceLinkDeviceArgs(
-                    id="device1Id",
+                    id=test_equinix_network_device["uuid"],
                     asn=22111,
                     interface_id=6,
                 ),
                 equinix.networkedge.DeviceLinkDeviceArgs(
-                    id="device2Id",
+                    id=test_equinix_network_device["secondaryDevice"][0]["uuid"],
                     asn=22333,
                     interface_id=7,
                 ),
             ],
             links=[equinix.networkedge.DeviceLinkLinkArgs(
-                account_number=accountf_num,
-                src_metro_code=device1_metro,
-                dst_metro_code=device2_metro,
+                account_number=test_equinix_network_device["accountNumber"],
+                src_metro_code=test_equinix_network_device["metroCode"],
+                dst_metro_code=test_equinix_network_device["secondaryDevice"][0]["metroCode"],
                 throughput="50",
                 throughput_unit="Mbps",
             )])
-        pulumi.export("status", device_link.status)
-        pulumi.export("devices", device_link.devices)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/networkedge/network_file.py b/sdk/python/pulumi_equinix/networkedge/network_file.py
index 6725faa9..004b8f60 100644
--- a/sdk/python/pulumi_equinix/networkedge/network_file.py
+++ b/sdk/python/pulumi_equinix/networkedge/network_file.py
@@ -298,21 +298,20 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
+        import pulumi_std as std
 
         config = pulumi.Config()
-        metro = config.get("metro")
-        if metro is None:
-            metro = "SV"
-        network_file = equinix.networkedge.NetworkFile("networkFile",
-            file_name="Aviatrix-ZTP-file",
-            content=(lambda path: open(path).read())("./../assets/aviatrix-cloud-init.txt"),
-            metro_code=metro,
+        filepath = config.get("filepath")
+        if filepath is None:
+            filepath = "fileFolder/fileName.txt"
+        test_file = equinix.networkedge.NetworkFile("test-file",
+            file_name="fileName.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=equinix.Metro.SILICON_VALLEY,
             device_type_code="AVIATRIX_EDGE",
-            process_type="CLOUD_INIT",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
             self_managed=True,
             byol=True)
-        pulumi.export("networkFileId", network_file.id)
-        pulumi.export("networkFileStatus", network_file.status)
         ```
 
         ## Import
@@ -348,21 +347,20 @@ def __init__(__self__,
         ```python
         import pulumi
         import pulumi_equinix as equinix
+        import pulumi_std as std
 
         config = pulumi.Config()
-        metro = config.get("metro")
-        if metro is None:
-            metro = "SV"
-        network_file = equinix.networkedge.NetworkFile("networkFile",
-            file_name="Aviatrix-ZTP-file",
-            content=(lambda path: open(path).read())("./../assets/aviatrix-cloud-init.txt"),
-            metro_code=metro,
+        filepath = config.get("filepath")
+        if filepath is None:
+            filepath = "fileFolder/fileName.txt"
+        test_file = equinix.networkedge.NetworkFile("test-file",
+            file_name="fileName.txt",
+            content=std.file_output(input=filepath).apply(lambda invoke: invoke.result),
+            metro_code=equinix.Metro.SILICON_VALLEY,
             device_type_code="AVIATRIX_EDGE",
-            process_type="CLOUD_INIT",
+            process_type=equinix.networkedge.FileType.CLOUD_INIT,
             self_managed=True,
             byol=True)
-        pulumi.export("networkFileId", network_file.id)
-        pulumi.export("networkFileStatus", network_file.status)
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/networkedge/ssh_key.py b/sdk/python/pulumi_equinix/networkedge/ssh_key.py
index 86ec9403..e59ab8ca 100644
--- a/sdk/python/pulumi_equinix/networkedge/ssh_key.py
+++ b/sdk/python/pulumi_equinix/networkedge/ssh_key.py
@@ -188,10 +188,21 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        ssh_key = equinix.networkedge.SshKey("sshKey",
+        john = equinix.networkedge.SshKey("john",
             name="johnKent",
-            public_key=(lambda path: open(path).read())("/Users/John/.ssh/ne_rsa.pub"))
-        pulumi.export("sshKeyId", ssh_key.id)
+            public_key=\"\"\"  ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX
+          2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu
+          iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS
+          qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl
+          mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N
+          w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM
+          8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5
+          SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW
+          WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F
+          jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com
+        \"\"\",
+            type="RSA",
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b")
         ```
 
         ## Import
@@ -223,10 +234,21 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        ssh_key = equinix.networkedge.SshKey("sshKey",
+        john = equinix.networkedge.SshKey("john",
             name="johnKent",
-            public_key=(lambda path: open(path).read())("/Users/John/.ssh/ne_rsa.pub"))
-        pulumi.export("sshKeyId", ssh_key.id)
+            public_key=\"\"\"  ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX
+          2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu
+          iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS
+          qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl
+          mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N
+          w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM
+          8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5
+          SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW
+          WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F
+          jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com
+        \"\"\",
+            type="RSA",
+            project_id="a86d7112-d740-4758-9c9c-31e66373746b")
         ```
 
         ## Import
diff --git a/sdk/python/pulumi_equinix/networkedge/ssh_user.py b/sdk/python/pulumi_equinix/networkedge/ssh_user.py
index f4530bee..db087f19 100644
--- a/sdk/python/pulumi_equinix/networkedge/ssh_user.py
+++ b/sdk/python/pulumi_equinix/networkedge/ssh_user.py
@@ -153,16 +153,13 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        device1_id = config.require("device1Id")
-        device2_id = config.require("device2Id")
-        ssh_user = equinix.networkedge.SshUser("sshUser",
-            username="johnKent",
+        john = equinix.networkedge.SshUser("john",
+            username="john",
+            password="secret",
             device_ids=[
-                device1_id,
-                device2_id,
+                "csr1000v-ha-uuid",
+                "csr1000v-ha-redundant-uuid",
             ])
-        pulumi.export("sshUserId", ssh_user.id)
         ```
 
         ## Import
@@ -193,16 +190,13 @@ def __init__(__self__,
         import pulumi
         import pulumi_equinix as equinix
 
-        config = pulumi.Config()
-        device1_id = config.require("device1Id")
-        device2_id = config.require("device2Id")
-        ssh_user = equinix.networkedge.SshUser("sshUser",
-            username="johnKent",
+        john = equinix.networkedge.SshUser("john",
+            username="john",
+            password="secret",
             device_ids=[
-                device1_id,
-                device2_id,
+                "csr1000v-ha-uuid",
+                "csr1000v-ha-redundant-uuid",
             ])
-        pulumi.export("sshUserId", ssh_user.id)
         ```
 
         ## Import