Skip to content

Commit

Permalink
Merge pull request #19 from equinix/sync_terraform_provider_1.18.0
Browse files Browse the repository at this point in the history
Sync terraform provider 1.18.0
  • Loading branch information
displague authored Oct 24, 2023
2 parents b5f6197 + b219ddd commit ba8962c
Show file tree
Hide file tree
Showing 817 changed files with 87,624 additions and 26,835 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && \
# See README.md

# Install go
ARG GO_VERSION=1.18.3
ARG GO_VERSION=1.21.3
RUN rm -rf /usr/local/go && \
wget -O ${GO_VERSION}.tar.gz https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf ${GO_VERSION}.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- v*.*.*
env:
DOTNETVERSION: 7.0.x
GOVERSION: 1.19.x
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODEVERSION: 16.x
PYTHONVERSION: "3.9"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
PROVIDER: equinix
PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }}
DOTNETVERSION: 7.0.x
GOVERSION: 1.20.x
GOVERSION: 1.21.x
JAVAVERSION: "11"
NODEVERSION: 20.x
PYTHONVERSION: "3.9"
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ build_nodejs:: install_plugins tfgen # build the node sdk
build_nodejs:: patch_nodejs # fix generated files
build_nodejs::
cd sdk/nodejs/ && \
printf "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
yarn install && \
yarn run tsc && \
cp -R scripts/ bin && \
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json

Expand All @@ -89,6 +89,7 @@ build_python:: PYPI_VERSION := $(shell pulumictl get version --language python)
build_python:: install_plugins tfgen # build the python sdk
$(WORKING_DIR)/bin/$(TFGEN) python --overlays provider/overlays/python --out sdk/python/
cd sdk/python/ && \
printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
cp ../../README.md . && \
python3 setup.py clean --all 2>/dev/null && \
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
Expand All @@ -101,6 +102,7 @@ build_dotnet:: install_plugins tfgen # build the dotnet sdk
pulumictl get version --language dotnet
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
cd sdk/dotnet/ && \
printf "module fake_dotnet_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
echo "${DOTNET_VERSION}" >version.txt && \
dotnet build /p:Version=${DOTNET_VERSION}

Expand All @@ -113,7 +115,7 @@ build_java:: install_plugins tfgen bin/pulumi-java-gen patch_java_schema # build
rm -f ./provider/cmd/$(PROVIDER)/schema-java.json
build_java:: patch_java
cd sdk/java/ && \
echo "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
printf "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
gradle --console=plain build

patch_java_schema::
Expand Down
225 changes: 225 additions & 0 deletions docs/resource/equinix_fabric_cloud_router.examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
## 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",
type: "XF_ROUTER",
location: {
metroCode: metro,
},
"package": {
code: "BASIC",
},
notifications: [{
type: "ALL",
emails: ["[email protected]"],
}],
account: {
accountNumber: 272010,
},
});
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",
type="XF_ROUTER",
location=equinix.fabric.CloudRouterLocationArgs(
metro_code=metro,
),
package=equinix.fabric.CloudRouterPackageArgs(
code="BASIC",
),
notifications=[equinix.fabric.CloudRouterNotificationArgs(
type="ALL",
emails=["[email protected]"],
)],
account=equinix.fabric.CloudRouterAccountArgs(
account_number=272010,
))
pulumi.export("routerId", router.id)
```
```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("[email protected]"),
},
},
},
Account: &fabric.CloudRouterAccountArgs{
AccountNumber: pulumi.Int(272010),
},
})
if err != nil {
return err
}
ctx.Export("routerId", router.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 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[]
{
"[email protected]",
},
},
},
Account = new Equinix.Fabric.Inputs.CloudRouterAccountArgs
{
AccountNumber = 272010,
},
});

return new Dictionary<string, object?>
{
["routerId"] = router.Id,
};
});
```
```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("[email protected]")
.build())
.account(CloudRouterAccountArgs.builder()
.accountNumber(272010)
.build())
.build());

ctx.export("routerId", router.id());
}
}
```
```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:
- [email protected]
account:
accountNumber: 272010
outputs:
routerId: ${router.id}
```
{{% /example %}}
Loading

0 comments on commit ba8962c

Please sign in to comment.