Skip to content

Commit

Permalink
Merge pull request #116 from pulumi/stack72/v0.33.0
Browse files Browse the repository at this point in the history
Upgrade to v0.33.0 of the Fastly Terraform Provider
  • Loading branch information
stack72 authored Aug 3, 2021
2 parents 18b0ed2 + 41bdc3d commit d6da57a
Show file tree
Hide file tree
Showing 32 changed files with 627 additions and 39 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHANGELOG
=========

## HEAD (Unreleased)
_(none)_
* Upgrade to v0.33.0 of the Fastly Terraform Provider

---

Expand Down
79 changes: 74 additions & 5 deletions provider/cmd/pulumi-resource-fastly/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
)

replace (
github.com/fastly/terraform-provider-fastly => github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210707114237-38252a61e436
github.com/fastly/terraform-provider-fastly => github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210723150413-63487888180b
github.com/hashicorp/go-getter v1.5.0 => github.com/hashicorp/go-getter v1.4.0
github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20210402103405-f5979773e8ba
)
2 changes: 2 additions & 0 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,8 @@ github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210519083802-a8c25d3f1de
github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210519083802-a8c25d3f1de3/go.mod h1:9x+Lr/Sz7b7NVug5tfLgyzCtt3SzrOHJNHQdWwnGgn0=
github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210707114237-38252a61e436 h1:Cr0Gek+4o25cx1IZU/NGL9uEKYqjdCwBTvw8JaSPmW8=
github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210707114237-38252a61e436/go.mod h1:c/ciBkbyj0Hb7VNiDbtK83+EpCd7Vo23iMXoXvuRhTk=
github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210723150413-63487888180b h1:zPvQaJzvWMeNLqPXZ4tZaskJg1DY4sLnDcMGDKbGeFo=
github.com/pulumi/terraform-provider-fastly v0.16.1-0.20210723150413-63487888180b/go.mod h1:lUrKE8BxoZkqlG5o6STI67QJK48hbxkkKJSWE4S0ask=
github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8=
github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=
Expand Down
5 changes: 5 additions & 0 deletions sdk/dotnet/Config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@ public static class Config
/// </summary>
public static string? BaseUrl { get; set; } = __config.Get("baseUrl");

/// <summary>
/// Set this to `true` if you only need data source that does not require authentication such as `fastly_ip_ranges`
/// </summary>
public static bool? NoAuth { get; set; } = __config.GetBoolean("noAuth");

}
}
12 changes: 12 additions & 0 deletions sdk/dotnet/Inputs/TlsSubscriptionManagedDnsChallengeArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Fastly.Inputs
{
}
37 changes: 37 additions & 0 deletions sdk/dotnet/Inputs/TlsSubscriptionManagedDnsChallengeGetArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Fastly.Inputs
{

public sealed class TlsSubscriptionManagedDnsChallengeGetArgs : Pulumi.ResourceArgs
{
/// <summary>
/// The name of the DNS record to add. For example `example.com`. Best accessed through a `for` expression to filter the relevant record.
/// </summary>
[Input("recordName")]
public Input<string>? RecordName { get; set; }

/// <summary>
/// The type of DNS record to add, e.g. `A`, or `CNAME`.
/// </summary>
[Input("recordType")]
public Input<string>? RecordType { get; set; }

/// <summary>
/// The value to which the DNS record should point, e.g. `xxxxx.fastly-validations.com`.
/// </summary>
[Input("recordValue")]
public Input<string>? RecordValue { get; set; }

public TlsSubscriptionManagedDnsChallengeGetArgs()
{
}
}
}
42 changes: 42 additions & 0 deletions sdk/dotnet/Outputs/TlsSubscriptionManagedDnsChallenge.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Fastly.Outputs
{

[OutputType]
public sealed class TlsSubscriptionManagedDnsChallenge
{
/// <summary>
/// The name of the DNS record to add. For example `example.com`. Best accessed through a `for` expression to filter the relevant record.
/// </summary>
public readonly string? RecordName;
/// <summary>
/// The type of DNS record to add, e.g. `A`, or `CNAME`.
/// </summary>
public readonly string? RecordType;
/// <summary>
/// The value to which the DNS record should point, e.g. `xxxxx.fastly-validations.com`.
/// </summary>
public readonly string? RecordValue;

[OutputConstructor]
private TlsSubscriptionManagedDnsChallenge(
string? recordName,

string? recordType,

string? recordValue)
{
RecordName = recordName;
RecordType = recordType;
RecordValue = recordValue;
}
}
}
6 changes: 6 additions & 0 deletions sdk/dotnet/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public sealed class ProviderArgs : Pulumi.ResourceArgs
[Input("baseUrl")]
public Input<string>? BaseUrl { get; set; }

