Skip to content

Instantly share code, notes, and snippets.

public MyStack(Construct scope, string id) : base(scope, id)
{
var azurermProviderConfig = new AzurermProviderConfig() { Features = new AzurermProviderFeatures() };
var azurermProvider = new AzurermProvider(this, "AzureRm", azurermProviderConfig);
var resourceGroup = BuildResourceGroup();
var storageAccountBuilder = new StorageAccountBuilder(this)
.InResourceGroup(resourceGroup)
public class Function
{
private readonly TerraformStack _stack;
private ServicePlan _appServicePlan;
private ResourceGroup _rg;
private StorageAccount _functionStorageAccount;
private string _functionName;
public Function(TerraformStack stack)
{
@hibri
hibri / cdktfdotnet2.cs
Created October 5, 2022 13:33
extract methods
public class MyStack : TerraformStack
{
public MyStack(Construct scope, string id) : base(scope, id)
{
var azurermProviderConfig = new AzurermProviderConfig() { Features = new AzurermProviderFeatures() };
var azurermProvider = new AzurermProvider(this, "AzureRm", azurermProviderConfig);
var rg = BuildResourceGroup();
@hibri
hibri / Cdktfdotnet1.cs
Created October 5, 2022 10:55
First pass at using cdk tf
class Program
{
public static void Main(string[] args)
{
App app = new App();
MyStack stack = new MyStack(app, "datafactory");
new LocalBackend(stack);
app.Synth();
}
}
[Test]
public async Task Should_have_a_successfull_pipeline_run()
{
var tenantId = "xx";
var context =
new AuthenticationContext($"https://login.microsoftonline.com/{tenantId}/");
var clientId = "x";
var clientSecret = "x";
var cc = new ClientCredential(clientId,
clientSecret);
@hibri
hibri / test.go
Created May 12, 2022 16:04
Checkout_kata_12-05-2022
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
type item_discount struct {
name rune
@hibri
hibri / test.go
Last active April 14, 2022 12:09
checkout-kata-31-03-2022
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func GetPrices() map[rune]int {
var prices = make(map[rune]int)
@hibri
hibri / tests.go
Created September 22, 2021 16:32
kataus
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestAlwaysTrue(t *testing.T) {
package main
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
//https://github.com/hibri/code-katas/blob/main/katas/tennis-game.md
func TestAlwaysTrue(t *testing.T) {
package main
import (
"testing"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
)
func TestAlwaysTrue(t *testing.T) {