/// <summary>
/// Set this to `true` if you only need data source that does not require authentication such as `fastly_ip_ranges`
/// </summary>
[Input("noAuth", json: true)]
public Input<bool>? NoAuth { get; set; }

public ProviderArgs()
{
}
Expand Down
4 changes: 4 additions & 0 deletions sdk/dotnet/ServiceDictionaryItemsv1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ namespace Pulumi.Fastly
///
/// If this provider is being used to populate the initial content of a dictionary which you intend to manage via API or UI, then the lifecycle `ignore_changes` field can be used with the resource. An example of this configuration is provided below.
///
/// ## Limitations
///
/// - `write_only` dictionaries are not supported
///
/// ## Example Usage
///
/// ## Import
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Servicev1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public partial class Servicev1 : Pulumi.CustomResource
/// The default hostname
/// </summary>
[Output("defaultHost")]
public Output<string> DefaultHost { get; private set; } = null!;
public Output<string?> DefaultHost { get; private set; } = null!;

/// <summary>
/// The default Time-to-live (TTL) for requests
Expand Down
21 changes: 20 additions & 1 deletion sdk/dotnet/TlsSubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Pulumi.Fastly
///
/// DNS records need to be modified on the domain being secured, in order to respond to the ACME domain ownership challenge.
///
/// There are two options for doing this: the `managed_dns_challenge`, which is the default method; and the `managed_http_challenges`, which points production traffic to Fastly.
/// There are two options for doing this: the `managed_dns_challenges`, which is the default method; and the `managed_http_challenges`, which points production traffic to Fastly.
///
/// &gt; See the [Fastly documentation](https://docs.fastly.com/en/guides/serving-https-traffic-using-fastly-managed-certificates#verifying-domain-ownership) for more information on verifying domain ownership.
///
Expand Down Expand Up @@ -79,6 +79,12 @@ public partial class TlsSubscription : Pulumi.CustomResource
[Output("managedDnsChallenge")]
public Output<ImmutableDictionary<string, string>> ManagedDnsChallenge { get; private set; } = null!;

/// <summary>
/// A list of options for configuring DNS to respond to ACME DNS challenge in order to verify domain ownership.
/// </summary>
[Output("managedDnsChallenges")]
public Output<ImmutableArray<Outputs.TlsSubscriptionManagedDnsChallenge>> ManagedDnsChallenges { get; private set; } = null!;

/// <summary>
/// A list of options for configuring DNS to respond to ACME HTTP challenge in order to verify domain ownership. Best accessed through a `for` expression to filter the relevant record.
/// </summary>
Expand Down Expand Up @@ -246,12 +252,25 @@ public InputList<string> Domains
/// <summary>
/// The details required to configure DNS to respond to ACME DNS challenge in order to verify domain ownership.
/// </summary>
[Obsolete(@"Use 'managed_dns_challenges' attribute instead")]
public InputMap<string> ManagedDnsChallenge
{
get => _managedDnsChallenge ?? (_managedDnsChallenge = new InputMap<string>());
set => _managedDnsChallenge = value;
}

[Input("managedDnsChallenges")]
private InputList<Inputs.TlsSubscriptionManagedDnsChallengeGetArgs>? _managedDnsChallenges;

/// <summary>
/// A list of options for configuring DNS to respond to ACME DNS challenge in order to verify domain ownership.
/// </summary>
public InputList<Inputs.TlsSubscriptionManagedDnsChallengeGetArgs> ManagedDnsChallenges
{
get => _managedDnsChallenges ?? (_managedDnsChallenges = new InputList<Inputs.TlsSubscriptionManagedDnsChallengeGetArgs>());
set => _managedDnsChallenges = value;
}

[Input("managedHttpChallenges")]
private InputList<Inputs.TlsSubscriptionManagedHttpChallengeGetArgs>? _managedHttpChallenges;

Expand Down
5 changes: 5 additions & 0 deletions sdk/go/fastly/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ func GetApiKey(ctx *pulumi.Context) string {
func GetBaseUrl(ctx *pulumi.Context) string {
return config.Get(ctx, "fastly:baseUrl")
}

// Set this to `true` if you only need data source that does not require authentication such as `fastly_ip_ranges`
func GetNoAuth(ctx *pulumi.Context) bool {
return config.GetBool(ctx, "fastly:noAuth")
}
4 changes: 4 additions & 0 deletions sdk/go/fastly/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ type providerArgs struct {
ApiKey *string `pulumi:"apiKey"`
// Fastly API URL
BaseUrl *string `pulumi:"baseUrl"`
// Set this to `true` if you only need data source that does not require authentication such as `fastly_ip_ranges`
NoAuth *bool `pulumi:"noAuth"`
}

// The set of arguments for constructing a Provider resource.
Expand All @@ -51,6 +53,8 @@ type ProviderArgs struct {
ApiKey pulumi.StringPtrInput
// Fastly API URL
BaseUrl pulumi.StringPtrInput
// Set this to `true` if you only need data source that does not require authentication such as `fastly_ip_ranges`
NoAuth pulumi.BoolPtrInput
}

func (ProviderArgs) ElementType() reflect.Type {
Expand Down
117 changes: 117 additions & 0 deletions sdk/go/fastly/pulumiTypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -13116,6 +13116,121 @@ func (o Servicev1WafPtrOutput) WafId() pulumi.StringPtrOutput {
}).(pulumi.StringPtrOutput)
}

type TlsSubscriptionManagedDnsChallenge struct {
// The name of the DNS record to add. For example `example.com`. Best accessed through a `for` expression to filter the relevant record.
RecordName *string `pulumi:"recordName"`
// The type of DNS record to add, e.g. `A`, or `CNAME`.
RecordType *string `pulumi:"recordType"`
// The value to which the DNS record should point, e.g. `xxxxx.fastly-validations.com`.
RecordValue *string `pulumi:"recordValue"`
}

// TlsSubscriptionManagedDnsChallengeInput is an input type that accepts TlsSubscriptionManagedDnsChallengeArgs and TlsSubscriptionManagedDnsChallengeOutput values.
// You can construct a concrete instance of `TlsSubscriptionManagedDnsChallengeInput` via:
//
// TlsSubscriptionManagedDnsChallengeArgs{...}
type TlsSubscriptionManagedDnsChallengeInput interface {
pulumi.Input

ToTlsSubscriptionManagedDnsChallengeOutput() TlsSubscriptionManagedDnsChallengeOutput
ToTlsSubscriptionManagedDnsChallengeOutputWithContext(context.Context) TlsSubscriptionManagedDnsChallengeOutput
}

type TlsSubscriptionManagedDnsChallengeArgs struct {
// The name of the DNS record to add. For example `example.com`. Best accessed through a `for` expression to filter the relevant record.
RecordName pulumi.StringPtrInput `pulumi:"recordName"`
// The type of DNS record to add, e.g. `A`, or `CNAME`.
RecordType pulumi.StringPtrInput `pulumi:"recordType"`
// The value to which the DNS record should point, e.g. `xxxxx.fastly-validations.com`.
RecordValue pulumi.StringPtrInput `pulumi:"recordValue"`
}

func (TlsSubscriptionManagedDnsChallengeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*TlsSubscriptionManagedDnsChallenge)(nil)).Elem()
}

func (i TlsSubscriptionManagedDnsChallengeArgs) ToTlsSubscriptionManagedDnsChallengeOutput() TlsSubscriptionManagedDnsChallengeOutput {
return i.ToTlsSubscriptionManagedDnsChallengeOutputWithContext(context.Background())
}

func (i TlsSubscriptionManagedDnsChallengeArgs) ToTlsSubscriptionManagedDnsChallengeOutputWithContext(ctx context.Context) TlsSubscriptionManagedDnsChallengeOutput {
return pulumi.ToOutputWithContext(ctx, i).(TlsSubscriptionManagedDnsChallengeOutput)
}

// TlsSubscriptionManagedDnsChallengeArrayInput is an input type that accepts TlsSubscriptionManagedDnsChallengeArray and TlsSubscriptionManagedDnsChallengeArrayOutput values.
// You can construct a concrete instance of `TlsSubscriptionManagedDnsChallengeArrayInput` via:
//
// TlsSubscriptionManagedDnsChallengeArray{ TlsSubscriptionManagedDnsChallengeArgs{...} }
type TlsSubscriptionManagedDnsChallengeArrayInput interface {
pulumi.Input

ToTlsSubscriptionManagedDnsChallengeArrayOutput() TlsSubscriptionManagedDnsChallengeArrayOutput
ToTlsSubscriptionManagedDnsChallengeArrayOutputWithContext(context.Context) TlsSubscriptionManagedDnsChallengeArrayOutput
}

type TlsSubscriptionManagedDnsChallengeArray []TlsSubscriptionManagedDnsChallengeInput

func (TlsSubscriptionManagedDnsChallengeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]TlsSubscriptionManagedDnsChallenge)(nil)).Elem()
}

func (i TlsSubscriptionManagedDnsChallengeArray) ToTlsSubscriptionManagedDnsChallengeArrayOutput() TlsSubscriptionManagedDnsChallengeArrayOutput {
return i.ToTlsSubscriptionManagedDnsChallengeArrayOutputWithContext(context.Background())
}

func (i TlsSubscriptionManagedDnsChallengeArray) ToTlsSubscriptionManagedDnsChallengeArrayOutputWithContext(ctx context.Context) TlsSubscriptionManagedDnsChallengeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TlsSubscriptionManagedDnsChallengeArrayOutput)
}

type TlsSubscriptionManagedDnsChallengeOutput struct{ *pulumi.OutputState }

func (TlsSubscriptionManagedDnsChallengeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TlsSubscriptionManagedDnsChallenge)(nil)).Elem()
}

func (o TlsSubscriptionManagedDnsChallengeOutput) ToTlsSubscriptionManagedDnsChallengeOutput() TlsSubscriptionManagedDnsChallengeOutput {
return o
}

func (o TlsSubscriptionManagedDnsChallengeOutput) ToTlsSubscriptionManagedDnsChallengeOutputWithContext(ctx context.Context) TlsSubscriptionManagedDnsChallengeOutput {
return o
}

// The name of the DNS record to add. For example `example.com`. Best accessed through a `for` expression to filter the relevant record.
func (o TlsSubscriptionManagedDnsChallengeOutput) RecordName() pulumi.StringPtrOutput {
return o.ApplyT(func(v TlsSubscriptionManagedDnsChallenge) *string { return v.RecordName }).(pulumi.StringPtrOutput)
}

// The type of DNS record to add, e.g. `A`, or `CNAME`.
func (o TlsSubscriptionManagedDnsChallengeOutput) RecordType() pulumi.StringPtrOutput {
return o.ApplyT(func(v TlsSubscriptionManagedDnsChallenge) *string { return v.RecordType }).(pulumi.StringPtrOutput)
}

// The value to which the DNS record should point, e.g. `xxxxx.fastly-validations.com`.
func (o TlsSubscriptionManagedDnsChallengeOutput) RecordValue() pulumi.StringPtrOutput {
return o.ApplyT(func(v TlsSubscriptionManagedDnsChallenge) *string { return v.RecordValue }).(pulumi.StringPtrOutput)
}

type TlsSubscriptionManagedDnsChallengeArrayOutput struct{ *pulumi.OutputState }

func (TlsSubscriptionManagedDnsChallengeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]TlsSubscriptionManagedDnsChallenge)(nil)).Elem()
}

func (o TlsSubscriptionManagedDnsChallengeArrayOutput) ToTlsSubscriptionManagedDnsChallengeArrayOutput() TlsSubscriptionManagedDnsChallengeArrayOutput {
return o
}

func (o TlsSubscriptionManagedDnsChallengeArrayOutput) ToTlsSubscriptionManagedDnsChallengeArrayOutputWithContext(ctx context.Context) TlsSubscriptionManagedDnsChallengeArrayOutput {
return o
}

func (o TlsSubscriptionManagedDnsChallengeArrayOutput) Index(i pulumi.IntInput) TlsSubscriptionManagedDnsChallengeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) TlsSubscriptionManagedDnsChallenge {
return vs[0].([]TlsSubscriptionManagedDnsChallenge)[vs[1].(int)]
}).(TlsSubscriptionManagedDnsChallengeOutput)
}

type TlsSubscriptionManagedHttpChallenge struct {
// The name of the DNS record to add. For example `example.com`. Best accessed through a `for` expression to filter the relevant record.
RecordName *string `pulumi:"recordName"`
Expand Down Expand Up @@ -13607,6 +13722,8 @@ func init() {
pulumi.RegisterOutputType(Servicev1VclArrayOutput{})
pulumi.RegisterOutputType(Servicev1WafOutput{})
pulumi.RegisterOutputType(Servicev1WafPtrOutput{})
pulumi.RegisterOutputType(TlsSubscriptionManagedDnsChallengeOutput{})
pulumi.RegisterOutputType(TlsSubscriptionManagedDnsChallengeArrayOutput{})
pulumi.RegisterOutputType(TlsSubscriptionManagedHttpChallengeOutput{})
pulumi.RegisterOutputType(TlsSubscriptionManagedHttpChallengeArrayOutput{})
pulumi.RegisterOutputType(GetTlsConfigurationDnsRecordOutput{})
Expand Down
4 changes: 4 additions & 0 deletions sdk/go/fastly/serviceDictionaryItemsv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import (
//
// If this provider is being used to populate the initial content of a dictionary which you intend to manage via API or UI, then the lifecycle `ignoreChanges` field can be used with the resource. An example of this configuration is provided below.
//
// ## Limitations
//
// - `writeOnly` dictionaries are not supported
//
// ## Example Usage
//
// ## Import
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/fastly/servicev1.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type Servicev1 struct {
Comment pulumi.StringPtrOutput `pulumi:"comment"`
Conditions Servicev1ConditionArrayOutput `pulumi:"conditions"`
// The default hostname
DefaultHost pulumi.StringOutput `pulumi:"defaultHost"`
DefaultHost pulumi.StringPtrOutput `pulumi:"defaultHost"`
// The default Time-to-live (TTL) for requests
DefaultTtl pulumi.IntPtrOutput `pulumi:"defaultTtl"`
Dictionaries Servicev1DictionaryArrayOutput `pulumi:"dictionaries"`
Expand Down
Loading

0 comments on commit d6da57a

Please sign in to comment.